[issue19944] Make importlib.find_spec load packages as needed

2014-01-05 Thread Eric Snow
Eric Snow added the comment: Brett: What do you think about moving importlib.find_spec() to importlib.util? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19944 ___

[issue20129] 3.4 on windows 7 can't import IntEnum

2014-01-05 Thread Mark Lawrence
Mark Lawrence added the comment: Bah humbug just found an old enum.py file hanging around. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20129

[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-05 Thread Larry Hastings
Larry Hastings added the comment: I can accept the fourth patch in its current state. Is that a rollup patch, including all the previous patches, or is it independent? Is there a patch I can look at for this new API? -- ___ Python tracker

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread STINNER Victor
New submission from STINNER Victor: On old FreeBSD platforms (FreeBSD 6), concurrent.futures cannot be used and fail with an ImportError because of a limit on POSIX semaphores: see issue #10798. (See also maybe issue #10348 multiprocessing: use SysV semaphores on FreeBSD closed as WONTFIX.)

[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2014-01-05 Thread Stefan Krah
Stefan Krah added the comment: The buildbot runs --without-doc-strings. Usually you just have to add the @requires_docstrings decorator to some tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20128

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as the patch becomes too complicated, I propose minimalist patch which fixes only this issue. I.e. IDLE will no longer silently closed when paste some unusual text (non-BMP on Windows or illegal UTF-8 on Linux). It fixes converting Tcl string to

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: I completely lost track which problem is being solved here. Is it still IDLE crashes when pasting non-BMP unicode char on Py3? If so, how is this patch solving it? IMO, the issue shouhldn't have been reopened. Instead, a new issue should have started.

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread Andreas Kloeckner
New submission from Andreas Kloeckner: For tests and doctests, it is often desirable to show or verify that a certain warning occurs. Unfortunately, if the warning has been hit previously, it will not be issued again. It would be great if there were a documented, unified way to reset this

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread Andreas Kloeckner
Changes by Andreas Kloeckner inf...@tiker.net: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20131 ___ ___

[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2014-01-05 Thread Martin Panter
Martin Panter added the comment: The Issue 12692 fix has been backported to the 3.3 branch, and it fixes this bug. However here is an updated patch (against revision 28337a8fb502 in the “3.3” branch) consisting of two left over bits you might still want to use: 1. My test case 2. Explicitly

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-05 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___ Python-bugs-list

[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-05 Thread Martin Panter
New submission from Martin Panter: Many of the incremental codecs do not handle fragmented data very well. In the past I think I was interested in using the Base-64 and Quoted-printable codecs, and playing with other codecs today reveals many more issues. A lot of the issues reflect missing

[issue8796] Deprecate codecs.open()

2014-01-05 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list

[issue19548] 'codecs' module docs improvements

2014-01-05 Thread Martin Panter
Martin Panter added the comment: Addition to the list of improvements: * Under codecs.IncrementalEncoder.reset() it mentions calling encode('', final=True). This call does not work as written for the byte encoders in my experience, because they do not accept empty text strings. Perhaps it

[issue19885] lzma segfault when __init__ with non-existent file after executing the constructor (Python 2.7)

2014-01-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, sorry guys. The python 2.7 lzma binding is Fedora specific one. I already submitted bug there: https://bugzilla.redhat.com/show_bug.cgi?id=1048581 -- resolution: - invalid status: pending - open ___ Python

[issue19885] lzma segfault when __init__ with non-existent file after executing the constructor (Python 2.7)

2014-01-05 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19885 ___ ___

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: That doesn't sound like a very good idea, only to support FreeBSD 6. Synchronous execution blocks the event loop waiting for I/O, which basically destroys the point of having an event loop. Let users of FreeBSD 6 upgrade their systems instead, IMHO.

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2f81f0e331f6 by Ethan Furman in branch 'default': Issue19995: %o, %x, %X now only accept ints http://hg.python.org/cpython/rev/2f81f0e331f6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Ethan Furman
Ethan Furman added the comment: I was travelling yesterday and wasn't sure about the time stamp. Looks like I missed the 12-hour cutoff. Let me know if I should backout the commit. -- ___ Python tracker rep...@bugs.python.org

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ethan, I thought we were going the deprecation route? This *will* break code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___

[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2014-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is still the same issue. The root of issue is in converting strings when passed to Python-implemented callbacks. When a text is pasted in IDLE window, the callback is called (for highlighting). The callback is a command created by Tcl_CreateCommand

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: (also, there are typos: shuld, psuedo) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___

[issue20132] Many incremental codecs don’t handle fragmented data

2014-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +doerwalter, haypo, lemburg, loewis, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20132 ___

[issue19548] 'codecs' module docs improvements

2014-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +doerwalter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19548 ___ ___ Python-bugs-list

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2014-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +doerwalter, lemburg, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881 ___ ___

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Larry Hastings
Larry Hastings added the comment: Antoine: I made the call to bite the bullet and fix it. If that's a terrible idea we can change it before RC1. But from my (admittedly dim) understanding of the issue, we're going to have to fix this sooner or later, and sooner is probably better. If by

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Larry Hastings
Larry Hastings added the comment: And, yes, Ethan's checkin missed the cutoff for beta 2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Ethan Furman
Ethan Furman added the comment: I think the code-breakage issue is that although this is a bug now, it did not use to be a bug. (Or maybe it was always a bug, but nobody noticed -- I don't know when hex() and oct() were introduced.) Basically, having %o and %x work with floats was the

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread R. David Murray
R. David Murray added the comment: Given that even the stdlib used it, there is no question in my mind that a deprecation period is required. We don't just arbitrarily break peoples code on purpose, we give them at least a release in which to fix it first. --

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Keep in mind that with new-style division, it's easy to get a float even if all your inputs are ints. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread STINNER Victor
STINNER Victor added the comment: 2014/1/5 Antoine Pitrou rep...@bugs.python.org: That doesn't sound like a very good idea, only to support FreeBSD 6. Well, if the patch is rejected here, I will propose it in Tulip, or I will keep it only in Trollius (the port on Python 2.7). The idea of this

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Ethan Furman
Ethan Furman added the comment: I'll switch it to a deprecation warning instead sometime this week. The changes to datamodel.rst and tarfile.py should stay, I think. test_format and test_unicode will both verify current* behavior and check for the deprecation warning, and unicodeobject.c will

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread R. David Murray
R. David Murray added the comment: The easy answer for unittest is to use assertWarns. For versions where that doesn't exist you could implement the same technique yourself. Exposing a 'clear everything' function in the warnings module might not be a bad idea, but otherwise for doctest I'd

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread lo...@blossomhillranch.com
lo...@blossomhillranch.com added the comment: i saw that issue before i submitted this one, but it says it was fixed a year ago. i assumed a patch from a year ago would be in 3.3.1. when i see an issue closed with a patch accepted, how do i determine which python version will contain that

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread STINNER Victor
STINNER Victor added the comment: Here is an implementation of a synchrounous executor: https://bitbucket.org/haypo/trollius/commits/1bc2c23854e6717007a5a6df42470afa49c79b99 The changes are larger than what I expected. On Python 3.4, if concurrent.futures is only missing on FreeBSD 6, I agree

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Merely from reading the docs, including the hex() and {}.format sections, I consider the current '%x' % 1.5 == '1' a bug in that I would expect either a Type or Value Error or a hex fraction(!) ('1,8') matching the core of the output of float.hex(1.5). But

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an implementation of a synchrounous executor: https://bitbucket.org/haypo/trollius/commits/1bc2c23854e6717007a5a6df42470afa49c79b99 Where is executor.py? -- ___ Python tracker rep...@bugs.python.org

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread STINNER Victor
STINNER Victor added the comment: Where is executor.py? Hum, maybe I forgot to push it :-) https://bitbucket.org/haypo/trollius/src/tip/asyncio/executor.py?at=trollius Code of the synchronous executor:

[issue20130] asyncio: implement a synchronous executor if concurrent.futures is missing

2014-01-05 Thread STINNER Victor
STINNER Victor added the comment: https://bitbucket.org/haypo/trollius/src/8f28756d63c2c9f09c3a7c1df420796eca9ff08b/asyncio/executor.py?at=trollius#cl-60 Oh, there was a forgotten raise instruction. I added it to test the exception case, but it looks like this case is not tested by asyncio

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-05 Thread Matthias Klose
Matthias Klose added the comment: Victor, what should be returned if the code name is not set? None, empty string, or the description field of the lsb-release file? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1322

[issue19732] python fails to build when configured with --with-system-libmpdec

2014-01-05 Thread Stefan Krah
Stefan Krah added the comment: I’ve released mpdecimal-2.4.0: http://www.bytereef.org/mpdecimal/download.html sha256sum: == 996c73b63868699c4f86694671bd7ff3d1a8a88d8af2c22a5abe0c9a5845cf75 mpdecimal-2.4.0.tar.gz On obscure architectures I would recommend to run `make check`

[issue19732] python fails to build when configured with --with-system-libmpdec

2014-01-05 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19732

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf077fc97fdd by R David Murray in branch '2.7': #1065986: Make pydoc handle unicode strings. http://hg.python.org/cpython/rev/bf077fc97fdd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread R. David Murray
R. David Murray added the comment: Committed, thanks Akira. The support for --disable-unicode is not fully tested. I tried running the tests but the _io module wasn't built, so regrtest doesn't work. A command line invocation of pydoc worked fine, though. -- resolution: - fixed

[issue20133] Convert the audioop module to use Argument Clinic

2014-01-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which converts the audioop module to use Argument Clinic. 26 functions are converted. Also it adds docstrings for audioop functions. There are two problems: * Test test_string crashes. Perhaps here is a bug in Argument Clinic (Py_buffer

[issue19944] Make importlib.find_spec load packages as needed

2014-01-05 Thread Brett Cannon
Brett Cannon added the comment: Moving to importlib.util is fine by me. I put find_loader() to mirror import_module(), but honestly the former is much less used compared to the latter, so moving it to importlib.util makes sense. -- ___ Python

[issue1065986] Fix pydoc crashing on unicode strings

2014-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset e57660acc6d4 by R David Murray in branch '2.7': #1065986: add missing error handler in pydoc unicode fix. http://hg.python.org/cpython/rev/e57660acc6d4 -- ___ Python tracker rep...@bugs.python.org

[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2014-01-05 Thread Brett Cannon
Brett Cannon added the comment: I say just be patient and wait. No need to rush this as load_module() is still allowed to exist and be used. And if I manage to create SpecLoader than even new-fangled loaders and get load_module() for free. -- ___

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread R. David Murray
R. David Murray added the comment: Search for the issue number in Misc/NEWS. It looks like it was indeed included in 3.3.1. Can you figure out why that fix didn't fix your problem? -- resolution: duplicate - stage: committed/rejected - status: closed - open superseder:

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20126 ___ ___

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is because the scheduler already has executed first event and slept on delaying second event before you have added third event. This is unavoidable for this implementation. sched.scheduler can't be waked when sleep. --

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread lo...@blossomhillranch.com
lo...@blossomhillranch.com added the comment: i looks like a different issue. 16165 says you can't add events while the scheduler is running. in my case, i can add them, but they don't run at the correct time. i'll guess at what the problem is... when you start the scheduler, the thread

[issue20126] sched doesn't handle events added after scheduler starts

2014-01-05 Thread lo...@blossomhillranch.com
lo...@blossomhillranch.com added the comment: ok, makes sense. can we put a note in the manual about this limitation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20126 ___

[issue20134] typo: s/coping/copying/

2014-01-05 Thread INADA Naoki
New submission from INADA Naoki: http://docs.python.org/3.3/library/unittest.mock-examples.html#coping-with-mutable-arguments coping should be copying? -- assignee: docs@python components: Documentation messages: 207409 nosy: docs@python, naoki priority: normal severity: normal status:

[issue20135] mutate list

2014-01-05 Thread Xiaoqing Rong
New submission from Xiaoqing Rong: I was using IDLE (Python GUI) for Python 3.3.3. I don't know if this is a bug or you guys intend it to be this way: x=[1,2] y=x y.append(3) x [1, 2, 3] personally i'd prefer x stays as [1,2] when i'm trying to mutate y also: def f1(m,n=['haha']):

[issue20135] mutate list

2014-01-05 Thread R. David Murray
R. David Murray added the comment: Both of these are FAQs, but to my surprise there don't seem to be answers to them in the FAQ list. We should add some. Yes, both of these behaviors is intentional. The first is an important part of the language design: 'variable' names are just pointers to

[issue20134] typo: s/coping/copying/

2014-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: No, see https://en.wiktionary.org/wiki/cope -- nosy: +benjamin.peterson resolution: - later status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20134

[issue20134] typo: s/coping/copying/

2014-01-05 Thread Benjamin Peterson
Changes by Benjamin Peterson bp+pyb...@benjamin-peterson.org: -- resolution: later - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20134 ___

[issue20121] quopri_codec newline handling

2014-01-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: The quopri_codec uses binascii.b2a_qp method. binascii.b2a_qp('\r\n\n\n\n') '\r\n\r\n\r\n\r\n' The logic in b2a_qp when dealing with newlines is check whether the first line uses \r\n or \n. If it uses \r\n, then all remaning lines' new lines will be

[issue19977] Use surrogateescape error handler for sys.stdin and sys.stdout on UNIX for the C locale

2014-01-05 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: Nick: Sure, once there is an upstream solution that people have agreed on, I'll look into backporting it, NP. Thanks for letting me know about this. -- ___ Python tracker rep...@bugs.python.org