[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, the warnings module tries to display the file name. Inside PyRun_SimpleString(), globals()['__name__'] == '__main__', and the warnings module supposes that argv[1] is the name of the script. I wonder whether __file__ would be more accurate: it is f

[issue8816] Add test cases for builtins

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for these; I'll commit them later. Aren't the extra range tests that you added already in trunk? -- assignee: -> mark.dickinson nosy: +mark.dickinson ___ Python tracker _

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Sebastian
Sebastian added the comment: Oh, damn. I really forgot the argv filename thing. Nevermind :) But back to topic. __file__ might be not the best solution for that. What does Python when embedded, and __file__ is not set? That can happen when the source of your code is not a file (multiline text

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-05-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: Remarks with the patch: - we need to keep the find_vcvarsall() backward compatible. e.g. define a default value for arch. - Next, since this fix is specific to 64bt and since *any value* in arch will be used as "not 64 bits", I think the patch should be using a

[issue1289118] timedelta multiply and divide by floating point

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: By the way, does your patch do the right thing for timedelta(microseconds=1) / -4.0 ? Because my Python code doesn't. :) [If n is negative, then the 2*r > n condition in div_nearest should be 2*r < n instead.] -- __

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Note that I am not suggesting passing anything to utcnow(). I would > either leave it unchanged or make it always return aware datetime > instances. The latter would break compatibility, though (especially given how comparison between "naive" and "aware" dat

[issue8770] Make 'python -m sysconfig' print something useful

2010-05-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: added in r81513 Thanks all ! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8770] Make 'python -m sysconfig' print something useful

2010-05-25 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue1170] shlex have problems with parsing unicode

2010-05-25 Thread Éric Araujo
Éric Araujo added the comment: shlex in 3.x works with Unicode strings. Is it still time to try to fix this bug for 2.7? -- ___ Python tracker ___ __

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen added the comment: I'm the author of the pyliblzma module, and if desired, I'd be happy to help out adapting pyliblzma for inclusion with python. Most of it's code is based on bz2module.c, so it shouldn't be very far away from being good 'nuff. What I see as required is: * c

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen added the comment: ps: pylzma uses the LZMA SDK, which is not what you want. pyliblzma (not the same module;) OTOH uses liblzma, which is the library used by xz/lzma utils You'll find it available at http://launchpad.net/pyliblzma -- ___

[issue6715] xz compressor support

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen added the comment: Ooops, I kinda should've commented on this issue here in stead, rather than in issue5689, so I'll just copy-paste it here as well: I'm the author of the pyliblzma module, and if desired, I'd be happy to help out adapting pyliblzma for inclusion with pytho

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The 3.1 version does it correctly since issue7785, but this was not backported to 2.x. Python 3.x uses the "y*" format code to accept bytes and not unicode; this code does not exist in 2.x, and was replaced with "s*", which accepts unicode. But since the

[issue8616] Changes to content of Demo/turtle

