[issue15089] Add gzip support to urllib.request.retrieve()

2012-06-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : Enable retrieve() to take advantage of data compression in HTTP requests. * In the request, add the header "Accept-Encoding: gzip". * In the response, check the headers for "Content-Encoding: gzip". * Convert the downloaded content using gzip.GzipFile. --

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: I looked into the idea of treating networks as containers of interface objects rather than addresses - it turns out it gets messy very quickly, because you definitely want your network address and broadcast address to be ordinary addresses, so making the host a

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: Given the imminent 3.3 beta 1 feature freeze and the fact I would like to explore Ron's suggestion of a higher level ByteCode object to encapsulate a sequence of instructions (along with additional information from the code object), postponing this one. --

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-06-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: ncoghlan -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: I left the name of the new private API as _PyGen_FetchStopIterationValue. If anyone wants to make it public, they can raise a new issue to give it a more appropriate name (and move the definition accordingly). PyStopIteration_Create is simply gone, replaced by

[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 438b861e2edb by Nick Coghlan in branch 'default': Issue #13783: PEP 380 cleanup part 2, using the new identifier APIs in the generator implementation http://hg.python.org/cpython/rev/438b861e2edb -- ___

[issue14991] Option for regex groupdict() to show only matching names

2012-06-16 Thread Larry Hastings
Larry Hastings added the comment: Just a thought--how about a new constant in the re module: SUPPRESSED=object() and have the interface be mo.groupdict(default=re.SUPPRESSED) -- nosy: +larry ___ Python tracker

[issue14215] http://www.python.org/dev/peps/ title is python.org

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: This is actually related to the integration between the PEP formatting tools and the python.org build system (that is, pep2pyramid.py, rather than genpepindex.py) I'm inclined to close it as "won't fix" and maybe pass it to the psf-redesign list to look into a

[issue13783] Clean up PEP 380 C API additions

2012-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset cfbf6aa5c9e3 by Nick Coghlan in branch 'default': Issue #13783: the PEP 380 implementation no longer expands the public C API http://hg.python.org/cpython/rev/cfbf6aa5c9e3 -- nosy: +python-dev ___ Python

[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2012-06-16 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.2, Python 3.3 ___ Python tracker ___

[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2012-06-16 Thread Nick Coghlan
New submission from Nick Coghlan : Currently undocumented: http://docs.python.org/py3k/c-api/gen.html Public API in a released version of Python: http://hg.python.org/cpython/file/3.2/Include/genobject.h -- messages: 163012 nosy: ncoghlan priority: normal severity: normal status: open t

[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: Looks like a solid improvement to me. One minor naming quibble is that "FROZENLESS_LIBRARY_OBJS" hurts my brain - would you mind switching it to something like "LIBRARY_OBJS_OMIT_FROZEN"? -- ___ Python tracker

[issue14657] Avoid two importlib copies

2012-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: +1 Antoine - your patch is better than the status quo, so it makes sense to apply it. If Eric can make the other way work in time for 3.3, great, but at least we'll have a solid fallback position without it. -- ___

[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Meador Inge
Meador Inge added the comment: Nice patch Antoine! The method of partitioning the object sets into frozen and non-frozen is nice. > The proposed "-X" or BOOTSTRAP_PY approaches would be difficult, since there > doesn't appear to be an easy way to generate a given file (the Python > interpreter

[issue13823] xml.etree.ElementTree.ElementTree.write - argument checking

2012-06-16 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems

2012-06-16 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1767933] Badly formed XML using etree and utf-16

2012-06-16 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Eli Bendersky
Eli Bendersky added the comment: Martin, thanks for the explanation. The patch LGTM, then. Could it be useful to document this a bit more explicitly in the description of sys.getsizeof? The most intuitive thing to expect from it is to compute the *total* size including contained objects. So t

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge
Changes by Meador Inge : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.2 ___ Python tracker ___ _

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35d3a8ed7997 by Meador Inge in branch '2.7': Issue #15054: Fix incorrect tokenization of 'b' and 'br' string literals. http://hg.python.org/cpython/rev/35d3a8ed7997 New changeset 115b0cb52c6c by Meador Inge in branch 'default': Issue #15054: Fix in

[issue15078] Change os.sendfile so its arguments are stable

2012-06-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm -0 about unifying the function signature and raise NotImplementedError where an arg is not supported. I'm -1 about os.sendfile(..., diskio=True, wait=True, sync=False). In both cases users willing to use these 3 args are already supposed to know what

[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Nadeem Vawda
Nadeem Vawda added the comment: There is already such a function, gzip.decompress() - it was added in 3.2. -- nosy: +nadeem.vawda resolution: -> invalid stage: -> committed/rejected status: open -> pending ___ Python tracker

[issue15087] Add gzip function to read gzip'd strings

2012-06-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : The API for the gzip module is convenient for reading gzipped file but is rather awkward for reading bytes downloaded from a socket: >>> import gzip, io >>> from urllib.request import urlopen, Request >>> u = urlopen(Request('http://www.nytimes.com'

[issue14769] Add test to automatically detect missing format units in skipitem()

2012-06-16 Thread Larry Hastings
Larry Hastings added the comment: Ping. Benjamin, should I find another reviewer? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14657] Avoid two importlib copies

2012-06-16 Thread Eric Snow
Eric Snow added the comment: It's actually at the top of my list, but may still be a week or two until I can get to it. -- ___ Python tracker ___ __

[issue730473] Add Py_AtInit() startup hook for extenders

2012-06-16 Thread Patrick Miller
Patrick Miller added the comment: Just languishing for lo on these 5 years -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks fixed. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3680b3423aa3 by Antoine Pitrou in branch 'default': Try to fix issue #15086: build failure on Ubuntu shared buildbot. http://hg.python.org/cpython/rev/3680b3423aa3 -- nosy: +python-dev ___ Python tracker

[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Stefan Krah
Stefan Krah added the comment: Rebuilding importlib.h fails: -- Python/importlib.h needs to be rebuilt, but no interpreter is available to do so. Leaving the previous version in place. You may want to run ''make'' a second time after this

[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Florent Xicluna
Florent Xicluna added the comment: LGTM too. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge
Meador Inge added the comment: Python 2 patch looks OK too. I will commit these later today. Thanks for the patches! -- ___ Python tracker ___ ___

[issue730473] Add Py_AtInit() startup hook for extenders

2012-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patrick, its been 5 years since you promised a 2nd patch (which would now have to be against the current 3.3 tip). If you have lost interested, perhaps we should close this. -- nosy: +terry.reedy versions: +Python 3.4 -Python 3.2

[issue14815] random_seed uses only 32-bits of hash on Win64

2012-06-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1229239] optionally allow mutable builtin types

2012-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Greg, I am closing this because you seem to have found an alternate solution and have dropped the issue. If you do want to pursue a change for 3.4, I suggest you refresh your patch and post to python-ideas (new list since you posted this). As a limited resour

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The Python 3 patch looks OK, except that several of the tests are duplicated. What tests? -- ___ Python tracker ___ __

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge
Meador Inge added the comment: Nevermind, the tests are OK. I missed the swapped quotes. -- ___ Python tracker ___ ___ Python-bugs-l

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Meador Inge
Meador Inge added the comment: The Python 3 patch looks OK, except that several of the tests are duplicated. I am looking at the Python 2 patch now. -- ___ Python tracker ___

[issue14874] Faster charmap decoding

2012-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f3a5308f50b by Antoine Pitrou in branch 'default': Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. http://hg.python.org/cpython/rev/8f3a5308f50b -- nosy: +python-dev ___ Python track

[issue14874] Faster charmap decoding

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the patch! Now pushed to 3.3. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patches updated with tests. -- Added file: http://bugs.python.org/file26031/tokenize_bytes_py2-2.patch Added file: http://bugs.python.org/file26032/tokenize_bytes_py3-2.patch ___ Python tracker

[issue14928] Fix importlib bootstrapping issues

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for the "separate C executable" approach. There are a couple of small complications in order to avoid any circular dependency (either at the Makefile level, or at the _frozen_importlib / Py_Initialize level). The proposed "-X" or BOOTSTRAP_PY

[issue15036] mailbox.mbox fails to pop two items in a row, flushing in between

2012-06-16 Thread R. David Murray
R. David Murray added the comment: "Mailbox no longer throws an error if a flush is done between operations when removing or changing multiple items in mbox, MMDF, or Babyl mailboxes." -- ___ Python tracker _

[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: __sizeof__ is supposed to account for just the object, not for the size of any object it refers to. If you want to compute total memory consumption, you should get a list of all objects, and then sum up __sizeof__. If some object would also include some of i

[issue14657] Avoid two importlib copies

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Unless someone plans to do further work on this, I'd like to commit unique_importlib3.patch. A working solution is better than nothing. -- ___ Python tracker

[issue15062] argparse: option for a positional argument

2012-06-16 Thread Georg Brandl
Georg Brandl added the comment: What alternate syntax would you suggest for a "find" type command then (other than replacing "-long" by "--long")? -- nosy: +georg.brandl ___ Python tracker ___

[issue15036] mailbox.mbox fails to pop two items in a row, flushing in between

2012-06-16 Thread Petri Lehtinen
Petri Lehtinen added the comment: Yes, this is what I tried to say. It's hard for me to find a good wording, so what would you suggest? I also noticed now that there's a typo in the commit messages. But those cannot be fixed anymore. -- ___ Python t

[issue15086] Ubuntu bot: error while loading shared libraries

2012-06-16 Thread Stefan Krah
New submission from Stefan Krah : The Ubuntu shared buildbot fails to run the tests: using PTY: True ./python: error while loading shared libraries: libpython3.3dm.so.1.0: cannot open shared object file: No such file or directory make: *** [Python/importlib.h] Error 127 034c814eb187 was O.K

[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Eli Bendersky
Eli Bendersky added the comment: Out of curiosity, why don't the constituents of Element (i.e. the tag, the attributes dict, etc.) count for its size? -- ___ Python tracker ___

[issue15063] Source code links for JSON documentation

2012-06-16 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15008] PEP 362 "Signature Objects" reference implementation

2012-06-16 Thread Éric Araujo
Éric Araujo added the comment: One small thing: can we find a name for the function that starts with a verb? It’s the recommended naming style for functions, and would help making a difference between the class and the function. I also expect people to use “signature” and “sig” for their in

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +meador.inge stage: needs patch -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2012-06-16 Thread George Stephanos
George Stephanos added the comment: I can confirm that. I built a 1.0.1c version of both _ssl.pyd and _ssl.lib and now the problem's solved (they're attached if ever needed). Thanks! Can't the next Python 2.7 release include 1.0.1c instead ? -- Added file: http://bugs.python.org/file2

[issue14874] Faster charmap decoding

2012-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15062] argparse: option for a positional argument

2012-06-16 Thread Éric Araujo
Éric Araujo added the comment: I wouldn’t use the syntax used by find, dd or other very old and peculiar commands as an example for anything new :) -- nosy: +eric.araujo ___ Python tracker ___

[issue15063] Source code links for JSON documentation

2012-06-16 Thread Éric Araujo
Éric Araujo added the comment: The source links were added by Raymond for selected modules that he judged readable, well-written and useful companions to the documentation. For the json.encoder and decoder modules, I don’t think this is the case: the rst doc should explain well the behavior

[issue14850] The inconsistency of codecs.charmap_decode

2012-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15048] Manually Installed Python Includes System Wide Paths

2012-06-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-06-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14055] Implement __sizeof__ for etree Element

2012-06-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-06-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue805255] remove/discard method for dict objects.

2012-06-16 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is an even better patch for Python 3. -- Added file: http://bugs.python.org/file26028/tokenize_bytes_py3.patch ___ Python tracker __

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26027/tokenize_bytes_py3.patch ___ Python tracker ___ ___ Python-bugs-l

[issue9679] unicode DNS names in urllib, urlopen

2012-06-16 Thread Florent Xicluna
Florent Xicluna added the comment: The werkzeug.urls module has examples of such conversion IRI-to-URI: https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/urls.py#L109,L205 -- ___ Python tracker ___

[issue15085] set.union accepts not set iterables for all but the first argument.

2012-06-16 Thread R. David Murray
R. David Murray added the comment: By calling 'set.union' you are calling the method on the class. When you call a method directly on a class object, you have to explicitly pass in 'self'. Thus the first argument when you call it like that must be a set object. -- nosy: +r.david.mur

[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread R. David Murray
R. David Murray added the comment: Note that the implementation of makedirs exist_ok has a significant bug (issue 13498) which renders it mostly useless in practice. Parties interested in this issue might be interested in figuring out how to fix that bug :) -- nosy: +r.david.murray

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is a better patch for Python 3. -- Added file: http://bugs.python.org/file26027/tokenize_bytes_py3.patch ___ Python tracker ___

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26025/tokenize_bytes.patch ___ Python tracker ___ ___ Python-bugs-list

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for Python 2. -- Added file: http://bugs.python.org/file26026/tokenize_bytes_py2.patch ___ Python tracker ___ ___

[issue14992] os.makedirs expect_ok=True test_os failure when directory has S_ISGID bit set

2012-06-16 Thread R. David Murray
R. David Murray added the comment: See also issue 13498. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch (for Python 3.3). -- keywords: +patch nosy: +storchaka Added file: http://bugs.python.org/file26025/tokenize_bytes.patch ___ Python tracker _

[issue15054] bytes literals erroneously tokenized

2012-06-16 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue15075] XincludeTest failure in test_xml_etree

2012-06-16 Thread Eli Bendersky
Eli Bendersky added the comment: No need, the cause for the segfault is known. What happens is that Element objects from the Python module get intermixed with Element objects from the C module, and these are incompatible. The C module traversal functions assume they can cast Elements to a kno

[issue15050] Python 3.2.3 fail to make

2012-06-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Martin, do I understand that you are saying that this is not a Python > problem, and should be closed? No. I'm saying that I don't know whether it's a Python problem. It hasn't been fully analyzed. I actually only suspect that it's a misconfiguration. -

[issue15050] Python 3.2.3 fail to make

2012-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Martin, do I understand that you are saying that this is not a Python problem, and should be closed? -- nosy: +terry.reedy ___ Python tracker

[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: I agree that this is already covered by the exist_ok parameter (which is new to 3.2). Existing code just hasn't been ported to this API. -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: I looked into the code. Assuming it should be added, we're facing the fact that os.mkdir() is C code ATM and the handling of the error would require to implement it for NT and Unix separately. Therefore it would make sense to add a Python os.mkdir() that han

[issue15085] set.union accepts not set iterables for all but the first argument.

2012-06-16 Thread Stefan Krastanov
New submission from Stefan Krastanov : >>> set.union(set([1,2]), [3]) set([1, 2, 3]) >>> set.union([1,2], [3]) TypeError: descriptor 'union' requires a 'set' object but received a 'list' It seems a bit inconsistent. Is it justified somehow? -- components: None messages: 162962 nosy: k

[issue15068] fileinput requires two EOF when reading stdin

2012-06-16 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thank you for pushing. :-) Are you interested in a faster UTF-32 codec? Not much :) I know you posted issues on that, but I think UTF-32 is quite low priority. -- ___ Python tracker

