[issue15795] Zipfile.extractall does not preserve file permissions

2015-01-05 Thread ABR
ABR added the comment: I hope this can be finally gotten in for 3.5, even if it's not the perfect solution. I hit this issue and needed to call out to a subprocess as a work-around, but that's far less reliable. -- nosy: +arobert ___ Python tracker

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: Not that I think it's worth changing for this case, but I find code like this better written as: if some_test: fl = contextlib.closing(open(sys.argv[1])) else: fl = sys.stdin with fl as fl: do_stuff(fl) This way you don't need another test, the clos

[issue22935] Disabling SSLv3 support

2015-01-05 Thread Ned Deily
Ned Deily added the comment: Setting to release blocker since this needs to be resolved for 3.4.3. FYI, the OS X x86 Tiger 3.4 buildbot has been updated to use a local copy of OpenSSL 1.0.1j with SSLv3 disabled and multiple tests now fail (2.7 and default do not fail, as expected). http://bu

[issue22935] Disabling SSLv3 support

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: I'm going to commit get_server_certificate_sslv23.patch into Python 3.4, so Python 3.4 will just behave like Python 2.7 and 3.5, except if someone complains :-) -- ___ Python tracker

[issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2015-01-05 Thread noon
Changes by noon : -- nosy: -noon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailma

[issue22165] Empty response from http.server when directory listing contains invalid unicode

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1bc41bbbe02d by Ned Deily in branch '3.4': Issue #22165: Skip test_undecodable_filename on OS X prior to 10.5. https://hg.python.org/cpython/rev/1bc41bbbe02d New changeset 85258e08b69b by Ned Deily in branch 'default': Issue #22165: merge from 3.4 h

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-05 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I understand that this issue is far from being important, but this is going to be the fourth unreviewed file in this issue. I noted all your comments to me and fixed the patch accordingly, but ever since November I'm the only one who posts something here. I pi

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-05 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the suggestion, Eric. contextlib.closing(open(...)) looks unnecessary to me. Here is an alternative patch. -- Added file: http://bugs.python.org/file37601/issue18644.diff ___ Python tracker

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: > fl = contextlib.closing(open(sys.argv[1])) I prefer the current code with the explicit close() and "is not sys.stdin", it's less magic :-) -- ___ Python tracker ___

[issue20487] Odd words in unittest.mock document.

2015-01-05 Thread Berker Peksag
Berker Peksag added the comment: Here is a patch to address msg211296. -- keywords: +patch nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: -Python 3.3 Added file: http://bugs.python.org/file37602/issue20487.diff ___ Pytho

[issue20487] Odd words in unittest.mock document.

2015-01-05 Thread Michael Foord
Michael Foord added the comment: Patch looks good, thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Hi. I proposed twice to Ethan to implement the PEP 461, but he replied that he wants to implement it. So, what's the status of the implementation? -- ___ Python tracker __

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-05 Thread Eric V. Smith
Eric V. Smith added the comment: Good point on contextlib.closing not being needed. I usually use this pattern on things that aren't files! On second thought, the with statement will close sys.stdin, so this isn't a valid pattern here. Sorry for the noise. --

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2015-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer the current code (i.e. formatter_fix_resource_warning_v5.patch). In more complex case ExitStack can be used, but here it looks redundant. with contextlib.ExitStack() as stack: if some_test: fl = open(sys.argv[1]) s

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: I would be nice to share as much code as possible with the Unicode implementation. My idea was to add a "_PyBytesWriter" API, very close to the "_PyUnicodeWriter", to share code. Old patch implementing the _PyBytesWriter API: issue #17742 (rejected because it

[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-05 Thread Dmitrijs Ledkovs
New submission from Dmitrijs Ledkovs: # LD_LIBRARY_PATH=`pwd` ./python Lib/test/regrtest.py test_file2k http://bugs.python.org/issue14853 -- messages: 233459 nosy: xnox priority: normal severity: normal status: open title: test_file2k.py depends on sys.stdin being unseekable ___

[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-05 Thread Dmitrijs Ledkovs
Changes by Dmitrijs Ledkovs : -- components: +Installation versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-05 Thread Dmitrijs Ledkovs
Changes by Dmitrijs Ledkovs : -- keywords: +patch Added file: http://bugs.python.org/file37603/issue23168.patch ___ Python tracker ___ ___

[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Removing a test when it doesn't pass is not the correct way to fix a test... I would be better to write it differently to support seekable stdin. Or if it doesn't make sense, skip the test if stdin is seeable. -- nosy: +haypo _

[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-05 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: > Removing a test when it doesn't pass is not the correct way to fix a test... Whilst I agree, this is not what was done in http://bugs.python.org/issue14853 . There it was concluded that the test itself is bogus and tests essentially nothing. --

[issue23169] Reflect that PreReq and BuildPreReq are deprecated in the latest RPM

2015-01-05 Thread Radek Simko
New submission from Radek Simko: When I try to make custom package of Python 2.7, I use the spec file attached in `/Misc/RPM`. I don't really use it to build Python as I want to define some specific options, but I do use it as a source of RPM package meta data which I can simply reuse when cre

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-01-05 Thread Dima Tisnek
Dima Tisnek added the comment: Is there any hope? Surely sqlite backwards compatibility is not an issue any longer... -- nosy: +Dima.Tisnek ___ Python tracker ___

[issue9634] Add timeout parameter to Queue.join()

2015-01-05 Thread Swen Wenzel
Swen Wenzel added the comment: I have another use case. The Docs use the producer-consumer pattern as a usage example. I'm also using this pattern but apparently the consumers are not that stable during development phase. So if one of your consumers dies during execution of its task, before it

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-01-05 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20898] Missing 507 response description

2015-01-05 Thread Demian Brecht
Demian Brecht added the comment: The attached patch is a rework of the http.HTTPStatus docs to include links to the RFCs. While working through this, I noticed that I may have been a little overzealous in inclusion of some of the status codes. Some non-standard codes have been deprecated or co

[issue15795] Zipfile.extractall does not preserve file permissions

2015-01-05 Thread R. David Murray
Changes by R. David Murray : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-01-05 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue20898] Missing 507 response description

2015-01-05 Thread Berker Peksag
Berker Peksag added the comment: LGTM. Great patch, thanks! -- assignee: -> berker.peksag ___ Python tracker ___ ___ Python-bugs-list

[issue23170] test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution

2015-01-05 Thread Dimitri John Ledkov
New submission from Dimitri John Ledkov: Building 3.4.2, running testsuite on linux, test_uuid test_ifconfig_getnode fails as following: [365/388] test_uuid Warning -- sys.path was modified by test_site test test_uuid failed -- Traceback (most recent call last): File "/builddir/build/BUILD/Pyt

[issue9303] Migrate sqlite3 module to _v2 API to enhance performance

2015-01-05 Thread Gerhard Häring
Gerhard Häring added the comment: ok, i will have to look into this -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue23170] test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution

2015-01-05 Thread R. David Murray
R. David Murray added the comment: That traceback doesn't match the uuid.py source, nor has _ifconfig_getnode been modified for quite some time. A line like your traceback says is in _ifconfig_getnode actually appears in _arp_getnode. The arp_getnode test would presumably have the same probl

[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-01-05 Thread Jon Dufresne
New submission from Jon Dufresne: The csv.writer.writerow() does not accept a generator as input. I find this counter-intuitive and against the spirit of similar APIs. If the generator is coerced to a list, everything works as expected. See the following test script which fails on the line "w.

[issue23170] test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution

2015-01-05 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: The source code matches 3.4.2 tarball exactly. There is no arp_getnode test that I can see. 316@unittest.skipUnless(os.name == 'posix', 'requires Posix') 317def test_ifconfig_getnode(self): 318node = uuid._ifconfig_getnode() 319if n

[issue23170] test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution

2015-01-05 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: I guess this is related to http://bugs.python.org/issue17293 however I get a test-suite fail / exception there with 3.4.2 on Linux. -- ___ Python tracker

[issue17293] uuid.getnode() MAC address on AIX

2015-01-05 Thread Dimitri John Ledkov
Dimitri John Ledkov added the comment: I'm getting socket.gaierror from test_ifconfig_getnode / uuid._ifconfig_getnode() on python 3.4.2 on Linux, in a no network environment. Thus i'd like to see these try:/excepts: to be ported back to 3.4 branch, if they haven't been already. I filed http:

[issue23170] test_uuid test_ifconfig_getnode fails with Temporary failure in name resolution

2015-01-05 Thread R. David Murray
R. David Murray added the comment: Ah, I see what happened. Serhiy split _ifconfig_getnode, so when I did an hg annotate it looked like _ifconfig_getnode was untouched, but in fact it had been split to create the _arp_getnode function. So, this report is out of date, this has already been fix

[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-01-05 Thread R. David Murray
R. David Murray added the comment: This seems like a sensible enhancement request to me. It is possible it could even be considered a bug, the docs aren't exactly clear on what 'row' is expected to be. -- keywords: +easy nosy: +r.david.murray stage: -> needs patch type: behavior -> en

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2015-01-05 Thread Demian Brecht
Changes by Demian Brecht : Removed file: http://bugs.python.org/file37481/issue14134.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2015-01-05 Thread Demian Brecht
Demian Brecht added the comment: I withdraw my patch as (I just discovered), it is already possible to effect changes to the underlying connection. What /should/ be done is: transport = Transport() con = transport.make_connection([host]) con.timeout = 2 proxy = ServerProxy([url], transport=tra

[issue23160] Respect the environment variable SVNROOT in external-common.bat

2015-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23160] Respect the environment variable SVNROOT in external-common.bat

2015-01-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-05 Thread Jurijs Vorotilovs
Jurijs Vorotilovs added the comment: Attached a script demonstrating two failing cases -- Added file: http://bugs.python.org/file37605/test.py ___ Python tracker ___

[issue23172] Bad file descriptor error occurs if random library is imported before closing FDs

2015-01-05 Thread Wayne Song
New submission from Wayne Song: The following script: import os import resource import random print("1") for fd in range(resource.getrlimit(resource.RLIMIT_NOFILE)[0]): try: if fd not in range(0, 3): os.close(fd) except os.error: pass print("2") print(os.ur

[issue23172] Bad file descriptor error occurs if random library is imported before closing FDs

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: This issue is a duplicate of the issue #21207 which was already fixed in Python 3.4.1. -- nosy: +haypo resolution: -> duplicate status: open -> closed superseder: -> urandom persistent fd - not re-openned after fd close __

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Oh no. My comment was not published, it was probably an issue with my unstable Internet connection. Here is a patch fixing the issue with an unit test. There is another call to Future.set_result() in subprocess.py not protected by an if in connection_made().

[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: What do you think of my first change, base_event_loop.patch, which exposes BaseEventLoop? I'm going to commit it if nobody reviews it. -- ___ Python tracker __

[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: Sure. I already said LGTM on the patch (http://bugs.python.org/issue23046#msg232783). -- ___ Python tracker ___ _

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: The patch looks good, although the test feels overly complex (but maybe I'm missing something). I'm okay with leaving the other unguarded set_result() call unchanged, but I'm also okay with putting "if not self.waiter.cancelled():" around it. -- __

[issue23166] urllib2 ignores opener configuration under certain circumstances

2015-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I guess there needs to be some generic way to pass ssl information to handlers. -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-05 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: A wild patch appears! Test is included, I'm unhappy with it, because it uses one test method to test all of Sequence, but that's what the test suite does for MutableSequence. -- keywords: +patch nosy: +Devin Jeanpierre Added file: http://bugs.python.

[issue23173] asyncio: kill the subprocess if the creation failed

2015-01-05 Thread STINNER Victor
New submission from STINNER Victor: The creation of a subprocess in asyncio is complex, it is composed of multiple steps (callbacks scheduled by call_soon, coroutines, etc.). The creation can fail because of different reasons. I guess that the most common reason is a cancellation of a task, ex

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: > I'm okay with leaving the other unguarded set_result() call unchanged, but > I'm also okay with putting "if not self.waiter.cancelled():" around it. While playing with asyncio to try to inject errors on this code path, I found even more severe issues: see th

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-05 Thread Karl Richter
New submission from Karl Richter: `shelve.open(tempfile.mkstemp()[1])` fails with error "anydbm.error: db type could not be determined" which is not explainable with the docs. Traceback is Traceback (most recent call last): File "./cudaminer_param_checker.py", line 720, in pl

[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset ddf6b78faed9 by Victor Stinner in branch '3.4': Issue #23046: Expose the BaseEventLoop class in the asyncio namespace https://hg.python.org/cpython/rev/ddf6b78faed9 -- nosy: +python-dev ___ Python tracker

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-05 Thread Karl Richter
Karl Richter added the comment: EDIT 1: other examples, e.g. import os import shelve curdir = os.path.dirname(__file__) passwords = shelve.open(os.path.join(curdir, 'password_db')) work, so there's need for usable error messages. -- ___

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c9b9d2514bb by Victor Stinner in branch '3.4': Issue #23140, asyncio: Fix cancellation of Process.wait(). Check the state of https://hg.python.org/cpython/rev/7c9b9d2514bb -- nosy: +python-dev ___ Python

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 990ce80d8283 by Victor Stinner in branch '3.4': Issue #23140, asyncio: Simplify the unit test https://hg.python.org/cpython/rev/990ce80d8283 -- ___ Python tracker

[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: Thanks Xavier for the bug report, it should now be fixed. Sorry, I don't see any workaround right now (except of using the development version of Tulip). > The patch looks good, although the test feels overly complex (but maybe I'm > missing something). Oh,

[issue22696] Add a function to know about interpreter shutdown

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: > Using the function in the stdlib can be done separately. Is there an open issue for that? -- ___ Python tracker ___ _

[issue22428] asyncio: KeyboardInterrupt inside a coroutine causes AttributeError

2015-01-05 Thread STINNER Victor
STINNER Victor added the comment: A lot of fixes has been commited to fix this general issue with asyncio at exit. run_until_complete() doesn't log an error anymore when a BaseException (like KeyboardInterrupted) is raised. The caller is able to decide how to handle it. The traceback module ha

[issue23175] logging.exception doesn't accept custom exc_info

2015-01-05 Thread Laimis
New submission from Laimis: Documentation says, that "The arguments are interpreted as for debug()." But it's not true, because no matter what exc_info is passed to logging.exception(), exc_info is overwritten (kwargs['exc_info'] = 1) and later self.error is called. This is either documentati

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-05 Thread R. David Murray
R. David Murray added the comment: You are opening a just-created empty file. The db type of the file cannot, therefore, be determined. Which is what the error message says. How would you suggest the error message be improved? -- nosy: +r.david.murray __

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-05 Thread R. David Murray
R. David Murray added the comment: Sorry, I mean "an empty file with no recognized extension". I doubt supplying a suffix is what you want, though, since you probably want shelve to pick the persistent backend on db creation in order to be portable. -- ___

[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-05 Thread Karl Richter
Karl Richter added the comment: Then, let the error message say "You are opening a just-created empty file. The db type of the file cannot, therefore, be determined." which is much clearer than "anydbm.error: db type could not be determined" which sounds like a generic fallback error message

[issue23176] socket.recvfrom(0) waits for data

2015-01-05 Thread Sworddragon
New submission from Sworddragon: For example on sending ICMP packets and receiving the data socket.recv(1) does wait for data while socket.recv(0) doesn't. socket.recvfrom(1) does wait for data too but I'm also seeing that socket.recvfrom(0) is waiting for data which doesn't look correct (at l

[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-01-05 Thread Jon Dufresne
Jon Dufresne added the comment: I have created an initial patch such that writerow() now allows generators. I have also added a unit test to demonstrate the fix. The code now coerces iterators (and generators) to a list, then operates on the result. I would have preferred to simply iterate ove

[issue23176] socket.recvfrom(0) waits for data

2015-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: That's not surprising, since revcfrom uses select() on the socket regardless of the value its argument. I'm not sure what the use of calling revcfrom(0) is. -- nosy: +benjamin.peterson ___ Python tracker

[issue23176] socket.recvfrom(0) waits for data

2015-01-05 Thread Sworddragon
Sworddragon added the comment: If there is no real use for socket.recvfrom(0) (and then probably socket.recv(0) too) maybe a bufsize argument of 0 should throw an exception? -- ___ Python tracker _

[issue23132] Faster total_ordering

2015-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 09b0da38ce8d by Raymond Hettinger in branch '3.4': Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering. https://hg.python.org/cpython/rev/09b0da38ce8d -- ___ Python tracker

[issue19548] 'codecs' module docs improvements

2015-01-05 Thread Martin Panter
Martin Panter added the comment: Adding patch v5, for the 3.4 branch. There is at least one reference that still needs fixing in the default branch that is not applicable to the 3.4 branch. Main changes from Nick’s patch: * Removed sentence now redundant with introduction to open() and Encoded

[issue23132] Faster total_ordering

2015-01-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue23099] BytesIO and StringIO values unavailable when closed

2015-01-05 Thread Martin Panter
Martin Panter added the comment: Updated patch, to also document the BytesIO buffer is no longer available when closed. The StringIO documentation actually already says this, but I rarely use StringIO. :) -- Added file: http://bugs.python.org/file37611/bytesio_exported_reject_close.v2