[issue15216] Add encoding & errors parameters to TextIOWrapper.reconfigure()

2017-06-03 Thread Nick Coghlan
Nick Coghlan added the comment: `TextIOWrapper.reconfigure()` has been added for 3.7 as part of issue 30526 (currently covering the `line_buffering` and `write_through` options), so I've updated the issue title here to reflect that that's now the relevant API to use to address this particular

[issue28867] NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile)

2017-06-03 Thread Jon Dufresne
Changes by Jon Dufresne : -- pull_requests: +2015 ___ Python tracker ___ ___

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Is it code churn to replace the old style string formatting > or is that something else that should be done as clean-up? Let's leave it as is. Old-style formatting is still valid and is not going away. We consciously decided not to sweep through the

[issue30558] [Suggestion] Improve documentation for set() API

2017-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks like an invalid request. -- assignee: docs@python -> rhettinger ___ Python tracker ___

[issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2017-06-03 Thread Martin Panter
Martin Panter added the comment: See about the “socket.close” exception, which should only affect 3.6+. But the 2.7 “recv” exception is a bit different. -- nosy: +martin.panter ___ Python tracker

[issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6

2017-06-03 Thread Martin Panter
Martin Panter added the comment: Making this an index of related reports: Issue 30319: test_imap Issue 30315: test_ftplib Issue 30543: test_timeout Issue 30328: test_ssl Issue 27784: test_asyncore.TestAPI_UseIPv6Select.test_handle_accept, test_socketserver Issue 30106:

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread Johannes Löthberg
Johannes Löthberg added the comment: Ah, didn't even see your comment before I did it! Fix to the comments are on the same branch, will be rebased before PR is up. -- ___ Python tracker

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread Mark Sapiro
Mark Sapiro added the comment: It looks like Johannes beat me to it. Thanks for that, but see my comments in the diff at https://github.com/kyrias/cpython/commit/a986a8274a522c73d87360da6930e632a3eb4ebb -- ___ Python tracker

[issue30562] SSL socket does not respect SO_RCVTIME0 timeouts

2017-06-03 Thread Allan Crooks
New submission from Allan Crooks: I initially filed this ticket against the ldap3 library, as this is where I first encountered the issue: https://github.com/cannatag/ldap3/issues/356 I've attached a file which reproduces the issue using the standard library - it makes both a HTTP and HTTPS

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread Johannes Löthberg
Johannes Löthberg added the comment: Fix: https://github.com/kyrias/cpython/commit/a986a8274a522c73d87360da6930e632a3eb4ebb Testcase: https://github.com/kyrias/cpython/commit/9a510426522e1d714cd0ea238b14de0fc76862b2 Can start a PR once my CLA signature goes through I guess. --

[issue30561] sync-up gammavariate and expovariate code

2017-06-03 Thread Leonardo De Marchi
Changes by Leonardo De Marchi : -- pull_requests: +2014 ___ Python tracker ___

[issue30464] gammavariate has a wrong comment

2017-06-03 Thread Leonardo De Marchi
Changes by Leonardo De Marchi : -- pull_requests: +2012 ___ Python tracker ___

[issue30561] sync-up gammavariate and expovariate code

2017-06-03 Thread Leonardo De Marchi
Changes by Leonardo De Marchi : -- pull_requests: +2011 ___ Python tracker ___

[issue25910] Fixing links in documentation

2017-06-03 Thread Guido van Rossum
Guido van Rossum added the comment: I can make the logos.html page appear. Just keep the link in the license as it is. On Jun 3, 2017 1:05 PM, "Sanyam Khurana" wrote: > > Changes by Sanyam Khurana : > > > -- > pull_requests: +2010 >

[issue21783] smtpd.py does not allow multiple helo/ehlo commands

2017-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This is now fixed in aiosmtpd HEAD (what will be 1.1) I'm going to close this issue here even though smtpd.py isn't fixed since it's unlikely that anybody wants to keep working on smtpd.py. Feel free to reopen it if you do. -- resolution: -> wont

[issue30561] sync-up gammavariate and expovariate code

2017-06-03 Thread Leonardo De Marchi
New submission from Leonardo De Marchi: As suggested by rhettinger in http://bugs.python.org/msg294438: I agree that the comment should be changed. While we at it, perhaps sync-up with expovariate() code and eliminate the ``u <= 1e-7`` test: Instead of: elif alpha == 1.0:

[issue25910] Fixing links in documentation

2017-06-03 Thread Sanyam Khurana
Changes by Sanyam Khurana : -- pull_requests: +2010 ___ Python tracker ___ ___

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread Mark Sapiro
Mark Sapiro added the comment: I considered look before you leap, but I decided since we're munging the headers anyway, preserving their order is not that critical, but the patch is easy enough. I'll work on that and a test. -- ___ Python tracker

[issue25910] Fixing links in documentation

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > www.pythonlabs.com still exists. (The www. is mandatory.) But http://www.pythonlabs.com/logos.html doesn't. And since this link is a part of the BeOpen.com license, changing it changes the license. I don't know whether this part of the license is valid if

[issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors

2017-06-03 Thread Thomas Perl
Thomas Perl added the comment: Quick fix for the patch: Of course, the line with abort() needs to be removed before this block: +if (_fatal_error_abort_func != NULL) { +_fatal_error_abort_func(msg); +} else { +abort(); +} --

[issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors

2017-06-03 Thread Thomas Perl
New submission from Thomas Perl: In our application that embeds a Python interpreter, we had the issue that certain system configurations (namely, a lone "libpython27.dll" without any standard library) caused silent failures (note that this is using Python 2.7, but Python 3.x would be

[issue30558] [Suggestion] Improve documentation for set() API

2017-06-03 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger status: pending -> open ___ Python tracker ___

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no respective type. abs() is just an arbitrary example. There are perhaps tens functions affected by this bug. test_exception_messages looks an overkill. There are similar tests in test_capi and test_getargs2 that test public PyArg_* functions. But

[issue29929] Eliminate implicit __main__ relative imports

2017-06-03 Thread Chris Angelico
Changes by Chris Angelico : -- nosy: +Rosuav ___ Python tracker ___ ___ Python-bugs-list

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Brett Cannon
Brett Cannon added the comment: The tests could either go into the respective type's tests or a new test module like test_exception_messages could be added that's only to help keep messages in sync with each other. -- ___ Python tracker

[issue30498] Run Python's slowest tests in the first 3/4 of tests when using -r

2017-06-03 Thread Brett Cannon
Brett Cannon added the comment: Travis takes nearly 22 minutes to do a test run with the slowest test currently at just under 8 minutes. That means on Travis the slowest test takes roughly 1/3 of the time. But with your machine taking literally 2 minutes, or 1/10 the time as Travis, to do a

[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-06-03 Thread Brett Cannon
Brett Cannon added the comment: One thing to note is if we want to speed up things like the coverage run on Travis we may want to make this optionally more deterministic rather than fully random for the 10 selected files, otherwise coverage shifts and we can't rely on any coverage metrics

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2017-06-03 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +2009 ___ Python tracker ___ ___

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread R. David Murray
Changes by R. David Murray : -- stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread R. David Murray
R. David Murray added the comment: replace_header has a different semantic than del-and-set (replace_header leaves the header in the same location in the list, rather than appending it to the end...that's it's purpose). If replace_header is throwing a key error, then I guess we need a

[issue25910] Fixing links in documentation

2017-06-03 Thread Jim Fulton
Jim Fulton added the comment: Zope Corporation no longer exists. Any references to it should be in the past tense and without a link. (The http://www.zope.org is for the Zope Foundation, which is a different thing.) -- ___ Python tracker

[issue25910] Fixing links in documentation

2017-06-03 Thread Guido van Rossum
Guido van Rossum added the comment: www.pythonlabs.com still exists. (The www. is mandatory.) And zope.org also still works. On Jun 3, 2017 7:52 AM, "Barry A. Warsaw" wrote: > > Barry A. Warsaw added the comment: > > Adding Jim Fulton (for Zope) and Guido (for

[issue30498] Run Python's slowest tests in the first 3/4 of tests when using -r

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue30417. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This made tests faster by a third! -- ___ Python tracker ___ ___

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Adding support of more general int-like objects in islice() looks reasonable to me. I'm not sure about permutations(), but if make this change, use PyIndex_Check() instead of PyNumber_Check(), or don't use the special check at all, allowing

[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-06-03 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +2008 ___ Python tracker ___ ___

[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-03 Thread Julien Palard
Julien Palard added the comment: It works in "discover" mode, I tested: ./python -m unittest discover ./Lib/unittest/test/ --list-tests and it worked. So maybe the --list-tests should be moved to _getDiscoveryArgParser? Also spotted that tests are printed on stderr, typically when the users

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And disable the "tzdata" resource for skipping generated tests for all timezones in test_datetime. Or make them requiring not only "tzdata", but "cpu". -- nosy: +belopolsky, pitrou, serhiy.storchaka ___ Python

[issue30518] Import type aliases from another module

2017-06-03 Thread John Jackson
John Jackson added the comment: Thanks for your response! Yes, the problem was a circular definition. I still have much to learn about Python... -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How to use this feature? "./python -m unittest --list-tests" produces nothing. -- nosy: +serhiy.storchaka ___ Python tracker

[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-06-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30559] Bugs in Web app

2017-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is good that you included both a short program and the full traceback. Too many beginners don't do that when asking questions. Three comments: your program does not have syntax errors and compiled just fine; exceptions almost never involved the editor/IDE

[issue30540] regrtest: add --matchfile option

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I less need reading test names from a file than other changes in this file. :) But what about doctests? They are run unconditionally. -- ___ Python tracker

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you. I've added that. This may seem like an odd question, but should I assume that the docs should always match the code? For example, in the Functional HOWTO, I wasn't sure if the arguments were left off purposely or if it was just something that

[issue27321] Email parser creates a message object that can't be flattened

2017-06-03 Thread Johannes Löthberg
Johannes Löthberg added the comment: Any updates on this? I'm having the same problem with some non-spam emails while trying to use some mail-handling tools written in Python. -- nosy: +Johannes Löthberg ___ Python tracker

[issue30534] error message for incorrect call degraded in 3.7

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated error messages. Later I'm going to unify error messages for Python and C functions. But this is a different issue. I can wrote a test, but I don't know good place for it. test_builtin doesn't look a good place to me. --

[issue25910] Fixing links in documentation

2017-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Adding Jim Fulton (for Zope) and Guido (for Pythonlabs). I don't know who owns the former, but I'm fairly sure Guido owns the pythonlabs domain. -- nosy: +gvanrossum, j1m ___ Python tracker

[issue29929] Eliminate implicit __main__ relative imports

2017-06-03 Thread Nick Coghlan
Nick Coghlan added the comment: See https://mail.python.org/pipermail/import-sig/2017-March/001068.html for the above-mentioned import-sig post (the design in that email isn't the same as the one described above, but later in the thread I decided the design suggested here is likely to be less

[issue30555] _io._WindowsConsoleIO breaks in the face of fd redirection

2017-06-03 Thread Segev Finer
Changes by Segev Finer : -- pull_requests: +2007 ___ Python tracker ___ ___

[issue24744] Lack of type checks in pkgutil.walk_packages and friends

2017-06-03 Thread R. David Murray
R. David Murray added the comment: As I mentioned on the PR I think it should be a ValueError, and that the PR also needs tests. -- ___ Python tracker

[issue25910] Fixing links in documentation

2017-06-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think only lawyers or people related to the Zope Corporation and the BeOpen PythonLabs team can help with fixing the links to http://www.zope.com/ and http://www.pythonlabs.com/logos.html. -- ___ Python tracker

[issue30526] Allow setting line_buffering on existing TextIOWrapper

2017-06-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 3c2817b6884a5fcf792197203f3c26b157210607 by Antoine Pitrou in branch 'master': Fix bpo-30526: Add TextIOWrapper.reconfigure() and a TextIOWrapper.write_through attribute (#1922)

[issue25910] Fixing links in documentation

2017-06-03 Thread SilentGhost
SilentGhost added the comment: > can I work on this and fix the remaining links? Please do. -- ___ Python tracker ___

[issue30559] Bugs in Web app

2017-06-03 Thread Mark Dickinson
Mark Dickinson added the comment: Hi Mahira, This site is for reporting bugs in the Python core language itself, not bugs in code written by users. You appear to be using the "Learn Python the Hard Way" tutorial, which is a third-party resource that's not maintained by the Python language

[issue30559] Bugs in Web app

2017-06-03 Thread Mahira
New submission from Mahira: Hai I followed your Tutorial In the Following Program, i am getting Traceback (most recent call last): File "C:\Users\Mahira\AppData\Local\Programs\Python\Python36\Scripts\localhost.py", line 1, in import web File

[issue24744] Lack of type checks in pkgutil.walk_packages and friends

2017-06-03 Thread Sanyam Khurana
Changes by Sanyam Khurana : -- pull_requests: +2006 ___ Python tracker ___ ___

[issue24744] Lack of type checks in pkgutil.walk_packages and friends

2017-06-03 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi r.david.murray, What error do you think should be raised in this case, when path is an instance of str? I'll issue a PR once I know what end results are expected. -- nosy: +CuriousLearner ___ Python tracker

[issue25910] Fixing links in documentation

2017-06-03 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi, If this work is not being actively worked on, can I work on this and fix the remaining links? -- nosy: +CuriousLearner ___ Python tracker

[issue30558] [Suggestion] Improve documentation for set() API

2017-06-03 Thread Martin Panter
Martin Panter added the comment: Did you see ? -- assignee: -> docs@python components: +Documentation nosy: +docs@python, martin.panter status: open -> pending ___ Python

[issue30458] CRLF Injection in httplib

2017-06-03 Thread Martin Panter
Martin Panter added the comment: You can also inject proper HTTP header fields (or do multiple requests) if you omit the space after the CRLF: urlopen("http://localhost:8000/ HTTP/1.1\r\nHEADER: INJECTED\r\nIgnore:") Data sent to the server: >>> server = socket(AF_INET, SOCK_STREAM,