[issue15026] Faster UTF-16 encoding

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for pushing. :-) Are you interested in a faster UTF-32 codec? -- ___ Python tracker ___ __

[issue15084] Add option to os.mkdir to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- title: Add option to os.makefile to not raise an exception for existing directories -> Add option to os.mkdir to not raise an exception for existing directories ___ Python tracker

[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Hynek Schlawack
Hynek Schlawack added the comment: +1. Raymond, is there a reason you put that for 3.4? I'd try to get it in before beta1 next week, it's trivial enough. Regarding the name: os.makedirs() uses exist_ok, we shouldn't invent new ones. -- assignee: -> hynek nosy: +hynek __

[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree. First, the use of parameter is shorter (1 line instead of 4). Second, try/except idiom hides possible real OS errors (no rights to create the directory, a non-directory file with the same name already exists, illegal filename, too long patch, etc.).

[issue15075] XincludeTest failure in test_xml_etree

2012-06-16 Thread Florent Xicluna
Florent Xicluna added the comment: > File "/home/eliben/python-src/33/Lib/test/regrtest.py", line 710 in main > File "/home/eliben/python-src/33/Lib/test/regrtest.py", line 1829 in > > File "/home/eliben/python-src/33/Lib/runpy.py", line 75 in _run_code > File "/home/eliben/python-src/

[issue15084] Add option to os.makefile to not raise an exception for existing directories

2012-06-16 Thread Raymond Hettinger
New submission from Raymond Hettinger : I commonly see the code pattern: try: os.mkdir(dirname) except OSError: pass It would be nice to have this instead: os.mkdir(dirname, ignore_if_existing=True) There's probably a better name for the keyword argument, but it communicates the i