[issue16423] urllib data URL

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16423 ___

[issue16470] Backport set and dictionary comprehensions in tutorial to 2.7

2012-11-16 Thread Yongzhi Pan
Yongzhi Pan added the comment: I updated the patch according to the code review. Hope now it is OK. -- Added file: http://bugs.python.org/file27995/set_and_dict_comprehensions_1.diff ___ Python tracker rep...@bugs.python.org

[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-16 Thread Mark Dickinson
Mark Dickinson added the comment: I guess the feeling of wrongness for me mostly comes from the floating-point world, where the IEEE 754 'overflow' floating-point exception is only appropriate for cases where the result is *finite* but so large that it falls outside the representable range

[issue16475] Support object instancing and recursion in marshal

2012-11-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: This change is specifically aimed at code objects. As it is, it is impossible to produce code objects that share common data (e.g. filename strings, common tuples, name strings, etc) that don't unserialize to separate objects. Also, separately but

[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There's also the minor practical inconvenience of having to remember to catch OverflowError *and* ValueError in try: .. except: constructs. And MemoryError (for big decimals). Might be the best solution would be raising an exception which subclasses both

[issue15767] add ModuleNotFoundError

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: I prefer ModuleNotFound. Its meaning is already clear enough, even without the Error suffix. OTOH we now have FileNotFoundError, but all the other OSError subclasses have that suffix. In general I think the suffix is necessary when it's not already clear from

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-11-16 Thread Christoph Gohlke
Changes by Christoph Gohlke cgoh...@uci.edu: -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16296 ___ ___ Python-bugs-list

[issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree

2012-11-16 Thread Marius Gedminas
New submission from Marius Gedminas: Do this: pydoc2.7 xml.etree.ElementTree then click on the MODULE DOCS link, which is http://docs.python.org/library/xml.etree.ElementTree You're redirected to http://docs.python.org/2/library/xml.etree.ElementTree which is a 404 page. --

[issue16478] Fix division in tabnanny

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? Should we add tests for tabnanny? I tried to get an error from tabnanny but the only thing I got was a ResourceWarning (that can be easily fixed by a finally: f.close() near

[issue16296] Patch to fix building on Win32/64 under VS 2010

2012-11-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why did you put 3.2 into the version list? 3.2 doesn't use VS 2010. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16296 ___

[issue16478] Fix division in tabnanny

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch looks OK, buy can you provide a way to reproduce the error (if you get any)? No, I have not any. I am even not sure tabnanny works at all. But this bug is obvious. So, let's fix it and go on. Should we add tests for tabnanny? This will be

[issue16478] Fix division in tabnanny

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: I can't see a ResourceWarning. A finally: f.close() already exists near the end of the check() method. Looks like it was added in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16478

[issue16478] Fix division in tabnanny

2012-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset fc17fdd42c66 by Ezio Melotti in branch '3.2': #16478: use floor division in tabnanny and fix a ResourceWarning. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/fc17fdd42c66 New changeset d7558e4015a4 by Ezio Melotti in branch '3.3':

[issue16478] Fix division in tabnanny

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: Applied the patch on all 3 branches and fixed the resource warning in 3.2. Thanks for the report and the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue16481] process handle leak on windows in multiprocessing

2012-11-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: Fixed in c574ce78cd61 and cb612c5f30cb. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16481

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Aifc_write.close() can raise exception and left the internal file object not closed. The patch closes the file object even in case of error and reset _file to None even in case of the file object close() raises an exception, so that Aifc_write.close()

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27996/aifc_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16485 ___

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +r.david.murray Added file: http://bugs.python.org/file27997/aifc_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16485

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27998/aifc_close-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16485 ___

[issue16485] FD leaks in aifc module

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: Adding with support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add with support to any part of the public API? -- nosy: +ezio.melotti stage: - patch review

[issue16485] FD leaks in aifc module

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: Adding with support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add with support to any part of the public API? -- nosy: +ezio.melotti stage: - patch review

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27998/aifc_close-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16485 ___

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I miss that test_close() already exists. Merged. -- Added file: http://bugs.python.org/file27999/aifc_close.patch Added file: http://bugs.python.org/file28000/aifc_close-2.7.patch ___ Python tracker

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27997/aifc_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16485 ___

[issue16486] Add context manager support to aifc module

2012-11-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch adds context manager support aifc module. Now objects returned by aifc.open() will support context manager protocol. This issue required first fixing issue16485 to pass tests. -- components: Library (Lib) files:

[issue16486] Add context manager support to aifc module

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +FD leaks in aifc module nosy: +r.david.murray stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16486

[issue16485] FD leaks in aifc module

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Adding with support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API. Does this change (indirectly) add with support to any part of the public API? Don't pay attention, it was a wrong patch. For with

[issue11287] Add context manager support to dbm modules

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I added comments in Rietveld. -- nosy: +serhiy.storchaka stage: commit review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11287 ___

[issue16475] Support object instancing and recursion in marshal

2012-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: This change is specifically aimed at code objects. As it is, it is impossible to produce code objects that share common data (e.g. filename strings, common tuples, name strings, etc) that don't unserialize to separate objects. Shouldn't strings be interned

[issue16487] Allow ssl certificates to be speficfied from memory rather than files.

2012-11-16 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson: The _ssl module (and indeed the openssl lib) relies heaviliy on actual filesystem locations to load certificates. A client or a server may not want to rely on physical filesystem locations to load certificates for authentication or verification.

[issue16487] Allow ssl certificates to be speficfied from memory rather than files.

2012-11-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: (the patch contains a local change to set the location of the 'external' dir, please disregard this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16487

[issue16488] Add context manager support to epoll object

2012-11-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch adds support of context manager protocol to epoll objects. -- components: Extension Modules files: select_epoll_context_manager.patch keywords: patch messages: 175693 nosy: serhiy.storchaka priority: normal severity: normal stage:

[issue15346] Tkinter extention modules have no documentation

2012-11-16 Thread Daniel Swanson
Changes by Daniel Swanson popcorn.tomato.d...@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15346 ___ ___

[issue11287] Add context manager support to dbm modules

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it will be better to call the close() method from the __exit__() method using _PyObject_CallMethodId(). It will allow to overload the close() method and get working context manager without overloading the __exit__() method. See issue16488 for

[issue15346] Tkinter extention modules have no documentation

2012-11-16 Thread Daniel Swanson
Changes by Daniel Swanson popcorn.tomato.d...@gmail.com: -- status: languishing - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15346 ___ ___

[issue16475] Support object instancing and recursion in marshal

2012-11-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Basically, reuse of strings (and preservation of their internment status) fell by the wayside somewhere in the 3.x transition. Strings have been reused, and interned strings re-interned, since protocol version 1 in 2.x. This patch adds that feature

[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-11-16 Thread Stefan Krah
Stefan Krah added the comment: OK, here's a patch. Specifics: o Except for the number methods, decimal.py and _decimal should behave identically now. o _decimal actually requires an additional context arg in same_quantum(), compare_total(), compare_total_mag() and copy_sign(). This

[issue16323] Wrong C API documentation for locale encoding

2012-11-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16323 ___ ___

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Xavier de Gaye
New submission from Xavier de Gaye: Create the following tree: foo.py mypackage __init__.py and get a loader for the non existent module 'mypackage.foo'. $ mkdir tmp $ cd tmp $ foo.py $ mkdir mypackage $ mypackage/__init__.py $ ./python Python 3.4.0a0 (default:53a7c2226a2b,

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: And yes, find_loader returns None, when correctly invoked with the path argument: importlib.find_loader('mypackage.foo', ['./mypackage/']) -- ___ Python tracker rep...@bugs.python.org

[issue15767] add ModuleNotFoundError

2012-11-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: To state more explicitly the observation I alluded to in my comment above, we currently follow (without exception -- pun intended :) ) the convention that subclasses of exceptions that end in Error also end in Error. We also do the same with the suffix

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread R. David Murray
R. David Murray added the comment: Not necessarily. The fact that there is nothing to load doesn't mean it isn't the right loader if there *was* something to load. But I'll leave it to the import experts to say what the expected behavior is. I'll admit that I can't figure it out from a

[issue16487] Allow ssl certificates to be speficfied from memory rather than files.

2012-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: (the patch contains a local change to set the location of the 'external' dir, please disregard this. Can you upload a cleaned up patch then? :) -- components: +Library (Lib) -Extension Modules nosy: +pitrou stage: - patch review

[issue16488] Add context manager support to epoll object

2012-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think that's very useful since generally the epoll object will have to survive accross function calls (it's usually stored as an attribute somewhere on your event loop). On the other hand, this addition doesn't hurt. -- nosy: +pitrou

[issue15767] add ModuleNotFoundError

2012-11-16 Thread Ezio Melotti
Ezio Melotti added the comment: That seems indeed to be the case with built-in exceptions. I'm not sure if it's intentional or just a coincidence. I agree that warnings should always have a Warning suffix to distinguish them from exceptions, but in the stdlib the Error suffix is not used

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Everything is working as expected; you left out the path argument:: importlib.find_loader('package.foo', ['package']) This works the way it does because otherwise we would have to stat every single time from the top level on down and that is extremely costly.

[issue15031] Split .pyc parsing from module loading

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: In order to have exceptions that have messages like bad magic number in module there would need to be a technically unneeded fullname parameter. People cool with that? I personally dislike having info passed in just for error reporting, but in this case import

[issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree

2012-11-16 Thread Georg Brandl
Georg Brandl added the comment: The redirect is not the problem. The page never existed. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16484 ___

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: Maybe find_loader could check its parameters, notice that the name is a dotted name, that path is None and in this case, not return a loader ? -- ___ Python tracker rep...@bugs.python.org

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: That won't work as frozen and builtin modules don't care about the path. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16489 ___

[issue16487] Allow ssl certificates to be speficfied from memory rather than files.

2012-11-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Can't right now. It's only relevant for pcbuild anyway so you can test it for Unix if you want without fear. Don't worry, I always give my patches a cleanup before committing them. Meanwhile, I'd welcome comments on the substance. --

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: Not necessarily. The fact that there is nothing to load doesn't mean it isn't the right loader if there *was* something to load. But it is not even the right loader if there *was* something to load, as get_filename() returns './foo.py' which is wrong even if

[issue15031] Split .pyc parsing from module loading

2012-11-16 Thread Eric Snow
Eric Snow added the comment: Don't underestimate the potential value of having the fullname when overriding the method in a subclass. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15031

[issue16461] wave module: wrong integer format

2012-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The Wikipedia sentence The WAV format is limited to files that are less than 4 GB, because of its use of a 32-bit unsigned integer to record the file size header is unambiguous and appears correct (see below). The rest of the Wikipedia sentence (some programs

[issue16484] Missing/broken documentation redirect for http://docs.python.org/library/xml.etree.ElementTree

2012-11-16 Thread Marius Gedminas
Marius Gedminas added the comment: A working link is http://docs.python.org/2/library/xml.etree.elementtree.html or http://docs.python.org/2/library/xml.etree.elementtree (with no .html at the end). Looks like capitalization is causing a problem. Did these pydoc links ever work? Would it be

[issue16477] tarfile fails to close file handles in case of exception

2012-11-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Would with source = self.extractfile(tarinfo): work? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16477 ___

[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned

2012-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for 3.x. It unify behavior of Python and C implementations and unify behavior on 32- and 64-bit platforms. For backward compatibility Pickler can pickle up to 2G data, but Unpickler can unpickle up to 4G on 64-bit. -- keywords:

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: If one would want to fix this, one way to do it could be to change the following two methods of the PathFinder class such that: find_module() does not set path to sys.path when its path argument is None, so as to keep this information for _get_loader()

[issue16465] dict creation performance regression

2012-11-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16465 ___ ___ Python-bugs-list

[issue16471] upgrade to sphinx 1.1

2012-11-16 Thread STINNER Victor
STINNER Victor added the comment: According to the changelog, Sphinx 1.1 now supports Python 3. Cool! Doc/Makefile may be modified to use PYTHON = python3. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16471

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Feel free to submit a patch, but I'm personally not motivated enough to try to change this on my own. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16489

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: It might be more motivating if you (Xavier de Gaye) could let us know of a real-world problem caused by this behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16489

[issue16461] wave module: wrong integer format

2012-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset b8ece33ce27d by Jesus Cea in branch '2.7': Closes #16461: Wave library should be able to deal with 4GB wav files, and sample rate of 44100 Hz. http://hg.python.org/cpython/rev/b8ece33ce27d New changeset 542bf1c1f2e3 by Jesus Cea in branch '3.2':

[issue15031] Split .pyc parsing from module loading

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Attached is a patch that introduces _LoaderBasics.parse_bytecode_file(). It takes in basically what _bytes_from_bytecode() did plus a keyword-only boolean flag for exception suppression as that's needed to ignore stale bytecode when source is available. I

[issue16461] wave module: wrong integer format

2012-11-16 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Thanks to Christian for the report and to Terry for digging the spec. Patched. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16461 ___

[issue16453] Inconsistent dead weakref equality

2012-11-16 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16453 ___ ___ Python-bugs-list mailing list

[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}

2012-11-16 Thread Ned Deily
Ned Deily added the comment: What problem are you trying to solve here? pyvenv is working as documented. And, although pyvenv does not claim to be compatible with the third-party virtualenv package, as far as I know virtualenv does not create links for local/bin and friends either.

[issue16490] inspect.getargspec() and inspect.getcallargs() don't work with builtins

2012-11-16 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: Yesterday I was attending a conference about a MOCK like library and the speaker told us about some inspect functionalities not working correctly with builtins. For instance: Python 3.3.0 (default, Oct 2 2012, 02:07:16) [GCC 4.4.3] on linux Type help,

[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins

2012-11-16 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- title: inspect.getargspec() and inspect.getcallargs() don't work with builtins - inspect.getargspec() and inspect.getcallargs() don't work for builtins ___ Python tracker rep...@bugs.python.org

[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins

2012-11-16 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list

[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins

2012-11-16 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I am fully aware that the interpreter doesn't know how a method/function written in C is going to parse the parameter list/keywords. And that even if we solve this (for instance, with annotations that create wrappers calling PyArg_Parse() automatically),

[issue16480] pyvenv 3.3 fails to create symlinks for virtualenv/local/{bin, lib} to virtualenv/{bin, lib}

2012-11-16 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16480 ___ ___ Python-bugs-list