[issue21514] update json module docs in light of RFC 7159 ECMA-404
Raymond Hettinger added the comment: Soonish. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Matej Cepl added the comment: Well, I hoped to get first some comments on the code itself (and especially the test). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21514] update json module docs in light of RFC 7159 ECMA-404
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.
Akira Li added the comment: tl;dr: added patch that clarifies Python re behavior. Please, review. --- The documented behavior is not clear: why (a|ab)* is not equivalent to (a|ab)(a|ab) for aba if the docs say as many repetitions as are possible? And it is not obvious (it is not the only possible behavior) e.g., POSIX [1] expects the longest match, PCRE [2] group may be atomic (/possesive quantifiers), or there is ungreedy repetition: $ echo abac | grep -o '\(a\|ab\)* # Basic Regular Expression aba $ echo abac | grep -Eo '(a|ab)*' # Extended Regular Expression aba $ echo abac | grep -Po '(a|ab)*' # PCRE (like Python regexes) a a $ echo abac | grep -Po '(a|ab)(a|ab)' # PCRE (two repeats) aba $ echo abac | grep -Po '(a|ab)*c' # PCRE (re-eval to match the rest) abac $ echo abAc | grep -iPo '(a|ab)*+c' # PCRE (possessive quantifiers) Ac $ echo abac | grep -Po '(a|ab)*?' # PCRE (ungreedy, zero repeats) # matches nothing where BREs, EREs are defined in [1] that says: If the pattern permits a variable number of matching characters and thus there is more than one such sequence starting at that point, *the longest such sequence is matched*. and: Consistent with the whole match being the longest of the leftmost matches, each subpattern, from left to right, *shall match the longest possible string.* Python regexes work like PCRE [2] that says: The matching process tries each alternative in turn, from left to right, and *the first one that succeeds is used*. If the alternatives are within a subpattern (defined below), succeeds means matching the rest of the main pattern as well as the alternative in the subpattern. It explains why (a|ab)* matches only a in aba (the first one that succeeds) and why at the same time (a|ab)*c matches abac: (a|ab) may match ab in the latter case because the main pattern would fail otherwise i.e., the advanced definition of succeeds is used: succeeds means matching the rest of the main pattern Python docs [3] are similar but do not contain the advanced succeeds definition: REs separated by ``'|'`` are tried from left to right. When one pattern completely matches, that branch is accepted. This means that once ``A`` matches, ``B`` will not be tested further, even if it would produce a longer overall match. In other words, the ``'|'`` operator is never greedy. It explains why (a|ab) matches a in aba. '*' behavior [2]: By default, the quantifiers are greedy, that is, they match as much as possible (up to the maximum number of permitted times), without causing the rest of the pattern to fail. and again Python docs [3] are similar: ``'*'`` Causes the resulting RE to match 0 or more repetitions of the preceding RE, as many repetitions as are possible. It implies that (a|ab)* should be equivalent to (a|ab)(a|ab) to match aba -- TWO REPETITIONS ARE MORE THAN ONE: as many repetitions as are possible. But it matches only 'a' i.e., it works as (a|ab) -- only one repetition instead of two. In reality, (a|ab)* along works like a*. I've uploaded a documentation patch that makes Python documentation for '|' more similar to PCRE and clarifies '*' definition as R. David Murray suggested in msg198126. Please, review. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html [2] http://man7.org/linux/man-pages/man3/pcrepattern.3.html [3] http://hg.python.org/cpython/file/18a311479e8b/Doc/library/re.rst -- components: -Regular Expressions keywords: +patch nosy: +akira title: Regular expressions: * does not match as many repetitions as possible. - Clarify docs for re module: why * does not match as many repetitions as possible. versions: +Python 3.5 -Python 2.7, Python 3.3 Added file: http://bugs.python.org/file36340/re-docs-repetitions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19055 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.
Changes by Akira Li 4kir4...@gmail.com: Removed file: http://bugs.python.org/file36340/re-docs-repetitions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19055 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19055] Clarify docs for re module: why * does not match as many repetitions as possible.
Changes by Akira Li 4kir4...@gmail.com: Added file: http://bugs.python.org/file36341/re-docs-repetitions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19055 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5411] Add xz support to shutil
Akira Li added the comment: sphinx generates warning for the current docs introduced by this issue: WARNING: Explicit markup ends without a blank line; unexpected unindent. I've uploaded a documentation patch that fixes it. -- nosy: +akira Added file: http://bugs.python.org/file36342/docs-fix-sphinx-warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Matej Cepl added the comment: This is a patch with tests working for the tip of cpython. -- hgrepos: +267 Added file: http://bugs.python.org/file36343/fix-issue19494-py35.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Changes by Matej Cepl mc...@redhat.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Changes by Matej Cepl mc...@redhat.com: Added file: http://bugs.python.org/file36344/fix-issue19494-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Matej Cepl added the comment: Mercurial seems to be incredibly slow to clone, for anybody who is willing to deal with git, my real repo is http://luther.ceplovi.cz/git/cpython.git/ (branches basicAuth19494 and basicAuth19494_py3k). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22182] distutils.file_util.move_file unpacks wrongly an exception
New submission from Claudiu Popa: Hi. When os.rename fails inside distutils.file_util.move_file, the exception is unpacked using ``(num, msg) = e``. While this was valid in Python 2, in Python 3 it should be ``e.args``. The attached patched fixes this. -- components: Distutils files: distutils_unpacking_exception.patch keywords: patch messages: 225184 nosy: Claudiu.Popa, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils.file_util.move_file unpacks wrongly an exception type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file36345/distutils_unpacking_exception.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22182 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22182] distutils.file_util.move_file unpacks wrongly an exception
Claudiu Popa added the comment: Mm, it seems there's another instance of unpacking later on, when os.unlink fails. Here's the updated patch. -- Added file: http://bugs.python.org/file36346/issue22182.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22182 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
Demian Brecht added the comment: Uploaded new patch. Removed support for RFC1808-specific behaviour. Extracted non-compliant tests into comment blocks indicating the behaviour is no longer supported. -- Added file: http://bugs.python.org/file36347/issue22118_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
Mike Lissner added the comment: Just hopping in here to say that the work going down here is beautiful. I've filed a lot of bugs. This one's not particularly difficult, but damn, I appreciate the speed and quality going into fixing it. Glad to see the Python language is a happy place with fast, quality fixes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22183] datetime.timezone methods require datetime object
New submission from Patrick Westerhoff: I’ve noticed that the methods in `datetime.timezone` all require a datetime object (or explicitely `None`) as its parameter or they will raise an exception. The datetime object however is never required for the implementation of the method, so it seems to me like an unnecessary requirement, given that timezone objects are completely independent of datetime objects. For example `timezone.utcoffset` is implemented like this: def utcoffset(self, dt): if isinstance(dt, datetime) or dt is None: return self._offset raise TypeError(utcoffset() argument must be a datetime instance or None) I don’t really understand this requirement and if there isn’t an actual reason for it (if there is, it should be documented somewhere), I’d suggest to remove this requirement completely. For backwards compatibility, the parameter could simply default to `None`. -- components: Library (Lib) messages: 225188 nosy: poke priority: normal severity: normal status: open title: datetime.timezone methods require datetime object type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22183 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22183] datetime.timezone methods require datetime object
R. David Murray added the comment: A timezone is a particular implementation of the general tzinfo API, and in the general case the datetime argument *is* required. This is already documented (ie: that timezone is a concrete implementation of tzinfo, and that the tzinfo API requires the datetime). -- nosy: +belopolsky, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22183 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
Demian Brecht added the comment: Thanks Mike, it's always nice to get positive feedback :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22183] datetime.timezone methods require datetime object
Alexander Belopolsky added the comment: As David explained, utcoffset() method signature is dictated by the base class. This is not a bug. -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22183 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
R. David Murray added the comment: This patch looks like a feature addition rather than the discussed optimization of always sending auth on the first request. As such it could only go into 3.5. I'm also adding Nick Coghlan to nosy, for his opinion on whether or not this optimization/bug-fix-for-issue-caused-by-greater-3rd-party-security-conciousness is something that we do indeed want to be considering for 2.7 in any case. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5411] Add xz support to shutil
Berker Peksag added the comment: Fixed. Thanks for the patch, Akira. http://hg.python.org/cpython/rev/7fcfb634ccca -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22083] Refactor PyShell's breakpoint related methods
Saimadhav Heblikar added the comment: This patch does two things 1. Refactor pyshell-breakpoint-refactor.diff to reflect changes in pyshell-breakpoint-refactor.diff As in pyshell-breakpoint-refactor.diff, the set/clear(_here) breakpoint methods are refactored into logical methods. 2. If the filename is not set, text.bell() is replaced with a dialog to prompt the user to save the file. -- Added file: http://bugs.python.org/file36348/pyshell-breakpoint-refactor-v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14105] Breakpoints in debug lost if line is inserted; IDLE
Saimadhav Heblikar added the comment: While working on issue22083, I noticed a few redundant comments. This patch removes them. -- keywords: +patch Added file: http://bugs.python.org/file36349/remove-pyshell-comment.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14105 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Matej Cepl added the comment: This patch looks like a feature addition rather than the discussed optimization of always sending auth on the first request. As such it could only go into 3.5. ??? I was trying hard not to break current API, so I have created a new handler to be on the safe side, exactly in order to make it more palatable for 2.7.*. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
R. David Murray added the comment: But that introduces a new element of the API, which is an API change. I thought the plan was to change the existing code to always send the auth when it was available. Why would that change the API? (Maybe it does...I haven't looked into this issue in any depth.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Matej Cepl added the comment: But that introduces a new element of the API, which is an API change. I thought the plan was to change the existing code to always send the auth when it was available. Well, it seems to me a little bit suspicious that with changing the current handler, there would be suddenly for many websites just one request instead of previous two, so that we would have changed behavior of the program without programmers knowing. Anyway, either direction is OK with me, I just thought this is more honest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21725] RFC 6531 (SMTPUTF8) support in smtpd
Roundup Robot added the comment: New changeset ca696ca204e0 by R David Murray in branch 'default': #21725: Add RFC 6531 (SMTPUTF8) support to smtpd. http://hg.python.org/cpython/rev/ca696ca204e0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21725 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22148] frozen.c should #include importlib.h instead of importlib.h
John Beck added the comment: Hm, that is strange. My reading of the semantics of foo.h vs foo.h was that they are almost the same, except that foo.h has the additional semantic of searching the local directory (wherever the .c file is that is #include'ing it) first. So if other platforms require that, and we require the opposite of that, then it seems neither Makefile nor configure tweaking would help, and the needs of the many outweigh the needs of the few (or the one), and we will just patch this privately in our internal repo. Thanks for your consideration. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22148 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
R. David Murray added the comment: That's why I referred to it as an optimization (as does the RFC, according to you). As such, *normally* we wouldn't add it to a maintenance release. The question is, is it acceptable to do so because it addresses, in a backward compatible way, an issue that arises because people are changing their web sites to be more security conscious? I don't see a likelyhood that the switch from two to one requests is likely to break anything (though I'm sure it could), because web sites already need to deal with clients that only send one request. The only place the change is likely to be breaking is in a custom client/ap situation (ie: something internal corporate, most likely) or in a test framework. I suspect these are acceptable possibilities in the current context, but I want other core committer opinions. On the other hand, introducing a new class *is* a visible API change, and thus *cannot* go into a maintenance release, absent a PEP 466 style exception, and I don't see how this raises to that level, since it doesn't result in a security vulnerability, just an inability to talk to security conscious web sites. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22184] lrucache should reject maxsize as a function
New submission from Jason R. Coombs: In https://bitbucket.org/jaraco/backports.functools_lru_cache/issue/1/python-2-attributeerror-int-object-has-no, a user was confused when he tried to use the lrucache decorator incorrectly, passing the wrapped function directly to lrucache. Consider: @lrucache def expensive(param): pass One can even get away with profiling that now decorated function: for x in range(1): expensive(x) The test will run without error, but it's not doing what the user thinks it's doing. In the first section, it's creating a decorator, and in the second section, it's wrapping an int in that decorator, but because the wrapper is never called, an error is never raised. I propose adding a simple check that if maxsize is callable, raise a TypeError. That would prevent unintentional misuse and subtle non-failure with minimal impact on performance. -- components: Library (Lib) messages: 225202 nosy: jason.coombs, rhettinger priority: normal severity: normal status: open title: lrucache should reject maxsize as a function ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22184 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22178] _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect
Roundup Robot added the comment: New changeset 97ed0b51bbc0 by Zachary Ware in branch '2.7': Issue #22178: Fix the date of the Windows epoch (Jan 1, 1601). http://hg.python.org/cpython/rev/97ed0b51bbc0 New changeset 847a2bdd5bec by Zachary Ware in branch '3.4': Issue #22178: Fix the date of the Windows epoch (Jan 1, 1601). http://hg.python.org/cpython/rev/847a2bdd5bec New changeset 7fafbb7e1a8f by Zachary Ware in branch 'default': Closes #22178: Merge with 3.4 http://hg.python.org/cpython/rev/7fafbb7e1a8f -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22178 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22178] _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect
Zachary Ware added the comment: Fixed, thanks for the report! -- assignee: - zach.ware components: +Documentation, Windows nosy: +zach.ware versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22178 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Changes by Matej Cepl mc...@redhat.com: -- hgrepos: +268 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4431] Distutils MSVC doesn't create manifest file
Joachim Herb added the comment: Using Visual C++ 10.0 SP1 Express to build extensions for python 3.4 (64bit) I also had to modify distutils/msvc9compiler.py in the described way -- nosy: +jmozmoz versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4431 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4431] Distutils MSVC doesn't create manifest file
Mark Lawrence added the comment: There are a lot of messages on this issue considering it was closed as invalid on 25th November 2008 :) -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4431 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22027] RFC 6531 (SMTPUTF8) support in smtplib
Milan Oberkirch added the comment: After blindly raising errors for 'SMTPUTF8' without 'BODY=.*' I found out that 'SMTPUTF8' alone is actually perfectly fine (for using international names in addresses but sending ASCII data). Which means I did a mistake in the smtpd patch :( The attached 3rd version of the smtplib patch implements your suggestions, including re-factoring of the mail option parsing. One test is commented out until smtpd is fixed. I'll do that as -part of- issue 21795 tomorrow. -- Added file: http://bugs.python.org/file36350/smtplib_smtputf8V3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22185] Occasional RuntimeError from Condition.notify
New submission from Doug Zongker: Condition.wait() modifies self._waiters without holding the lock (when a wait with timeout times out without the condition being notified). If this happens to occur in between construction of the _islice and _deque objects in Condition.notify(): def notify(self, n=1): [...] all_waiters = self._waiters waiters_to_notify = _deque(_islice(all_waiters, n)) then the result is a RuntimeError exception: File /usr/lib/python3.4/threading.py, line 358, in notify_all self.notify(len(self._waiters)) File /usr/lib/python3.4/threading.py, line 341, in notify waiters_to_notify = _deque(_islice(all_waiters, n)) RuntimeError: deque mutated during iteration (I have a server which makes extensive use of conditions on which this happens about once a day.) This patch fixes this bug by moving wait()'s modification of self._waiters to be inside the lock, as suggested by Antoine Pitrou here: http://bugs.python.org/issue17385#msg183875 -- components: Library (Lib) files: fix.diff keywords: patch messages: 225208 nosy: dougz, pitrou priority: normal severity: normal status: open title: Occasional RuntimeError from Condition.notify type: crash versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36351/fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Antoine Pitrou added the comment: I think we cannot add that optimization in a bugfix release, for the reason you stated: it could break existing systems. It would probably be fine to add the optimization in 3.5, though (and IMO that would be better than adding an alternate handler class). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Changes by Antoine Pitrou pit...@free.fr: -- stage: test needed - patch review versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Antoine Pitrou added the comment: However, one sticking point is whether that optimization may also have adverse effects in terms of security (since we would always be sending auth headers, even when the server doesn't ask for it...). -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22185] Occasional RuntimeError from Condition.notify
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +rhettinger, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Nick Coghlan added the comment: The PEP 466 exception was also driven by the desire to solve some of the bootstrapping problems otherwise involved in doing pip install requests securely in Python 2. For other HTTP networking issues that can be addressed by use requests, exceptions to the general guidelines to be conservative with changes in maintenance releases are less likely to be granted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16434] SocketServer call shutdown in the wrong way
R. David Murray added the comment: Given the lack of additional info from the OP, I'm closing this. -- nosy: +r.david.murray resolution: - not a bug stage: test needed - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22185] Occasional RuntimeError from Condition.notify
Tim Peters added the comment: +1. I agree it's a bug, that the diagnosis is correct, and that the patch will fix it :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks
Dan O'Reilly added the comment: A couple of small updates based on comments from Charles-François Natali: * Use itertools.chain.from_iterable to yield from the result chunks instead of a for loop. * Add more tests with varying chunksizes. -- Added file: http://bugs.python.org/file36352/map_chunksize_docs_update.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11271 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20746] test_pdb fails in refleak mode
Roundup Robot added the comment: New changeset df832e0c6d7d by Antoine Pitrou in branch '3.4': Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier de Gaye. http://hg.python.org/cpython/rev/df832e0c6d7d New changeset d2041159e8ed by Antoine Pitrou in branch 'default': Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier de Gaye. http://hg.python.org/cpython/rev/d2041159e8ed -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20746] test_pdb fails in refleak mode
Antoine Pitrou added the comment: The regrtest.py part has been fixed independently in #22104 (thank you Zachary). I've now pushed the rest of the patch for test_pdb. Thank you Xavier! -- nosy: +zach.ware resolution: - fixed stage: needs patch - resolved status: open - closed versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20746 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21166] Bus error in pybuilddir.txt 'python -m sysconfigure --generate-posix-vars' build step
Ned Deily added the comment: This problem has reappeared on some of the freebsd buildbots, for example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%202.7/builds/507 Thanks to a lot of good work by koobs in investigating and documenting the problems in irc, we have figured out what is going on here (and it's a lot more difficult to explain than to fix!). The root cause is that there is a bootstrap issue with the pybuilddir.txt Makefile rule. This build step is the first step that uses the newly-built Python executable; it creates the _sysconfigdata.py source that contains the compiled Makefile variables and it also creates pybuilddir.txt which contains a platform-dependent build directory name, primarily for the benefit of cross-compile builds. This support was added by the changes for Issue13150 and Issue17512. They added code in getpath.c to look for and use the build directory name from pybuilddir.txt for getpath.c to determine that the interpreter is being started from a build directory rather than from an installed instance. In the former case, the code in getpath.c is supposed to set up both sys.prefix (for pure modules) and sys.exec_prefix (for C extension modules) so that standard library modules are loaded from the build/source directories. However, if pybuilddir.txt does not already exist when the pybuilddir.txt Makefile rule executes (such as what happens with a clean build directory), getpath.c gets confused: search_for_prefix correctly determines that python is running from a build directory but search_for_exec_prefix does not. This means that the sys.path that is created for this initial run of the newly-built skeleton python will cause it to find the right pure python modules in the source/build directories but it will use the installed location (as set by --prefix, default /usr/local) to search for C standard library shared extension modules (.so's). Now, at this point, no shared .so's could have been built yet (in a clean build) and the -m sysconfig --generate-posix-vars step therefore cannot depend on any such modules. But, if sys.exec_prefix does get set (incorrectly) to an installed path (because pybuilddir.txt does not exist yet) *and* there happen to be .so's there from a previous installation, those .so 's can get imported and attempted to be used. One such case in Python 2.7.x builds is cStringIO.so which is conditionally used by pprint if it is available, falling back to StringIO.py if not. It so happens that pprint is used by sysconfig _generate-posix-vars in that build step. Now it seems that most of the time, the spurious import of incorrect extension modules at this point is harmless. However, there are configurations where that is not the case. One such scenario is that of koobs's freebsd buildbot. In this case, there was already an installed version of Python 2.7 built via the FreeBSD ports system with --enable-shared, a default prefix of /usr/local, and with a wide (ucs4) Unicode build. The buildbot is configured non-shared, with debug enabled, and defaulting to a narrow (ucs2) build and /usr/local prefix. Even though the buildbot build is never installed, whenever pybuilddir.txt did not already exist in the build directory (after a manual clean), getpath's search_for_exec_prefix ended up incorrectly adding /usr/local/lib/pythonx.x/lib-dynload to sys.path and causing cStringIO.so with a conflicting build ABI from the installed system Python to be imported and used, which can be seen in gdb traces to be the cause of the bus error. (With Python 3.x, there is a different scenario that can result in an installed _heapq.so being imported but the root cause is the same.) After finally isolating the scenario, I tried unsuccessfully to reproduce the bus error on some other platforms (e.g. OS X) but I was able to reproduce it on a FreeBSD 10 VM. While this may appear to be a rather obscure scenario, there is at least one other open issue (Issue21412) which seems to be due to the same root cause so it is definitely worth fixing. Rather than adding to the complexity of getpath.c, I think the best way to deal with this is in the Makefile. The attached patches change the pybuilddir.txt rule's recipes to unconditionally create a pybuilddir.txt with a dummy path value which is sufficient to ensure that sys.exec_prefix does not point to the installed path location during this initial step. Further, the patches also cause ./configure to always delete an existing pybuilddir.txt so that it will be properly recreated in case the build environment has changed. I'm cc'ing Matthias here for a review for any cross-compile implications; AFAICT, there shouldn't be any. -- components: +Build keywords: +patch nosy: +doko, ned.deily resolution: fixed - stage: - patch review status: closed - open title: Bus error on AMD64 FreeBSD 9.x 3.4 buildbot - Bus error in pybuilddir.txt 'python -m
[issue21166] Bus error in pybuilddir.txt 'python -m sysconfigure --generate-posix-vars' build step
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file36354/issue21166_3x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21166 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21412] Solaris/Oracle Studio: Fatal Python error: PyThreadState_Get when built --with-pymalloc
Ned Deily added the comment: This appears to be another variation on the problem recently identified in Issue21166, namely that the pybuildir.txt Makefile rule can incorrectly import a shared library module from a previously installed Python instance and, if the ABIs of the installed and being-built Pythons differ, the newly-built interpreter can fail in various ways. From your supplied trace, one can see that _heapq.so has incorrectly been inported from the installed system Python 3.4 which was probably built with --without-pymalloc: #7 0x7ff2f9ee2a6d in PyInit__heapq () from /usr/lib/python3.4/lib-dynload/64/_heapq.so #8 0x7ff2f94c7c78 in _PyImport_LoadDynamicModule () from /builds/jbeck/ul-python-3/components/python/python34/build/amd64/libpython3.4m.so.1.0 The fixes for Issue21166, when applied, should prevent this problem. -- components: +Build -Interpreter Core nosy: +ned.deily resolution: - duplicate stage: - resolved status: open - closed superseder: - Bus error in pybuilddir.txt 'python -m sysconfigure --generate-posix-vars' build step ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21412 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22184] lrucache should reject maxsize as a function
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger priority: normal - low versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22184 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22184] lrucache should reject maxsize as a function
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch stage: - patch review type: - behavior versions: +Python 3.4 Added file: http://bugs.python.org/file36355/lru.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22184 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15955] gzip, bz2, lzma: add option to limit output size
Nikolaus Rath added the comment: *ping* -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15955 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com