[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: How do I enable `network' resource? I am getting $ ./python.exe -m test.regrtest test_urllibnet test_urllibnet test_urllibnet skipped -- Use of the `network' resource not enabled 1 test skipped: test_urllibnet Those skips are all expected

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What is your locale? -- ___ Python tracker <http://bugs.python.org/issue8963> ___ ___ Python-bugs-list mailing list Unsub

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this check needed on darwin? Why not simply set fs_encoding = 'utf-8'? -- nosy: +flox ___ Python tracker <http://bugs.python.

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I still cannot reproduce the failure, but please, try the attached patch. -- keywords: +patch Added file: http://bugs.python.org/file17608/issue8963.diff ___ Python tracker <http://bugs.python.org/issue8

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > The patch is not sufficient, since other > failures can then occur if test_strptime gets > run after test_urllibnet This looks like a bug in support.run_with_locale decorator. It is des

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Antoine, Would s/LC_TIME/LC_ALL/ in my patch fix your problem? I could not find an affected system, but I simulated the problem by adding locale.setlocale(locale.LC_ALL, "") call in the test. I think the patch is worth applying. It fixes t

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: $ ./python.exe -m test.regrtest -unetwork test_urllibnet test_urllibnet 1 test OK. Also the arguments to strptime from reported error message work fine: >>> import time >>> time.strptime('Thu, 10 Jun 2010 19:03:39 GMT'

[issue1452] subprocess's popen.stdout.seek(0) doesn't raise an error

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: -> feature request versions: +Python 3.2 -Python 3.0 ___ Python tracker <http://bugs.python.org/issue1452> ___ _

[issue8963] test_urllibnet failure

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like your libc calls setlocale(LC_ALL, "") on error. This may or may not be right and not python's problem in any case. What is worth to investigate, however is why @run_with_locale decorator fails to restore the locale after

[issue3453] PyType_Ready doesn't ensure that all bases are ready

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My knowledge may be out of date, but I thought multiple inheritance was only supported at the python level. If this is still the case, then no initialization check is needed. (You cannot get an uninitialized type at python level.) An extra defensive

[issue1516] make _ctypes work with non-gcc compilers

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: -> feature request versions: +Python 3.2 -Python 2.6 ___ Python tracker <http://bugs.python.org/issue1516> ___ _

[issue4113] Add custom __repr__ to functools.partial

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I understand that the latest RFE in this issue is to provide a custom __repr__ to functools.partial. Something along the lines of class partial(functools.partial): def __repr__(self): return "functools.partial(%r, %s)" %

[issue4113] Add custom __repr__ to functools.partial

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issue4113> ___ ___ Python-bugs-list m

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, Your patch works for me and makes sense even though I don't really know where Py_FileSystemDefaultEncoding is set on Darwin. :-) -- ___ Python tracker <http://bugs.python.org/i

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, test_imp is not the right place to test this. Can you add a sys module test for this issue? -- stage: -> unit test needed ___ Python tracker <http://bugs.python.org/iss

[issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...)

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> patch review type: -> feature request versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/iss

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Nope. $ ./python.exe -m test.regrtest test_sys test test_sys failed -- Traceback (most recent call last): File "Lib/test/test_sys.py", line 877, in test_getfilesystemencoding self.assertEqual(fs_encoding, 'utf-8') AssertionError

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17619/issue8965-test.diff ___ Python tracker <http://bugs.python.org/issue8965> ___ ___ Python-bug

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17620/issue8965-test.diff ___ Python tracker <http://bugs.python.org/issue8965> ___ ___ Python-bug

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17619/issue8965-test.diff ___ Python tracker <http://bugs.python.org/issue8965> ___ ___ Pytho

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry for extra traffic. I thought my patch introduced an indentation error, but it looks like you truly don't check sys.getfilesystemencoding() output if not on darwin. -- ___ Python tracker

[issue8965] test_imp fails on OSX when LANG is set

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17621/issue8965-test-1.diff ___ Python tracker <http://bugs.python.org/issue8965> ___ ___ Pytho

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks reasonable to me as well. Code patch applies cleanly, but tests don't. I'll get it ready for commit. -- assignee: -> belopolsky nosy: +belopolsky resolution: -> accepted versions: -Python 2.6, Python

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching an updated patch, but it fails one of the old tests. Need to investigate this some more. -- resolution: accepted -> Added file: http://bugs.python.org/file17624/issue3129.diff ___ Pyt

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch works and passes the tests. The failing test was clearly wrong. I am still not sure that it is right to raise TypeError rather than struct.error on invalid offset in pack_into, but this is a separate issue. -- Added file: http

[issue3129] struct allows repeat spec. without a format specifier

2010-06-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17624/issue3129.diff ___ Python tracker <http://bugs.python.org/issue3129> ___ ___ Python-bug

[issue8903] Add module level now() and today() functions to datetime module

2010-06-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jun 10, 2010 at 10:37 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I actually agree with Anatoly here.  I find it much more intuitive to do > >  import datetime > >   timestamp = datet

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jun 11, 2010 at 10:23 AM, Mark Dickinson wrote: .. > Some comments from playing with this patch (without having looked at the > implementation): > thank you very much for your comments. As we are fine-tuning the timezone class, do you

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have to stop replying to emails. There is no reason behind roundup remove ">" comments logic. Reposting my message: """ On Fri, Jun 11, 2010 at 10:23 AM, Mark Dickinson wrote: .. > Some comments from playing with th

[issue6641] strptime doesn't support %z format ?

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jun 11, 2010 at 10:43 AM, Mark Dickinson wrote: .. > It's a little awkward to review this patch independently of the issue 5094 > patch. >  Can we work on issue 5094 first, and then come back to this one? Sure. Unfortunately, I t

[issue8973] Inconsistent docstrings in struct module

2010-06-11 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Module level pack, unpack etc. methods have similar functionality with Struct instance methods, but docs are different. The immediate issue is the lack of signature in the module level methods' docstrings. $ ./python.exe -m pydoc struct.Struct

[issue8973] Inconsistent docstrings in struct module

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Two more bits: 1. "See struct.__doc__", while technically correct, is not user friendly. If you copy struct.__doc__ to >>> prompt, you get an ugly repr of a multiline string. I suggest s/struct.__doc__/help(struct)/.

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching a new patch, issue5094e.diff which addresses most of Mark's comments. I left out repr() because two opinions were voiced on IRC with respect to datetime. prefix. I would like to give it some more thought even though I am le

[issue6608] asctime does not check its input

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Downgrading further. If anyone has interest in supplying a patch, please step in. Otherwise I plan to add a note to documentation and leave the code as is. -- priority: critical -> low title: asctime causing python to crash -> asctime do

[issue6608] asctime does not check its input

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: That's what CERT recommends. Their code can be reused as is: int validate_tm(struct tm* time) { /* * The range of valid values of the tm_sec member is [0, 60] * inclusive (to allow for leap seconds). */ if (time->tm_sec <

[issue5845] rlcompleter should be enabled automatically

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue5845> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Note that >>> help(str.translate) Help on method_descriptor: translate(...) S.translate(table) -> str Return a copy of the string S, where all characters have been mapped .. but >>> help('str.translate') no

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue8912> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8947] Provide as_integer_ratio() method to Decimal

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Nice implementation. I wonder if the /5 loop can be eliminated by noting that /5 is *2 followed by decimal shift. (Probably not without fast decimal arithmetics.) A few documentation nits: 1. In Decimal methods there is no consistency in referring to

[issue8981] _struct.__version__ should be string, not bytes

2010-06-11 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> import _struct >>> _struct.__version__ b'0.3' I would rather simply remove this since it is no longer exposed in struct. Yes, it does cause problems in real life code: I have applications that keep track of versions

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: There is a separate issue #5288 asking to support sub-minute offsets. This is not hard, but the C code still has a few interfaces left from the time when offset was an integer # of minutes. I am +1 to fix that, but not as a part of this issue. On

[issue5907] repr of time.struct_time type does not eval

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky versions: +Python 3.2 -Python 2.6, Python 3.0 ___ Python tracker <http://bugs.python.org/iss

[issue4086] support %z format in time.strftime and _strptime?

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky dependencies: +No obvious and correct way to get the time zone offset nosy: +belopolsky ___ Python tracker <http://bugs.python.org/iss

[issue1520662] support all of strftime(3)

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file13373/unnamed ___ Python tracker <http://bugs.python.org/issue1520662> ___ ___ Python-bug

[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: %O is used by POSIX spec to indicate alternative locale format. Gnu date uses %:z %:z+hh:mm numeric timezone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric time zone with : to

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-11 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, reassigning this to you for commit review. -- assignee: belopolsky -> mark.dickinson ___ Python tracker <http://bugs.python.org/iss

[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-06-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue7463> ___ ___ Python-bugs-list mailing list Un

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: calcsize() still does not have signature in docstring. A nit: maybe follow calcsize() lead and say "format string fmt" rather than just "fmt". One more __doc__ mention: in Struct docstring, | __init__(...) | x.__init__(...

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Inspired by issue issue8973, I did $ grep -in "see.*\.__doc__" Modules/*.c Surprisingly, there were not as many results as I feared. As I explained in the referenced issue, "See name.__doc__", while technically correct, is no

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: A couple more: $ grep -in "see.*\.__doc__" Lib/*.py Lib/doctest.py:1782:See doctest.__doc__ for an overview. Lib/inspect.py:162:See isfunction.__doc__ for attributes listing.""" an a really problematic Objects/typeobje

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See issue #8983 for the the __init__ doc discussion since it is not specific to the struct module. -- ___ Python tracker <http://bugs.python.org/issue8

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have made my mind on subclassing timezone issue. I believe subclassing should not be allowed and here is the reason: The new datetime.timezone class is a very specific implementation of tzinfo interface. It guarantees that utcoffset(dt) and friends

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Will do. -- assignee: d...@python -> belopolsky ___ Python tracker <http://bugs.python.org/issue8983> ___ ___ Python-

[issue3129] struct allows repeat spec. without a format specifier

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is borderline enough that I am not comfortable making a call. If anyone speaks in support of backporting I'll do it. For 2.7 or 2.7.1. -- status: closed -> pending ___ Python tracke

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > +1 for 'UTC±HH:MM' for both tzname and __str__, too. It looks like I subconsciently allocated enough characters for this in the string buffer, so now this is a single character change. I'll do it with other changes (if

[issue8983] Docstrings should refer to help(name), not name.__doc__

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching issue8983.diff patch. I am a bit unsure about __init__ docstring change: 1. Are cases when help(type(x)) differs from help(x) important enough to distinguish in docstring? 2. Do we need a default docstring on __init__ at all? If so

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching issue5094f.diff which implements 'UTC±HH:MM' and adds unit tests for more error cases. -- Added file: http://bugs.python.org/file17648/issue5094f.diff ___ Python tracker <http://bu

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: How does issue8973-Struct.diff look? -- Added file: http://bugs.python.org/file17649/issue8973-Struct.diff ___ Python tracker <http://bugs.python.org/issue8

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r81961. Yes, I used "format" for consistency with the manual, but on the second thought consistency within help() is more important. -- ___ Python tracker <http://bugs.python.

[issue8973] Inconsistent docstrings in struct module

2010-06-12 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Jun 13, 2010 at 10:09 AM, Mark Dickinson wrote: .. > - Should the PyDateTime_TimeZone struct definition go into > datetime.h, so that it's avaiable if you want to export any C-API > functions later on? > The original patch had t

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Just to add a little bit of historical perspective, this proposal is really more than seven years old: """ s.keim (Dec 20, 2002 3:33 am; Comment #13) .. do we really need methods like utcnow. I believe the following could be a litt

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue5094g.diff addresses all Mark's suggestions except making struct definition public. I also made a few other changes: 1. Constructor now raises TypeError when offset is not a timedelta instead of ValueError in previous version. 2. NEWS ent

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also I changed Py_DECREFs in destructor to Py_CLEAR. I understand that while not strictly required in this case, it is a good practice. -- ___ Python tracker <http://bugs.python.org/issue5

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r81981. I'll open a separate documentation issue to update Doc/includes/tzinfo-examples.py and improve TZ related documentation. -- stage: patch review -> committed/rejected status: open -> closed title: datetime lac

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: With issue5094 patch now committed, I am replacing issue6641.diff with a new version that does not include issue5094. -- title: strptime doesn't support %z format ? -> datetime.strptime doesn't support %z format ? Add

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17590/issue6641.diff ___ Python tracker <http://bugs.python.org/issue6641> ___ ___ Python-bug

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed issue6280-calendar.diff in r81988. I believe tests should be merged in 2.7. Any objections? As for the original RFE, I think it should be rejected. I believe users should be encouraged to use datetime objects instead of timetuples and

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I reverted r81988 in r81989. Some code may rely on timegm() accepting float in tm_sec. See http2time in Lib/http/cookiejar.py. It is very easy to modify implementation to accept float seconds, but old implementation accidentally work for float hours

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Éric, It will be helpful if your code could also check for lines longer than 79 characters. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: .. and trailing white space. -- ___ Python tracker <http://bugs.python.org/issue8912> ___ ___ Python-bugs-list mailin

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reopening to add some minor fixes to tests and documentation. See issue5094h.diff. Ezio, thanks for finding these issues. -- status: closed -> open Added file: http://bugs.python.org/file17676/issue5094h.d

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ezio.melotti ___ Python tracker <http://bugs.python.org/issue5094> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9000] Provide parseable repr to datetime.timezone

2010-06-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Recently added datetime.timezone class does not have a custom repr, so one gets >>> timezone.utc instead of parseable datetime.timezone(datetime.timedelta(0)) This is inconsistent with the way other classes in datetime modu

[issue9000] Provide parseable repr to datetime.timezone

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +datetime lacks concrete tzinfo implementation for UTC versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue9

[issue9000] Provide parseable repr to datetime.timezone

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Merged issue5094 nosy list. -- nosy: +ajaksu2, akira, brett.cannon, doerwalter, durban, ezio.melotti, gagenellina, kawai, l0nwlf, mark.dickinson, merwok, pitrou, r.david.murray, rafe, techtonik, tim_one

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What about """ .. method:: datetime.utcoffset() If :attr:`tzinfo` is ``None``, returns ``None``, else returns ... """ Should this use "return" too? -- ___

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: How to specify offset range horse got its beating above. See msg107554. The current wording is the best compromise between verbosity and precision. Replacing the patch with one that fixes other nits. -- Added file: http://bugs.python.org

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17676/issue5094h.diff ___ Python tracker <http://bugs.python.org/issue5094> ___ ___ Python-bug

[issue5094] datetime lacks concrete tzinfo implementation for UTC

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On this happy note, I am closing this issue. Doc changes have been committed in r82004, test changes in r82003. For repr(timezone(..)) development, please follow issue #9000. -- status: open -> clo

[issue3129] struct allows repeat spec. without a format specifier

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue3129> ___ ___ Python-bugs-list mailing list Un

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17681/issue6641.diff ___ Python tracker <http://bugs.python.org/issue6641> ___ ___ Python-bug

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17667/issue6641.diff ___ Python tracker <http://bugs.python.org/issue6641> ___ ___ Python-bug

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, I am reassigning this to you for a commit review. -- assignee: belopolsky -> mark.dickinson ___ Python tracker <http://bugs.python.org/iss

[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2010-06-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : I find the following quite misleading: >>> from datetime import datetime >>> import time >>> time.strftime('%c %z %Z', datetime.utcnow().utctimetuple()) 'Wed Jun 16 03:26:26 2010 -0500 EST' As far as I

[issue9005] Year range in timetuple

2010-06-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Current datetime.timetuple() implementation goes out of its way to support edge cases that produce timetuples beyond the naive datetime range: >>> t1 = datetime.min.replace(tzinfo=timezone.max) >>> t2 = datetime.max.replace(t

[issue9009] Improve quality of Python/dtoa.c

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9009> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Here is the history of the issue per Martin v. Löwis on python-dev: """ This was added with r36221 | bcannon | 2004-06-24 03:38:47 +0200 (Do, 24. Jun 2004)

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch Added file: http://bugs.python.org/file17684/timefunc-split.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Based on IRC discussion, here is a modified patch that places C code in _time.c and creates a stub for _time.h so that future shared definitions can go there. -- Added file: http://bugs.python.org/file17685/issue9012.diff

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue9012> ___ ___ Python-bugs-list mai

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue9012> ___ ___ Python-bugs-list mailing list Un

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Added new Module/_time.h to the patch. -- Added file: http://bugs.python.org/file17686/issue9012.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17685/issue9012.diff ___ Python tracker <http://bugs.python.org/issue9012> ___ ___ Python-bug

[issue9013] Implement tzinfo.dst() method in timezone

2010-06-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : This idea was brought in the original fixed offset timezone proposal (see issue 5094), but was met with some opposition. See msg106914, point 2. As a result, the timezone implementation is in conflict with tzinfo documentation that says &qu

[issue9013] Implement tzinfo.dst() method in timezone

2010-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +datetime lacks concrete tzinfo implementation for UTC nosy: +brett.cannon, mark.dickinson ___ Python tracker <http://bugs.python.org/issue9

[issue9009] Improve quality of Python/dtoa.c

2010-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark, It is great to see you doing this. I looked at this code on several occasions before and each time ran away scared! I sincerely hope I will understand how it works after your rewrite. Just a small suggestion at this point: can you give longer

[issue9012] Separate compilation of time and datetime modules

2010-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82034. -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to move this forward. The PyPy implementation at http://codespeak.net/pypy/dist/pypy/lib/datetime.py claims to be based on the original CPython datetime implementation from the time when datetime was a python module. I looked through the

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-17 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jun 17, 2010 at 10:31 AM, Marc-Andre Lemburg wrote: .. > To avoid the wasted memory and import time, it's better to use: > > try: >    from _cmodule import * > except ImportError: >    from _pymodule import * > Hmm,

<    24   25   26   27   28   29   30   31   32   33   >