2010-05-25 Thread Gregor Lingl
Gregor Lingl added the comment: Yes, tdemo_raund_dance.py and tdemo_scribble.py definitely do not work with turtle.py from Python 2.7 :-( I submitted them expecting, that my backport of turtle.py from Python 3.1 to Python 2.7 would be accepted. But, alas, I was too late :-((( So it's definitel

[issue6715] xz compressor support

2010-05-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I will happily review any implementation, and I can help with inclusion into python trunk. > ...the LGPL liblzma... Can you check which licences cover the different parts of the module? I think that you will have to contribute your code under the Pyth

[issue8817] Expose round-to-nearest division algorithm in Objects/longobject.c

2010-05-25 Thread Mark Dickinson
New submission from Mark Dickinson : The implementation of 'round' for Python integers uses a round-to-nearest form of divmod: a, b -> q, r, where q is the nearest integer to a / b and r = a - b*q. This form of divmod would be useful elsewhere. In particular, it's currently needed for imple

[issue1289118] timedelta multiply and divide by floating point

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: There's a patch in issue 8817 that exposes a round-to-nearest form of divmod in a function called _PyLong_Divmod_Near; this would save on duplication of code. -- ___ Python tracker

[issue6715] xz compressor support

2010-05-25 Thread Per Øyvind Karlsen
Per Øyvind Karlsen added the comment: ah, you're right, I forgot that the license for the library had changed as well (motivated by attempt of pleasing BSD people IIRC;), in the past the library was LGPL while only the 'xz' util was public domain.. For my code, feel free to use your own/any o

[issue6715] xz compressor support

2010-05-25 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

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

2010-05-25 Thread dudologist
dudologist added the comment: If %z works only in certain circumstances that behaviour should be documented wherever %z is referred to. -- nosy: +dudologist ___ Python tracker _

[issue1289118] timedelta multiply and divide by floating point

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > By the way, does your patch do the right thing for > timedelta(microseconds=1) / -4.0 No. >>> timedelta(microseconds=1) / -4.0 datetime.timedelta(-1, 86399, 99) (I just copied your python algorithm ...) I will merge with issue 8817 patch and tha

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-05-25 Thread AdamN
AdamN added the comment: Maybe he's referring to the fact that 'default_scheme' is referenced in the docs but in fact the parameter name is 'scheme'? -- nosy: +adamnelson ___ Python tracker ___

[issue8143] urlparse has a duplicate of urllib.unquote

2010-05-25 Thread AdamN
AdamN added the comment: I would vote to close this and focus any code cleanliness work on 3.x. The deep import is more trouble than it's worth. -- nosy: +adamnelson ___ Python tracker ___

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
New submission from AdamN : urlsplit and urlparse place the host into the path when using a default scheme: (Pdb) urlsplit('regionalhelpwanted.com/browseads/?sn=2',scheme='http') SplitResult(scheme='http', netloc='', path='regionalhelpwanted.com/browseads/', query='sn=2', fragment='') When usi

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
Changes by AdamN : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue1289118] timedelta multiply and divide by floating point

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching a combined issue1289118 + issue8817 patch. Datetime code now uses issue8817's _PyLong_Divmod_Near. -- Added file: http://bugs.python.org/file17460/issue1289118+issue8817-nodoc.diff ___ Python tracke

[issue8143] urlparse has a duplicate of urllib.unquote

2010-05-25 Thread R. David Murray
R. David Murray added the comment: I synced the two versions in r81518 and added a comment to both about updating the other. -- resolution: -> wont fix stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue6715] xz compressor support

2010-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello, > I'm the author of the pyliblzma module, and if desired, I'd be happy > to help out adapting pyliblzma for inclusion with python. > Most of it's code is based on bz2module.c, so it shouldn't be very far > away from being good 'nuff. Well, I wouldn't sa

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2010-05-25 Thread Sebastian
Sebastian added the comment: attached a patch for this issue now. Now it first uses the name of the script, instead of __file__. -- keywords: +patch Added file: http://bugs.python.org/file17461/_warnings.c.patch ___ Python tracker

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread R. David Murray
R. David Murray added the comment: The keyword in the code is 'scheme'. I've updated the docs accordingly in r81521 and r81522. -- assignee: -> d...@python components: +Documentation -Library (Lib) nosy: +d...@python, r.david.murray resolution: -> fixed stage: -> committed/rejected

[issue8817] Expose round-to-nearest division algorithm in Objects/longobject.c

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Just a few nitpicks on the patch (in increasing pickiness): 1. Any reason to prefer PyTuple_SetItem to PyTuple_SET_ITEM at the end of _PyLong_Divmod_Near? You are filling a brand new tuple, so PyTuple_SET_ITEM seems to be more appropriate. 2. temp =

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, May 25, 2010 at 5:45 AM, Antoine Pitrou wrote: .. > I also agree with Brett that a singleton looks rather unnecessary (it > also look quite C++/Java-esque to me). > I still don't understand your aversion to singletons and you did not address any

[issue8777] Add threading.Barrier

2010-05-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I'll provide a new version shortly, targeted for the py3k branch. -- ___ Python tracker ___

[issue8819] variable resolution within exec() incorrect

2010-05-25 Thread Colin Hawkett
New submission from Colin Hawkett : A discussion on stack overflow - http://stackoverflow.com/questions/2904274/globals-and-locals-in-python-exec - has led to the conclusion that the variable lookup behaviour within code run using exec() is not behaving as expected. Variable lookup inside a cl

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
AdamN added the comment: Great, thanks. However urlsplit and urlparse still take what one would expect to be recognized as the netloc and assigns it to the 'path' key. If that is by design perhaps we should at least warn people? -- status: closed -> open ___

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-05-25 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -tjreedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-05-25 Thread AdamN
AdamN added the comment: The default_scheme issue I brought up has been fixed in #8818 -- ___ Python tracker ___ ___ Python-bugs-list

[issue8819] variable resolution within exec() incorrect

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: This looks like a duplicate of issue 991196. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Pyt

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

2010-05-25 Thread R. David Murray
Changes by R. David Murray : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread R. David Murray
R. David Murray added the comment: I've added Senthil as nosy to double check me, but my understanding is that the scheme is just the part up to the colon. If you want to have a netloc in the URL, you have to precede it with a '//'. Otherwise there's no netloc. -- assignee: d...@pyt

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
AdamN added the comment: Ok, you're right: >>> urlsplit('cnn.com') SplitResult(scheme='', netloc='', path='cnn.com', query='', fragment='') >>> urlsplit('//cnn.com') SplitResult(scheme='', netloc='cnn.com', path='', query='', fragment='') >>> Although I see that nowhere in the documentation.

[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment

2010-05-25 Thread jan matejek
jan matejek added the comment: yes, reverting r72637 fixes this problem for me it reintroduces the original bug (there is some temporary file left behind), but i don't care about that -- ___ Python tracker __

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: On Tue, May 25, 2010 at 1:41 PM, AdamN wrote: > Although I see that nowhere in the documentation. It needn't be in the urlparse documentation; the RFCs on URL syntax apply here. None of what's going on with the urlparse module is Python specific, as far a

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
AdamN added the comment: I appreciate what you're saying but nobody, I guarantee nobody, is using the '//cnn.com' semantics. Anyway, in RFC 3986 in the Syntax Components section, you'll see that the '://' is not part of scheme or netloc. I could imagine urlsplit() failing if the url was not

[issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked"

2010-05-25 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks Senthil! -- versions: +Python 3.1, Python 3.2 -Python 2.5, Python 3.0 ___ Python tracker ___ __

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: The module is documented as supporting "Relative Uniform Resource Locators", in which a value with a non-rooted path is supported using simply "non/rooted/path". See the third paragraph in the Python 2.6 documentation, starting "The module has been designed

[issue7844] Add -3 warning for absolute imports.

2010-05-25 Thread Ezio Melotti
Ezio Melotti added the comment: Benjamin, are we still in time for this if someone provides a patch? -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue8254] write a configure command

2010-05-25 Thread Éric Araujo
Éric Araujo added the comment: My review of 4Suite’s config command is on . Comments welcome. (Adding my mentor to the nosy list.) -- keywords: +gsoc nosy: +titus ___ Python tracker

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
AdamN added the comment: I think I misspoke before. What I'm referring to is when somebody uses the 'scheme' parameter: urlsplit('cnn.com',scheme='http') Is there no way that we can document that this won't work the way that people think it will? Is it really reasonable for a high-level la

[issue8817] Expose round-to-nearest division algorithm in Objects/longobject.c

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for reviewing! Updated patch, that addresses points 1-3. For 4, there's no need for the old code, since "self - divmod_near(self, 10**-n)[1]" is enough. And I didn't like the old algorithm anyway; the new one is more straightforward. For 5, I've a

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread R. David Murray
R. David Murray added the comment: How would you expect urlsplit to differentiate between a relative path and a path with a netloc? I would think that most people would expect the semantics the module provides without reading any additional documentation. I certainly did, to the point where

[issue8819] variable resolution within exec() incorrect

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Judging by the issue 991196 discussion, the described behaviour is intentional. In particular, this behaviour isn't likely to change in Python 2.x: 2.6 is in bugfix only mode, and 2.7 is too close to release to start messing with internals. You may be able

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread AdamN
AdamN added the comment: I would say right under: urlparse.urlparse(urlstring[, default_scheme[, allow_fragments]])¶ Put: urlstring is a pseudo-url. If the string has a scheme, it will be interpreted as a scheme, followed by a path, querystring and fragment. If it is prepended with a doub

[issue8816] Add test cases for builtins

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Applied patches (minus the duplicate trunk tests for range, and minus some trailing whitespace) in r81525 (trunk) and r81526 (py3k). Thanks! -- resolution: -> accepted status: open -> closed ___ Python tracker

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-05-25 Thread Stefan Krah
Stefan Krah added the comment: I agree with all points. Could you fix it directly if at all possible? Of course eventually I'd do it, it might take some time until I get around to it though. -- ___ Python tracker _

[issue8818] urlsplit and urlparse add extra slash when using scheme

2010-05-25 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: On Tue, May 25, 2010 at 3:03 PM, AdamN wrote: > I'm still confused about when anybody would use a relative path with a > default scheme and no netloc but I'll leave that decision to you guys. The strings are not pseudo-URLs, they're relative references, a

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: > For other alternatives to the LGPL liblzma, you really don't have > any, If that's really the case (which I don't believe it is), then this project stops right here. If the underlying library is LGPL, it would require us to distribute its sources along with

[issue8636] enumerate() test cases do not cover optional start argument

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: It looks like there's still a bit of brokenness here: when I run test_enumerate by itself: ./python.exe Lib/test/test_enumerate.py I get the following: Traceback (most recent call last): File "Lib/test/test_enumerate.py", line 253, in test_main(verbo

[issue8636] enumerate() test cases do not cover optional start argument

2010-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: NameError fixed in r81527 through r81530. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment

2010-05-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: Dylan, what is your platform ? The only difference is that the test chdir in a new temporary directory. Could anyone trace the test to step into the linker call to see its error output ? (can't reproduce here) -- ___

[issue665194] datetime-RFC2822 roundtripping

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing l

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

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: If concrete tzinfo subclass is added to datetime module (see issue5094), it will become feasible to meaningfully parse timezone information. -- assignee: -> belopolsky ___ Python tracker

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: asvetlov> I'm skeptical about surrogates particularly for that asvetlov> problem. From my perspective the solution is only to use asvetlov> native unicode support for windows file operation functions. It's not exclusive. We can use surrogates on POSIX and the

[issue7844] Add -3 warning for absolute imports.

2010-05-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, if soonish. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, May 24, 2010 at 11:06 PM, Rafe Kaplan wrote: .. > I had originally thought of doing the class, and then having constants > associated with it: > >  UTC.UTC0 > > Eventually if we support multiple timezones: > >  UTC.UTC1 .. > > Well... maybe not g

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

2010-05-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue4769] b64decode should accept strings or bytes

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: I commited base64_main.patch (+ tests): 3.2 (r81533) and 3.1 (r81534). -- ___ Python tracker ___ ___

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: The singleton dislike from Antoine and me is that they are generally just not liked in the stdlib. None/True/False are special cases because they are syntax, so having ``None is None`` ever not work would just be weird. Otherwise singletons are unnecessary in P

[issue8796] Deprecate codecs.open()

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: That deprecation is way too fast. If someone wants to write code that works in Python 2.5 or older *and* Python 3 then codecs.open will most likely be how they keep compatibility for reading in encoded files. But yes, overall it should get deprecated. Probably

[issue8796] Deprecate codecs.open()

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: > If someone wants to write code that works in Python 2.5 > or older *and* Python 3 then codecs.open will most likely > be how they keep compatibility for reading in encoded files. Can't 2to3 do the conversion? (codecs.open => open) -- __

[issue8796] Deprecate codecs.open()

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: I'm not talking about those people who use 2to3, I'm talking about those who want source-compatibility between Python 2 and Python 3. So they don't run 2to3 as it just works in Python 3 without modification. -- ___ P

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-05-25 Thread Koen van de Sande
Koen van de Sande added the comment: The XZ Utils website ( http://tukaani.org/xz/ ) states the following: "The most interesting parts of XZ Utils (e.g. liblzma) are in the public domain. You can do whatever you want with the public domain parts. Some parts of XZ Utils (e.g. build system and

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: .. Thanks for the explanation. I realize that I should not have used the s-word. :-) In fact I only wanted a module level constant utc = UTC() and did not care much about other UTC class instances and whether any are permitted or easy to create. Well, t

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Rafe Kaplan
Rafe Kaplan added the comment: "Note that I am not suggesting passing anything to utcnow(). I would either leave it unchanged or make it always return aware datetime instances." FYI, all other issues aside, having utcnow() (with no parameters) return a tzaware instance will introduce backward

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Roundup bug bites again. Reposting via web: - On Tue, May 25, 2010 at 5:35 PM, Brett Cannon wrote: > > The singleton dislike from Antoine and me is that they are generally just not > liked in the stdlib. .. Thanks for the explanation. I realize th

[issue4769] b64decode should accept strings or bytes

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: Accept unicode string is not "pure", but I agree that it's convinient. Here is a patch: * base64.b(16|32|64)encode and b64.encodebytes accept unicode string * unicode is first encoded to utf-8 to get a byte string * Update the docstrings and the documentatio

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Note that Brett has already mentioned backward compatibility issues, but suggested that "[adding tz_aware argument may provide] a transition plan to make utcnow() always return a timezone-aware datetime object." [msg106413] I would say, lets leave utcno

[issue4769] b64decode should accept strings or bytes

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: > I commited base64_main.patch (+ tests): 3.2 (r81533) and 3.1 (r81534). Hum, the test fails on Windows: fixed by r81535 (3.2) and r81536 (3.1). -- ___ Python tracker

[issue3798] SystemExit incorrectly displays unicode message

2010-05-25 Thread STINNER Victor
STINNER Victor added the comment: Commited to 2.7 (r81537) and 2.6 (r81539), blocked in 3.2 (r81538: py3k was already fixed by r81252). -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: If we don't modify utcnow (and similar UTC methods) to take a flag saying to use the utc instance, then the methods should at least get deprecated with a message saying that people should be using ``now(utc)``, etc. -- _

[issue8817] Expose round-to-nearest division algorithm in Objects/longobject.c

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looking at Py_DECREF(one); result = PyTuple_New(2); if (result == NULL) goto error; .. error: Py_XDECREF(one); If PyTuple_New fails, wouldn't it result in one being DECREF's twice? -- ___

[issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe)

2010-05-25 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- type: behavior -> feature request versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list

[issue1289118] timedelta multiply and divide by floating point

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching a new patch with documentation changes, additional tests, updated issue8817 patch and a reference leak fix. -- Added file: http://bugs.python.org/file17464/issue1289118+issue8817-withdoc.diff ___ Pyt

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Brett: "[utcnow] should at least get deprecated with a message saying that people should be using ``now(utc)``" Yes, I believe all utcxxx methods of datetime are a kludge due to the lack of concrete UTC tzinfo: utcfromtimestamp() -> fromtimestamp(utc)

[issue5023] Segfault in datetime.time.strftime("%z")

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker ___ ___ Pyt

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: OK, it looks like we are reaching consensus here on several points: 1. Implement FixedOffsetTimezone 2. Provide a utc attribute on the datetime module that is set to ``FixedOffsetTimezone(0, "UTC")`` 3. Deprecate the various utc* methods with messages pointing o

[issue5434] datetime.monthdelta

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: MonthDelta has been published on PyPI and there was no activity on this issue since then. I conclude that there is little support for including this in stdlib. I am marking this as "rejected" and setting the status to pending. I will close this issue

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have no opinion on the first question. I would be fine with a simple "soft" deprecation where we simply add a note in documentation warning that these methods create naive datetime instances and it is preferable to use aware variants produced by meth

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am leaning towards "won't fix". Any objections? -- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky versions: -Python 2.5, Python 2.6 ___ Python tracker _

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-05-25 Thread Brett Cannon
Brett Cannon added the comment: The stated long-term goal of the stdlib is to minimize the C extension modules to only those that have to be written in C (modules can still have performance enhancing extension back-ends). Since datetime does not meet that requirement it's not a matter of "if"

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-05-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Any objections to closing this as "won't fix"? -- nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker ___ _

[issue7150] datetime operations spanning MINYEAR give bad results

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker ___ ___ Python

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1647654] No obvious and correct way to get the time zone offset

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1667546] Time zone-capable variant of time.localtime

2010-05-25 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 ___

[issue1667546] Time zone-capable variant of time.localtime

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8005] datetime's comparison methods do not return NotImplemented when they should

2010-05-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: None here. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-05-25 Thread Jess Austin
Jess Austin added the comment: Could you provide some reasoning for such a resolution? I had thought that "won't fix" indicated that the issue wasn't actually an error in behavior. I grant that most people will never see this particular error, but it is an error. -- ___

  1   2   >