[issue22300] PEP 446 What's New Updates for 2.7.9
Roundup Robot added the comment: New changeset 0dacd614839c by Nick Coghlan in branch '2.7': Close #22300 by tweaking 2.7.9 What's New announcements https://hg.python.org/cpython/rev/0dacd614839c -- nosy: +python-dev resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22868] Minor error in the example of filter()
Yi Bai added the comment: Ah yes. You are right, Georg. And as you suggested, it might be better to remove this ambiguity, for people with poor parsing skills like me. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22868 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22868] Minor error in the example of filter()
Roundup Robot added the comment: New changeset 5dd835edde1e by Georg Brandl in branch '2.7': Closes #22868: make example less ambiguous. https://hg.python.org/cpython/rev/5dd835edde1e -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22868 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22868] Minor error in the example of filter()
Georg Brandl added the comment: Done. Thanks for the report! -- resolution: fixed - stage: resolved - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22868 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22868] Minor error in the example of filter()
Changes by Georg Brandl ge...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22868 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
New submission from Nick Coghlan: When working on the original reference implementation for PEP 432, I found it useful to split the startup shutdown code out from the main entry points into the eval loop (see issue 22257 for more details). However, that split made the draft implementation rather hard to maintain - any CPython commit that touched pythonrun.c was almost certain to cause a merge conflict. The attached patch is a preliminary split into two separate modules, with pythonrun continuing to hold the main eval loop entry points, while the startup and shutdown code moves into pylifecycle. This is an initial WIP patch (that nonetheless passes the test suite). I started work on it a few months ago, so I need to make sure that I've retained Victor's recent pythonrun changes. -- assignee: ncoghlan files: split_pythonrun.diff keywords: patch messages: 231155 nosy: ncoghlan priority: normal severity: normal stage: patch review status: open title: Split pylifecycle.c out from pythonrun.c type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file37194/split_pythonrun.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Nick Coghlan added the comment: Incorporated pythonrun changes from 668e0bf30042, 6aaa0aab1e93 and d6fb87972dee into pylifecycle -- Added file: http://bugs.python.org/file37195/split_pythonrun_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22257] PEP 432: Redesign the interpreter startup sequence
Nick Coghlan added the comment: Issue 22869 now covers the preparatory refactoring to split pythonrun into two modules. -- dependencies: +Split pylifecycle.c out from pythonrun.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Nick Coghlan added the comment: Known issues with the current split: * reference count printing is duplicated (lifecycle prints it at shutdown, pythonrun at the interactive prompt) * pythonrun references PyInspect_Flag directly without an extern declaration * This particular oddity wasn't introduced by this patch, but it turns out PyOptimize_Flag lives in compile.c, rather than with the other global flags in pythonrun.c. It's also declared as a public data API in pydebug.h -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Mateon1 added the comment: Well, I am reporting it here, is this not the correct place? Sorry if it is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22870] urlopen timeout failed with SSL socket
New submission from Dave Tian: Hi there, Recent urlopen with timeout did not work. Below is the back trace. After digging into the Python lib, the root cause is found - within the socket.py, self._sock.recv(), under a 'while True' loop, tried to retrieve sth from the under-layer SSL socket. However, the under-layer PySSL_SSLread() neither returned anything useful nor reported an exception, such as timeout. Because of this 'while True' loop, urlopen got stuck. My temp fix is to add timeout within this issued loop of the socket.py. However, there are other similar loops ranging from urllib2, httplib to socket...and I do not think anything wrong with these loops considering the system socket programming practice. Instead, I am thinking if we could add a new timeout value into the socket object. This new timeout starts with the same value as the user-defined timeout but decrease for the same socket operation. For the case I have encountered: while True: some_sock_recv() # decrease the timeout value within the function call This should guarantee the timeout timely even within the 'while True' loop. Thanks, Dave http://davejingtian.org obj=urllib2.urlopen(url, timeout=20) ^CTraceback (most recent call last): File stdin, line 1, in module File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 127, in urlopen return _opener.open(url, data, timeout) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 410, in open response = meth(req, response) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 523, in http_response 'http', request, response, code, msg, hdrs) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 442, in error result = self._call_chain(*args) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 382, in _call_chain result = func(*args) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 629, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 404, in open response = self._open(req, data) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 422, in _open '_open', req) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 382, in _call_chain result = func(*args) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 1222, in https_open return self.do_open(httplib.HTTPSConnection, req) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py, line 1187, in do_open r = h.getresponse(buffering=True) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py, line 1045, in getresponse response.begin() File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py, line 441, in begin self.msg = HTTPMessage(self.fp, 0) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mimetools.py, line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/rfc822.py, line 108, in __init__ self.readheaders() File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py, line 280, in readheaders line = self.fp.readline(_MAXLINE + 1) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py, line 476, in readline data = self._sock.recv(self._rbufsize) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py, line 241, in recv return self.read(buflen) File /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py, line 160, in read return self._sslobj.read(len) KeyboardInterrupt -- components: Library (Lib) messages: 231160 nosy: daveti priority: normal severity: normal status: open title: urlopen timeout failed with SSL socket type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22834] Unexpected FileNotFoundError when current directory is removed
Brett Cannon added the comment: So it isn't about importlib not handling missing directories on sys.path directly, it has to do with the fact that os.getcwd() raises FileNotFoundError when CWD is no longer valid and that is in a fundamental part of importlib that isn't worrying about non-existent directories. We could be robust and simply have instances of os.getcwd() failing just move on, e.g. when '' is hit in sys.path and os.getcwd() raises an exception just give up. The other option is leaving this to raise FileNotFoundError but throwing a new copy with a better error message mentioning this is because the current working directory no longer exists. That would lead to easier debugging since paths on sys.path are typically obvious -- since site.py makes them absolute -- but I'm willing to bet people don't bother checking CWD is still good. So it's robustness vs. debugging when you make this mistake. Any opinions on the matter? -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22871] datetime documentation incomplete
New submission from Santiago Palacio Gómez: In the datetime documentation page https://docs.python.org/2/library/datetime.html In the directive sections, there are a few things that are not documented there. I really don't know all the possible directives, but the few examples I'm aware of, and how they seem to work for me: %D seems to behave as the default %x (None locale) %h seems to behave as %b -- assignee: docs@python components: Documentation messages: 231162 nosy: docs@python, spalac24 priority: normal severity: normal status: open title: datetime documentation incomplete type: enhancement versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22871 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22847] Improve method cache efficiency
Raymond Hettinger added the comment: Thanks for adding the instrumentation. Otherwise, it would have been difficult to tell whether the xor hashing had a significant deleterious effect on collisions. Also, +1 on bumping up the cache size. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22871] datetime documentation incomplete
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +belopolsky, ethan.furman, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22871 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22872] multiprocessing.Queue raises AssertionError
New submission from Joseph Siddall: putting something in Queue(multiprocessing.Queue) after closing it raises an AssertionError. Getting something out of a Queue after closing it raises an OSError. I expected both scenarios to raise the same exception. To Reproduce: from multiprocessing import Queue q = Queue() q.close() q.put(ok) Traceback (most recent call last): ... AssertionError from multiprocessing import Queue q = Queue() q.close() q.get() Traceback (most recent call last): ... OSError: handle is closed -- components: Library (Lib) messages: 231164 nosy: Joseph.Siddall priority: normal severity: normal status: open title: multiprocessing.Queue raises AssertionError type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22872 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22872] multiprocessing.Queue raises AssertionError
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman, jnoller, sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22872 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Matthew Barnett added the comment: The page on PyPI says where the project's homepage is located: Home Page: https://code.google.com/p/mrab-regex-hg/ The bug was fixed in the last release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.
New submission from John Nagle: In each revision of getpeercert, a few more fields are returned. Python 3.2 added issuer and notBefore. Python 3.4 added crlDistributionPoints, caIssuers, and OCSP URLS. But some fields still aren't returned. I happen to need CertificatePolicies, which is how you distinguish DV, OV, and EV certs. Here's what you get now from getpeercert() for bankofamerica.com: {'OCSP': ('http://EVSecure-ocsp.verisign.com',), 'caIssuers': ('http://EVSecure-aia.verisign.com/EVSecure2006.cer',), 'crlDistributionPoints': ('http://EVSecure-crl.verisign.com/EVSecure2006.crl',), 'issuer': ((('countryName', 'US'),), (('organizationName', 'VeriSign, Inc.'),), (('organizationalUnitName', 'VeriSign Trust Network'),), (('organizationalUnitName', 'Terms of use at https://www.verisign.com/rpa (c)06'),), (('commonName', 'VeriSign Class 3 Extended Validation SSL CA'),)), 'notAfter': 'Mar 22 23:59:59 2015 GMT', 'notBefore': 'Feb 20 00:00:00 2014 GMT', 'serialNumber': '69A7BC85C106DDE1CF4FA47D5ED813DC', 'subject': ((('1.3.6.1.4.1.311.60.2.1.3', 'US'),), (('1.3.6.1.4.1.311.60.2.1.2', 'Delaware'),), (('businessCategory', 'Private Organization'),), (('serialNumber', '2927442'),), (('countryName', 'US'),), (('postalCode', '60603'),), (('stateOrProvinceName', 'Illinois'),), (('localityName', 'Chicago'),), (('streetAddress', '135 S La Salle St'),), (('organizationName', 'Bank of America Corporation'),), (('organizationalUnitName', 'Network Infrastructure'),), (('commonName', 'www.bankofamerica.com'),)), 'subjectAltName': (('DNS', 'mobile.bankofamerica.com'), ('DNS', 'www.bankofamerica.com')), 'version': 3} Missing fields (from Firefox's view of the cert) include: Certificate Policies: 2.16.840.1.113733.1.7.23.6: Extended Validation (EV) SSL Server Certificate Certification Practice Statement pointer: https://www.verisign.com/cps (This tells you it's a valid EV cert). Certificate Basic Constraints: Is not a Certificate Authority (which means they can't issue more certs below this one) Extended Key Usage: TLS Web Server Authentication (1.3.6.1.5.5.7.3.1) TLS Web Client Authentication (1.3.6.1.5.5.7.3.2) (which means this cert is for web use, not email or code signing) How about just returning ALL the remaining fields and finishing the job, so this doesn't have to be fixed again? Thanks. -- components: Library (Lib) messages: 231166 nosy: nagle priority: normal severity: normal status: open title: Re: SSLsocket.getpeercert - return ALL the fields of the certificate. versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22874] gzip bug in python 2.7.3?
New submission from Jens Bonerz: I am getting the Not a gzipped file exception while retrieving a gzipped sitemap xml (tested on amazon.de) using scrapy- I am using Python 2.7.3 and Scrapy 0.24.4 Can anyone confirm gzip being broken in 2.7.3 or am I overseeing something? -- messages: 231167 nosy: jbonerz priority: normal severity: normal status: open title: gzip bug in python 2.7.3? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22874 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16802] fileno argument to socket.socket() undocumented
Petri Lehtinen added the comment: To me, there's also a valid use case on Unix; A parent process forks and execs, wanting to share a socket to the executed child process. The best way for the child to create a socket object is to use the fileno parameter of socket.socket(). -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16802 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22822] IPv6Network constructor docs incorrect about valid input
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ncoghlan, pmoody ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22822 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22874] gzip bug in python 2.7.3?
Ned Deily added the comment: It's hard to guess what is going on without an example of the failure. Please post the code of a simple reproducible example that fails along with the exception traceback and also indicate what kind of platform you are running this on. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22874 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22834] Unexpected FileNotFoundError when current directory is removed
R. David Murray added the comment: Well, once I've launched a program, regardless of whether or not I expected some stuff to come from the CWD, I generally don't think about whether or not the CWD might go away, and in a complex setup it would most likely be getting deleted by some other process. So I think I would prefer an import that is of something that wasn't ever in the CWD to succeed if the CWD goes away. I'm not even sure I'd want a warning. What happens if a directory on the path disappears? If that is treated as a non-error, then I think a missing CWD on the path should also be treated as a non-error. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22838] Convert re tests to unittest
Terry J. Reedy added the comment: This needs side-by-side review but there is no review button. Does anyone know why? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22871] datetime documentation incomplete
Alexander Belopolsky added the comment: If you read the paragraph preceding the table of directives [1], you will see that The full set of format codes supported varies across platforms, because Python calls the platform C library’s strftime() function, and platform variations are common. To see the full set of format codes supported on your platform, consult the strftime(3) documentation. [1] https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22871 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22834] Unexpected FileNotFoundError when current directory is removed
Terry J. Reedy added the comment: How about issue a verbose warning for possible debugging and continue for robustness? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22870] urlopen timeout failed with SSL socket
R. David Murray added the comment: It sounds like the bug is that PySSL_SSLread didn't raise the timeout? Any idea if this is still a problem in python3? (Could possibly have changed on trunk as well, as SSL is being updated in 2.7.9.) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22874] gzip bug in python 2.7.3?
Jens Bonerz added the comment: closed. Problem caused by 3rd party app -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22874 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17293] uuid.getnode() MAC address on AIX
Serhiy Storchaka added the comment: This issue had added new tests. Here is a patch against 2.7 (3.4+ should use OSError instead of socket.gaierror) which fixes _arp_getnode(). -- Added file: http://bugs.python.org/file37196/uuid_arp_getnode_freebsd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17293 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22841] Avoid to use coroutine with add_signal_handler()
Roundup Robot added the comment: New changeset d244e1770f1b by Guido van Rossum in branch '3.4': - Issue #22841: Reject coroutines in asyncio add_signal_handler(). https://hg.python.org/cpython/rev/d244e1770f1b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22874] gzip bug in python 2.7.3?
Changes by Ned Deily n...@acm.org: -- resolution: - third party stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22874 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22841] Avoid to use coroutine with add_signal_handler()
Guido van Rossum added the comment: Applied to upstream tulip, 3.4, and 3.5. Thanks Ludovic! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22841] Avoid to use coroutine with add_signal_handler()
Roundup Robot added the comment: New changeset 44e77709daa4 by Guido van Rossum in branch 'default': - Issue #22841: Reject coroutines in asyncio add_signal_handler(). https://hg.python.org/cpython/rev/44e77709daa4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22875] asyncio: call_soon() documentation unclear on timing
New submission from Corbin Simpson: Hi there! While assisting somebody on #python (where manners go to die), I was consulting asyncio's documentation. Given my unfamiliarity with asyncio, I was surprised to read BaseEventLoop.call_soon()'s documented behavior: Arrange for a callback to be called as soon as possible. [1] The question in mind is whether call_soon() waits for control to return to the event loop before calling the first callback in the queue. After all, given the documented behavior, it would not be unreasonable for call_soon() to always call callbacks immediately if no other callbacks were enqueued. I can imagine scenarios where a previous queued callback from e.g. call_soon_threadsafe() creates a callback that causes queueing behavior, but otherwise I would expect as soon as possible to mean immediately. It's true that in other event loops, this kind of callback registration waits for control to return to the event loop before running callbacks. However, many event loops that I've worked with indicate that call_later() is the correct API for adding callbacks that respect the event loop. In fact, call_later(0, callback, args) looks quite a bit like the familiar Twisted callLater(0, callback, args) pattern! Additionally, there is no indication as to whether call_later() and call_soon() use the same queue. I'd like clarification on these points in the Python 3 documentation, please. I'd like to know whether call_soon() can be immediate, and whether call_soon() preempts or interleaves with call_later(). (Yes, I know that Twisted's documentation is missing this too [2] [3]. I'll get to that soon enough.) Thanks! ~ C. [1]: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.BaseEventLoop.call_soon [2]: http://twistedmatrix.com/documents/current/core/howto/time.html [3]: http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReactorTime.html#callLater -- assignee: docs@python components: Documentation, asyncio messages: 231180 nosy: Corbin.Simpson, docs@python, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: asyncio: call_soon() documentation unclear on timing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Serhiy Storchaka added the comment: Thank you David for your benchmarks and patch. There are several backward compatibility issues with the reading from ZipFile opened for write and from closed ZipFile. This behavior is mostly undocumented (except the reading from closed ZipFile), but even our tests depend on it and changing it could break user code with good chance. Here is a patch which preserves current behavior. Added new tests to check this behavior explicitly. Other advantage of the patch is that it doesn't change the signature of ZipExtFile constructor at all. Benchmarks don't show stable significant difference between patched and unpatched versions. -- versions: +Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file37197/zipfile_share_file.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22875] asyncio: call_soon() documentation unclear on timing
Guido van Rossum added the comment: As soon as possible is constrained by all callbacks are called from the event loop. Feel free to suggest a doc patch (asyncio docs are in dire need of more help!) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37198/bench_zip.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22875] asyncio: call_soon() documentation unclear on timing
R. David Murray added the comment: Personally, when I read that I thought arrange for made it pretty clear it was when control returned to the event loop, but I agree that if it can be made clearer it should be. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22875 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22838] Convert re tests to unittest
Serhiy Storchaka added the comment: Regenerated patch. Hope this will help. -- Added file: http://bugs.python.org/file37199/re_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22843] doc error: 6.2.4. Match Objects
Terry J. Reedy added the comment: David is correct that the current phrasing is correct. The phase 'x has a boolean value of True' means 'bool(x) is True', which is always true for match objects, as well as for non-zero numbers, non-empty collections, and many other things. This does *not* imply equality between the object and its boolean value. In fact, nearly all objects are not equal to their boolean value. Clayton could just as well as have written blah = 'a' or blah = 1 + 1j and gotten the name non-surprising result. There is nothing special about boolean values in this respect. The string value of x is str(x) and in general, x != str(x). (This also sometimes confuses people.) Similarly, if x has an integral value int(x), it does not necessarily equal that value: int(3.1459) != 3. I think the doc is fine as is. The fact that 3 is considered to be '3' in a display context does not mean that we do not write the string value of 3 is '3'. It is fundamental to Python that essentially all objects o have a string value str(o) and a boolean value bool(o) and that those mappings are sometimes used automatically for display and logic. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22843 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22848] Subparser help does not respect SUPPRESS argument
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22848 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22851] 2.7 core crashes with generator.gi_frame.f_restricted
Terry J. Reedy added the comment: This appears to be 2.7 only as 3.4.2 stops on the first print with AttributeError: 'frame' object has no attribute 'f_restricted', which is not a crash. -- nosy: +terry.reedy stage: - needs patch title: core crashes - 2.7 core crashes with generator.gi_frame.f_restricted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22858] unittest.__init__:main shadows unittest.main
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22860] unittest TestProgram hard to extend
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22860 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22843] doc error: 6.2.4. Match Objects
Clayton Kirkwood added the comment: Cool -Original Message- From: Terry J. Reedy [mailto:rep...@bugs.python.org] Sent: Friday, November 14, 2014 1:04 PM To: c...@godblessthe.us Subject: [issue22843] doc error: 6.2.4. Match Objects Terry J. Reedy added the comment: David is correct that the current phrasing is correct. The phase 'x has a boolean value of True' means 'bool(x) is True', which is always true for match objects, as well as for non-zero numbers, non-empty collections, and many other things. This does *not* imply equality between the object and its boolean value. In fact, nearly all objects are not equal to their boolean value. Clayton could just as well as have written blah = 'a' or blah = 1 + 1j and gotten the name non- surprising result. There is nothing special about boolean values in this respect. The string value of x is str(x) and in general, x != str(x). (This also sometimes confuses people.) Similarly, if x has an integral value int(x), it does not necessarily equal that value: int(3.1459) != 3. I think the doc is fine as is. The fact that 3 is considered to be '3' in a display context does not mean that we do not write the string value of 3 is '3'. It is fundamental to Python that essentially all objects o have a string value str(o) and a boolean value bool(o) and that those mappings are sometimes used automatically for display and logic. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22843 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22843 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22863] https://docs.python.org/ should make a true 2.7.8 version available
Terry J. Reedy added the comment: New stuff is marked New in version 2.7.9., etc. The Idle chapter (reletively new in the Library Reference itself) has the same problem if new or quasi-new features in micro-releases are added to the doc before the release. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22863 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9694] argparse required arguments displayed under optional arguments
Ryan Hartkopf added the comment: Personally, 'options' is the first word that comes to mind other than 'arguments' (which is confusing for obvious reasons). But I think we can all agree that any of these candidates are less ambiguous than 'optional arguments'! It's been 4 years, let's put this one to bed! -- nosy: +rhartkopf Added file: http://bugs.python.org/file37200/argparse_option.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9694 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22863] https://docs.python.org/ should make a true 2.7.8 version available
Marc-Andre Lemburg added the comment: On 14.11.2014 22:35, Terry J. Reedy wrote: New stuff is marked New in version 2.7.9., etc. The Idle chapter (reletively new in the Library Reference itself) has the same problem if new or quasi-new features in micro-releases are added to the doc before the release. I know, but there are so many additions in the ssl module that it's very difficult to tell what actually was part of earlier Python 2.7 releases. I think best would be to link to the release URL Bejamin mentioned for 2.7.8 and provide the trunk version as 2.7 (trunk). The same should probably be done for the other releases listed in the selector. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22863 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
David Wilson added the comment: Hi Serhiy, Thanks for the new patch, it looks better than my attempt. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22834] Unexpected FileNotFoundError when current directory is removed
Martin Panter added the comment: The only time I see a warning would be useful is if you intended to override a standard module with a module of the same name in the current directory. In all other cases I think it would be better to either generate an ImportError if the module is not found, or import it from wherever it is found. So I think a warning would not be useful in most cases. Having any other non-existant directory in the search path is not an error and there is no warning either: $ python3 -btWall Python 3.4.2 (default, Oct 8 2014, 14:33:30) [GCC 4.9.1 20140903 (prerelease)] on linux Type help, copyright, credits or license for more information. import sys sys.path.insert(0, /blaua) import sadface Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named 'sadface' import urllib # Interpreter = happy ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22867 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22851] 2.7 core crashes with generator.gi_frame.f_restricted
eryksun added the comment: The fix for issue 14432 was applied to 3.3, but I'm pretty sure 2.x PyFrame_IsRestricted is the only problem. Nothing else should see f_tstate when it's NULL. Also, f_tstate was dropped from PyFrameObject in 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22876] ip_interface can't be broadcast or number net
New submission from Вячеслав: ip_interface can't be network or broadcast address. Probably should throw an exception in such cases ip_interface(u'192.168.1.0/25') IPv4Interface(u'192.168.1.0/25') ip_interface(u'192.168.1.127/25') IPv4Interface(u'192.168.1.127/25') -- components: Library (Lib) messages: 231194 nosy: m01, ncoghlan, pmoody, python-dev, Вячеслав priority: normal severity: normal status: open title: ip_interface can't be broadcast or number net type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22863] https://docs.python.org/ should make a true 2.7.8 version available
Terry J. Reedy added the comment: I agree that x.y.z should be reserved for the frozen release version of the docs and that the current ongoing version should be x.y (trunk) or x.y.z+. This was true without new features in a micro release, but did not matter so much. Leaving Idle aside, I am not sure how we should handle the new exception in other stdlib modules. There may or may not be more documented additions past 2.7.9. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22863 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22847] Improve method cache efficiency
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22257] PEP 432: Redesign the interpreter startup sequence
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22257 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22863] https://docs.python.org/ should make a true 2.7.8 version available
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22863 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22851] 2.7 core crashes with generator.gi_frame.f_restricted
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22847] Improve method cache efficiency
Roundup Robot added the comment: New changeset 97dc64adb6fe by Antoine Pitrou in branch 'default': Issue #22847: Improve method cache efficiency. https://hg.python.org/cpython/rev/97dc64adb6fe -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22877] Backport ensurepip OS X installer changes to 2.7
Changes by Ned Deily n...@acm.org: -- assignee: ned.deily components: Installation, Macintosh nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Backport ensurepip OS X installer changes to 2.7 versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22877 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22847] Improve method cache efficiency
Antoine Pitrou added the comment: Now pushed. Thanks for the comments! -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22847 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.
Antoine Pitrou added the comment: How about just returning ALL the remaining fields and finishing the job, so this doesn't have to be fixed again? Thanks. Please learn some respect. You are not here to tell volunteers what they should work on. And if you want to see things sped up, you can submit a patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22877] Backport ensurepip OS X installer changes to 2.7
New submission from Roundup Robot: New changeset 6b8e107622b3 by Ned Deily in branch '2.7': Issue #22877: PEP 477 - OS X installer for 2.7.9 now installs pip. https://hg.python.org/cpython/rev/6b8e107622b3 New changeset e8182c6c9ef1 by Ned Deily in branch '3.4': Issue #22877: PEP 477 - keep 2.7 and 3.x installers in sync. https://hg.python.org/cpython/rev/e8182c6c9ef1 New changeset 6270a2181ed3 by Ned Deily in branch 'default': Issue #22877: PEP 477 - keep 2.7 and 3.x installers in sync. https://hg.python.org/cpython/rev/6270a2181ed3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22877 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22877] Backport ensurepip OS X installer changes to 2.7
Ned Deily added the comment: Committed for release in 2.7.9. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22877 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22827] Backport ensurepip to 2.7 (PEP 477)
Ned Deily added the comment: The OS X installer integration backport has been committed in Issue22877. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22827 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.
John Nagle added the comment: May be a duplicate of Issue 204679: ssl.getpeercert() should include extensions http://bugs.python.org/issue20469 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22868] Minor error in the example of filter()
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22868 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7949] IDLE: problems with dark GTK or KDE color schemes
Terry J. Reedy added the comment: #16984 is closed as a duplicate of this. The screenshot helps. I was just thinking about adding a retro-black color theme to match the current old-is-new fashion. It appears that this would solve the Text part of the problem but Mathias' patch summary shows that more is needed to get other widgets in line. It appears that a review and written summary of colors in Idle would be helpful. I am curious what effect switching to themed widgets would have on this issue. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7949 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com