[issue23674] super() documentation isn't very clear

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Here is a patch against Python 3 with my suggestions. Let me know what you think, if I got anything wrong, extra bits that could be changed, etc. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file41255/super.patch

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Here is a better failure in test_close_fds_after_preexec(), raising ENOMEM, so I am fairly confident that my fix is working and the exception from fork() is passing through properly.

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6f831de45f43 by Martin Panter in branch '3.4': Issue #25764: Skip the test on OS X https://hg.python.org/cpython/rev/6f831de45f43 New changeset 6211c41106cc by Martin Panter in branch '3.5': Issue #25764: Merge OS X test skipping from 3.4 into 3.5

[issue25804] Make Profile.print_stats support sorting by mutiple values

2015-12-05 Thread Chiu-Hsiang Hsu
Chiu-Hsiang Hsu added the comment: Attached refactored patch with tests. -- Added file: http://bugs.python.org/file41249/print_stats_with_test.patch ___ Python tracker

[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Daniel Lepage
Daniel Lepage added the comment: It looks like this is an OSX-specific behavior, and not a python problem: $ mkdir . mkdir: .: File exists $ mkdir / mkdir: /: Is a directory -- ___ Python tracker

[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-05 Thread Isobel Hooper
Isobel Hooper added the comment: Attached patch fixes library/base64.rst as requested, and adds a mention of RFC 3548 into the b2a_base64() docs in library/binascii.rst. I'm not sure I've made the changes against the right version of the docs - I think this might be against the 3.3 docs.

[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Steve Dower
Steve Dower added the comment: I don't want to do it without running it through the buildbots at least. There's so much that can change just by rebuilding. I'd love to say I have the time today to make the change and validate two separate versions before producing the releases, but I really

[issue23962] Incorrect TimeoutError referenced in concurrent.futures documentation

2015-12-05 Thread Dingyuan Wang
Changes by Dingyuan Wang : -- nosy: +gumblex ___ Python tracker ___ ___

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote: >The underlying issue is classic: PyDict_SetItem returns NULL if the stack is >too deep. This confuses import. Thanks for digging into this Benjamin. I'm not able to investigate further atm, but could

[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I just reviewed again, and I agree it's ready for merge. I don't see any immediate need to add more. Unfortunately, I'm not a committer. -- ___ Python tracker

[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Carol Willing
Carol Willing added the comment: Stephen, Thanks for reviewing to make sure it's still current. I appreciate it. Core devs: Please merge and we'll close this one. Thanks. -- ___ Python tracker

[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread SilentGhost
Changes by SilentGhost : -- keywords: +needs review -patch ___ Python tracker ___ ___

[issue25807] test_multiprocessing_fork.test_mymanager fails and hangs

2015-12-05 Thread SilentGhost
New submission from SilentGhost: When running either of the test_multiprocessing_fork, test_multiprocessing_spawn or test_multiprocessing_forkserver I get error in test_mymanager that leads to hanging. Here is the fragment: test_mymanager

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-05 Thread Tal Einat
Tal Einat added the comment: The entire test suite passes with the v2 patch on my OSX 10.10. -- ___ Python tracker ___

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Nick Coghlan
Nick Coghlan added the comment: That import will only import the parent package (if there is one), not the module itself. Imports from __main__ will still happen during the exec call later on. -- ___ Python tracker

[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Eryk Sun
Eryk Sun added the comment: The mkdir method needs a fix similar to what was done for issue 25583. For example, currently on Windows the exist_ok option doesn't handle the PermissionError raised when [accidentally] trying to create the root directory: >>>

[issue20210] Provide configure options to enable/disable Python modules and extensions

2015-12-05 Thread Chiu-Hsiang Hsu
Changes by Chiu-Hsiang Hsu : -- nosy: +wdv4758h ___ Python tracker ___ ___

[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9a0ac60f876 by Ned Deily in branch '2.7': Issue #25798: Update OS X 10.5+ 32-bit-only installer to build https://hg.python.org/cpython/rev/f9a0ac60f876 New changeset 51a0dd6f7c73 by Ned Deily in branch '3.4': Issue #25798: Update OS X 10.5+

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Thanks Bohuslav, and also to Hans for helping track this down. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay; let's leave things as is for 2.7.11. It's fine to commit the update to the 2.7 branch. The release comes from my private 2.7.11 release branch, so wouldn't include it. On Sat, Dec 5, 2015, at 07:12, Steve Dower wrote: > > Steve Dower added the

[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread SilentGhost
SilentGhost added the comment: No, what this piece of code shows is that trying to assign a value to a tuple element will cause an error. Of course, the same error would be raise when using the the value 12345, but it's more instructive to use a different value to not confuse the reader.

[issue25809] "Invalid" tests on locales

2015-12-05 Thread bapt
New submission from bapt: the locale tests the return value of locale functions against known good values. The problem is when those known good values becomes wrong because of an update of the locales. For example in recent CLDR definition the french separator for thousands in a "non

[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-05 Thread Eryk Sun
Changes by Eryk Sun : -- nosy: +pitrou versions: +Python 3.6 ___ Python tracker ___ ___

[issue25808] The Python Tutorial 5.3. Tuples and Sequences

2015-12-05 Thread Ben Schreib
New submission from Ben Schreib: The example given in section 5.3 shows an output of "t[0] = 8" but I believe it should be "t[0] = 12345" >>> t (12345, 54321, 'hello!') >>> # Tuples may be nested: ... u = t, (1, 2, 3, 4, 5) >>> u ((12345, 54321, 'hello!'), (1, 2, 3, 4, 5)) >>> # Tuples are

[issue16458] subprocess.py throw "The handle is invalid" error on duplicating the STD_INPUT_HANDLE

2015-12-05 Thread Eryk Sun
Changes by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess failing in GUI applications on Windows ___ Python tracker

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests

2015-12-05 Thread Eryk Sun
Eryk Sun added the comment: test_CTRL_C_EVENT can be removed from Lib/test/test_os.py. It's of no practical consequence. Ctrl+Break is always enabled in the child process, so test_CTRL_BREAK_EVENT should remain. When using CREATE_NEW_PROCESS_GROUP, the child process is started with Ctrl+C

[issue25809] "Invalid" tests on locales

2015-12-05 Thread SilentGhost
Changes by SilentGhost : -- nosy: +lemburg, loewis ___ Python tracker ___ ___

[issue25809] "Invalid" tests on locales

2015-12-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I see three options: 1. remove the French entry from the dict 2. enhance the test to accept multiple valid values 3. replace the French entry with a different locale that doesn't change the mapping often --

[issue25809] "Invalid" tests on locales

2015-12-05 Thread Zachary Ware
Changes by Zachary Ware : -- keywords: +buildbot nosy: +zach.ware stage: -> needs patch versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue25492] subprocess with redirection fails after FreeConsole

2015-12-05 Thread Eryk Sun
Changes by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> subprocess failing in GUI applications on Windows ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Err, sorry, it's actually PyDict_GetItem which is the problem. Basically if you try to import with a very deep stack, doing PyDict_GetItem on sys.modules can return NULL (fro copy_reg). That confuses import a lot. I haven't exactly figured out why those

[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Carol Willing
Carol Willing added the comment: Ezio, Brett, Stephen: Would one of you be able to merge this? Thanks. -- ___ Python tracker ___

[issue12923] test_urllib fails in refleak mode

2015-12-05 Thread Martin Panter
Martin Panter added the comment: All three patches look generally good to me. I left some comments on things I would change. FTR the tests fail to raise any exception when the redirect limit is reached because FancyURLopener.http_error_default() does not raise an error. It just returns the

[issue25806] ResourceWarning in test_tasks

2015-12-05 Thread Martin Panter
Martin Panter added the comment: This could be the same as one of the messages listed in Issue 25272. -- nosy: +martin.panter ___ Python tracker ___

[issue25806] ResourceWarning in test_tasks

2015-12-05 Thread SilentGhost
SilentGhost added the comment: Indeed it's one of those posted in the msg255490 -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio tests are getting noisy ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Err, sorry, it's actually PyDict_GetItem which is the problem. Basically if you try to import with a very deep stack, doing PyDict_GetItem on sys.modules can return NULL (fro copy_reg). That confuses import a lot. I haven't exactly figured out why those

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost
SilentGhost added the comment: I think this is the case where hard-coded strings where not updated in the C files. -- nosy: +SilentGhost versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832
random832 added the comment: Oh, I just noticed, the help string is also wrong in 3.5 (which explains why you removed 3.5 from the versions list, which I hadn't noticed until after posting my previous comment). -- ___ Python tracker

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost
SilentGhost added the comment: I'm not sure how the people are supposed to discover this convention according to pep 436. Or is this now intended as two separate incompatible conventions for online docs and built-in help? -- ___ Python tracker

[issue25812] locale.nl_langinfo() can't decode value

2015-12-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> import locale >>> locale.setlocale(locale.LC_NUMERIC, 'uk_UA') 'uk_UA' >>> locale.getlocale(locale.LC_NUMERIC) ('uk_UA', 'KOI8-U') >>> locale.nl_langinfo(locale.THOUSEP) Traceback (most recent call last): File "", line 1, in UnicodeDecodeError:

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Martin Panter
Martin Panter added the comment: See Issue 23738 where my current patch proposes using the PEP 457 slash (/) notation in the RST documentation, including for eval(). I’m not sure if there is a clear concensus for applying my patch however. An alternative would be to use the square-bracket

[issue25529] Provide access to the validated certificate chain in ssl module

2015-12-05 Thread rugk
rugk added the comment: Oops, forgot a word: *"seems to have until now" to "seems to have replied until now" -- ___ Python tracker ___

[issue25529] Provide access to the validated certificate chain in ssl module

2015-12-05 Thread rugk
rugk added the comment: Very nice idea. But no developer/maintainer seems to have until now, so I'll just like to ask whether there are any news regarding this issue. -- nosy: +rugk ___ Python tracker

[issue23962] Incorrect TimeoutError referenced in concurrent.futures documentation

2015-12-05 Thread Martin Panter
Martin Panter added the comment: A similar problem used to exist with asyncio.TimeoutError: Issue 21376. There is no class called concurrent.future.Error, so I would remove that bit. Otherwise, the rest of the patch looks worthwhile. With asyncio and multiprocessing, the exception name is

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832
random832 added the comment: What about fixing all methods so that they can take keywords? Are the functions with their current C signatures part of the stable ABI? Is there somewhere we could centrally add some magic "convert tuple+keywords to tuple, given list of names" code? --

[issue25777] Misleading descriptions in docs about invoking descriptors.

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Similar change needed for . There, it uses the noun “binding”, which seems an appropriate description of the action. -- ___ Python tracker

[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-12-05 Thread Larry Hastings
Larry Hastings added the comment: Fixed in 3.5.1 final. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue25709] Problem with string concatenation and utf-8 cache.

2015-12-05 Thread Larry Hastings
Larry Hastings added the comment: I cherry-picked this for 3.5.1. -- ___ Python tracker ___ ___

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Martin Panter
Martin Panter added the comment: See Issue 8706 about changing functions and methods to accept keyword arguments. But this cannot be done in general. What would you call the first argument to dict() such that all possible keyword arguments still work? What is the first range() argument

[issue23738] Clarify documentation of positional-only default values

2015-12-05 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +Python 3 documentation for eval is incorrect ___ Python tracker ___

[issue25809] "Invalid" tests on locales

2015-12-05 Thread koobs
Changes by koobs : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-05 Thread Larry Hastings
Larry Hastings added the comment: I'm not going to hold up 3.5.1 for this. -- priority: release blocker -> high ___ Python tracker ___

[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-05 Thread Larry Hastings
Larry Hastings added the comment: I don't agree that a reference cycle counts as a release blocker. -- nosy: +larry priority: release blocker -> normal ___ Python tracker

[issue23738] Clarify documentation of positional-only default values

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Here is a more conservative patch using square brackets, and documenting the defaults in the text. I updated all the documentation from my previous patch, and added new changes for the “io” module. One quirk was that BufferedReader.read1() does not actually

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This may be related to issue9917. -- ___ Python tracker ___ ___

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Here is an updated patch for Python 3. I did not remove the “lost sys.stderr” check I mentioned earlier, because the implementation still needs it to call flush(). Changes compared to Michael’s patch: * Added a test for input() using a pseudoterminal and

[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-05 Thread Brett Cannon
Brett Cannon added the comment: Serhiy's latest patch LGTM. -- assignee: brett.cannon -> serhiy.storchaka stage: patch review -> commit review ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Benjamin! This stably reproduce the issue. Just wondering how you found this minimal sequence? -- ___ Python tracker

[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The purpose was to exclude it from run with -uall. It is norm if one or two test methods are needed the "largefile" flag. But if all methods in a test file create large files, running this test file becomes a pain. --

[issue25804] Make Profile.print_stats support sorting by mutiple values

2015-12-05 Thread Chiu-Hsiang Hsu
New submission from Chiu-Hsiang Hsu: Currently, the result of profile.run can not easily sort by mutiple values with "sort" keyword argument. Following code will work with this patch. >>> import cProfile >>> cProfile.run('42**42', sort=('tottime', 'stdname')) 3 function calls in 0.000

[issue25755] Test test_property failed if run twice

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or move the definition of the class to testing method. -- ___ Python tracker ___

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-05 Thread Martin Panter
Martin Panter added the comment: I am inclined to just skip the test on OS X, unless some OS X angel wants to help me investigate this :) @skipIf(sys.platform == "darwin", "setrlimit() seems to fail on OS X") -- ___ Python tracker

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832
random832 added the comment: I guess the next question is what the intent is. Was there an intent, which was not followed through on, to upgrade these methods to support keyword arguments? Or is there an intent (here and everywhere) that documentation using keyword argument syntax is

[issue25809] "Invalid" tests on locales

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Originally the case for French was 'fr_FR': (',', ''). '' means "unknown" value and is not tested. We can return this value to omit test for thousand separator, or remove the French locale at all. -- nosy: +serhiy.storchaka

[issue25768] compileall functions do not document or test return values

2015-12-05 Thread Nicholas Chammas
Nicholas Chammas added the comment: Absolutely. I'll add a "bad source file" to `setUp()` [0] and check return values as part of the existing checks in `test_compile_files()` [1]. Does that sound like a good plan to you? Also, I noticed that `compile_path()` has no tests. Should I test it as

[issue25801] ResourceWarning in test_zipfile64

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Patch looks fine according to my limited understanding of the zipfile module. -- ___ Python tracker ___

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread Andre Roberge
New submission from Andre Roberge: The documentation for eval() indicates that it takes keyword arguments: eval(expression, globals=None, locals=None) However, that is incorrect, as indicated by the builtin help: >>> help(eval) Help on built-in function eval in module builtins: eval(...)

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost
Changes by SilentGhost : -- stage: -> needs patch ___ Python tracker ___ ___

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost
Changes by SilentGhost : -- nosy: +larry ___ Python tracker ___ ___ Python-bugs-list

[issue25811] return from random.shuffle

2015-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agreed with all Emanuel has said. -- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-05 Thread desbma
desbma added the comment: Thank you SilentGhost for the second review on the v4 patch. Attached is the v5 patch which hopefully is getting even better. -- Added file: http://bugs.python.org/file41252/issue25156_v5.patch ___ Python tracker

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-05 Thread SilentGhost
SilentGhost added the comment: No further comments from me. I haven't run the test, but I trust it passes without any warnings. -- nosy: +SilentGhost ___ Python tracker

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread random832
random832 added the comment: Whatever the case may be, it *doesn't* support keyword arguments. e.g.: >>> eval("a+b", globals={'a':1}, locals={'b':2}) TypeError: eval() takes no keyword arguments So as the current situation stands, the documentation is wrong, and the help string is consistent

[issue25811] return from random.shuffle

2015-12-05 Thread Eugene Yunak
New submission from Eugene Yunak: random.shuffle operates on a list, and changes it in place. I think returning a reference to this list, the same one we got in as the argument, is quite useful and makes it possible to use random.shuffle in chained function calls, e.g.:

[issue25811] return from random.shuffle

2015-12-05 Thread Emanuel Barry
Emanuel Barry added the comment: While I do see the desire to get your list back for such cases (I would have liked so, too, in some cases), it's inconsistent, as everything else operating in-place returns None. Plus, having it return None helps you remember that you should keep the

[issue25810] Python 3 documentation for eval is incorrect

2015-12-05 Thread SilentGhost
SilentGhost added the comment: Yes, whatever Andre's posted is not an output from 3.5. It's 3.4 or earlier. Also it's a wider problem because the same issue exists for exec: built-in help shows keyword arguments, while docs and implementation require only positional. -- versions:

[issue25813] co_flags section of inspect module docs out of date

2015-12-05 Thread Mark Lawrence
New submission from Mark Lawrence: It states "bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg" which is identical to the 2.7 docs. Hence it bears no resemblance to the latest code.h, which for example has #define CO_ITERABLE_COROUTINE 0x0100. -- assignee: docs@python

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2015-12-05 Thread Rose Ames
Changes by Rose Ames : -- nosy: +superluser ___ Python tracker ___ ___ Python-bugs-list

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Martin Panter
Martin Panter added the comment: init-ancestor.2.patch implements the single __import__ with ImportError.name checking -- Added file: http://bugs.python.org/file41254/init-ancestor.2.patch ___ Python tracker

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-12-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 20ea1b0e by Martin Panter in branch '3.5': Issue #25717: Tolerate fstat() failures in the FileIO constructor https://hg.python.org/cpython/rev/20ea1b0e New changeset 8c978cbe057c by Martin Panter in branch 'default': Issue #25717: Merge

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Yes, the package is all we need to import. I understand this bug is all about importing the parent package, and not __main__. If you read the original report, it is __init__.py that is trying to import a missing module. --

[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-05 Thread Yury Selivanov
Yury Selivanov added the comment: This cycle leads to infinite unbreakable loop in cpython c internals. Sent from my iPhone > On Dec 5, 2015, at 7:44 PM, Larry Hastings wrote: > > > Larry Hastings added the comment: > > I don't agree that a reference cycle counts as