[issue28183] Clean up and speed up dict iteration

2016-10-01 Thread INADA Naoki
INADA Naoki added the comment: dict_iter8.patch is based on dict_iter3.patch. Added some comments and fixing indents. No change about _PyDict_Next API. -- Added file: http://bugs.python.org/file44921/dict_iter8.patch ___ Python tracker

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-01 Thread Zachary Ware
Zachary Ware added the comment: For future reference, having a patch attached to the issue does not mean the issue is fixed, and it should not be closed. -- nosy: +zach.ware stage: -> resolved type: -> compile error versions: +Python 3.7 -Python 3.4

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3bde312ae936 by Zachary Ware in branch 'default': Issue #21124: Fix building _struct on Cygwin. https://hg.python.org/cpython/rev/3bde312ae936 -- nosy: +python-dev ___ Python tracker

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: > The newly-added statistics.geometric_mean function appears to have no > tests at all That's weird and unfortunate. I certainly wrote tests, and I have a backup of them. I have no idea what happened. Attached is a patch that adds the tests, but obviously I

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Thanks for landing all the changes :) It's definitely surprising to see those old CPython codes. -- ___ Python tracker

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Tiago Antao
Tiago Antao added the comment: I made a small patch for this. This is the first time I submit one, so please be careful with this... -- keywords: +patch nosy: +tiagoantao Added file: http://bugs.python.org/file44919/mp.patch ___ Python tracker

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks reasonable. -- ___ Python tracker ___ ___

[issue28334] netrc does not work if $HOME is not set

2016-10-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Dimitri. I think this is a reasonable improvement. However, since we are changing the behavior of the netrc() class, I'm not sure this can be considered as a bug fix. In any case, 3.3 and 3.4 are in security-fix-only mode so I'm going to

[issue28222] test_distutils fails

2016-10-01 Thread Berker Peksag
Berker Peksag added the comment: I can reproduce it with the following dependencies: $ pip list docutils (0.12) pip (8.1.2) setuptools (27.1.2) The test was added in issue 23063. Since the purpose of the test was testing a bug in _check_rst_data(), skipping it if pygments is

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy -needs review ___ Python tracker ___

[issue28222] test_distutils fails

2016-10-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hmm.. the test works for me on master branch $ ./python.exe -m test test_distutils Run tests sequentially 0:00:00 [1/1] test_distutils 1 test OK. Total duration: 4 sec Tests result: SUCCESS -- ___ Python tracker

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Ned Deily
Ned Deily added the comment: It's a bit late in the 3.6 cycle to be removing macpath, but it's not too late to mark it in 3.6 as deprecated and to be removed in 3.7. If someone wants to write two patches, one for 3.6 to add a deprecation warning to the code and to the docs, the other for 3.7

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07c593845994 by Ned Deily in branch 'default': Issue #28325: Remove vestigal MacOS 9 macurl2path module and its tests. https://hg.python.org/cpython/rev/07c593845994 -- nosy: +python-dev ___ Python

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggestion; I didn't even know that was still around. Because it is a bit late in the game for 3.6 and to be extra cautious, I decided to remove it starting with 3.7. -- resolution: -> fixed stage: -> resolved status: open -> closed type:

[issue28324] Clean up MacOS 9-specific description in the docstring of os.py

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for this patch, too! -- keywords: +gsoc -patch resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> ___ Python tracker

[issue28323] Remove MacOS 9-specific codes from exit() and quit()

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d8d9abb3bf8 by Ned Deily in branch '3.6': Issue #28323: Remove vestigal MacOS 9 checks from exit() and quit(). https://hg.python.org/cpython/rev/2d8d9abb3bf8 New changeset 2c7034d59c7b by Ned Deily in branch 'default': Issue #28323: Merge from 3.6

[issue28323] Remove MacOS 9-specific codes from exit() and quit()

2016-10-01 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch! -- resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> ___ Python tracker

[issue28324] Clean up MacOS 9-specific description in the docstring of os.py

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbdcedf3583e by Ned Deily in branch '3.6': Issue #28324: Remove vestigal MacOS 9 references in os.py docstring. https://hg.python.org/cpython/rev/dbdcedf3583e New changeset d55fd379b994 by Ned Deily in branch 'default': Issue #28324: Merge from 3.6

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Ned Deily
Ned Deily added the comment: I was hoping that the open issues could be resolved in time for b2 but that seems unlikely at this point. So I have to agree that this feature should be deferred to 3.7. Steven, can you make the necessary reverts on the 3.6 branch? --

[issue28088] Document Transport.set_protocol and get_protocol

2016-10-01 Thread Mariatta Wijaya
New submission from Mariatta Wijaya: Added the documentation for set_protocol and get_protocol. -- keywords: +patch Added file: http://bugs.python.org/file44918/issue28088.patch ___ Python tracker

[issue28281] Remove year limits from calendar

2016-10-01 Thread Mark Gollahon
Mark Gollahon added the comment: First time patch for CPython. I followed instructions given by belopolsky and added tests. Please critique. -- keywords: +patch nosy: +golly Added file: http://bugs.python.org/file44917/calendar-no-year-limits.patch

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread R. David Murray
R. David Murray added the comment: OK, lets close this won't fix, then. Especially since aiohttp does use logging already Sorry, Mariatta. Thanks for the patch, but we aren't going to use it. -- resolution: -> wont fix stage: -> resolved status: open -> closed

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread James Lu
Changes by James Lu : -- nosy: +James Lu ___ Python tracker ___ ___ Python-bugs-list

[issue28088] Document Transport.set_protocol and get_protocol

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28089] Document TCP_NODELAY by default

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue13756] Python3.2.2 make fail on cygwin

2016-10-01 Thread Zachary Ware
Zachary Ware added the comment: Fixed on 3.7, we can evaluate backporting later. With this committed, a build on Cygwin can succeed if you configure with --without-threads. Thanks for the patch! -- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open ->

[issue13756] Python3.2.2 make fail on cygwin

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b4c21436036 by Zachary Ware in branch 'default': Issue #13756: Fix building extensions modules on Cygwin https://hg.python.org/cpython/rev/5b4c21436036 -- nosy: +python-dev ___ Python tracker

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The default value of the lower bound index is 0, but the default value of the upper bound index is the length of the sequence. s[:a] is the same as s[0:a], but s[a:] is the same as s[a:len(s)]. If make s[a:0] meaning the same as s[a:len(s)], i.e. return a

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks reasonable. ntohl() and htonl() already raise an exception if the argument exceeds 32 bit. Added comments on Rietveld. -- nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker

[issue28336] Slicing (operation) is not symmetrical with respect to suffixes and prefixes

2016-10-01 Thread Juan Carlos Pujol Mainegra
New submission from Juan Carlos Pujol Mainegra: Let s be a string or other array-like object, a, b > 0 integers, s[0:b] returns a b-long prefix to s, the same as s[:b], but s[-a:0] returns empty (for len(s) > 0 and a > 1), while it should return the same as s[-a:], an a-long suffix (a > 0).

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44916/os_waitpid_updated_codebase_2_jaysinh.diff ___ Python tracker ___

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44915/os_waitpid_updated_codebase_jaysinh.diff ___ Python tracker ___

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Ram Rachum
Ram Rachum added the comment: I now see similar raises that could use a `from` in other places in this module, so I'd suggest going over the module and putting `from`s all over the place. -- ___ Python tracker

[issue28273] Make os.waitpid() option parameter optional.

2016-10-01 Thread Jaysinh shukla
Jaysinh shukla added the comment: Removing the `options` default argument from all the call to os.waitpid. Note: This patch is based on [this patch](http://bugs.python.org/file44822/os_waitpid-optional_options.diff) submitted by StyXman. -- nosy: +jaysinh.shukla Added file:

[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Ram Rachum
New submission from Ram Rachum: In `logging.config.DictConfigurator.configure`, there are exceptions that are caught and then replaced with `ValueError` exceptions. I think you should use the `raise x from y` syntax so that the original tracebacks will be preserved. (I'm debugging such an

[issue22392] Clarify documentation of __getinitargs__

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: Ben Bangert reported to me that this crash caused instabilities in an app using asyncio (https://github.com/home-assistant/home-assistant/issues/3453). This hack made his crashes go away:

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28331] "CPython implementation detail:" is removed when contents is translated

2016-10-01 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: A problem with switching to logging is the API design. There are three functions, log_request(), log_error() and log_message(). The former two call the latter. The API explicitly encourages overriding log_message() to customize logging. But it has no way to

[issue28334] netrc does not work if $HOME is not set

2016-10-01 Thread Dimitri Merejkowsky
New submission from Dimitri Merejkowsky: If $HOME is not set, netrc will raise an exception. Attached patch fixes the problem by using `os.path.expanduser` instead -- components: Library (Lib) files: netrc-use-expanduser.patch keywords: patch messages: 277824 nosy: Dimitri Merejkowsky

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread Jaap van der Velde
Jaap van der Velde added the comment: Closing and not fixing is fair enough - I did not realize that this would be an issue that occurs in many places in stdlib. I realize this is not a help forum, so I will ask elsewhere to see if there's some way to redirect all of sys.stderr in scenarios

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-01 Thread Adam Bartoš
New submission from Adam Bartoš: In my setting (Python 3.6b1 on Windows), trying to prompt a non-ASCII character via input() results in mojibake. This is related to the recent fix of #1602 and so is Windows-specific. >>> input("α") ╬▒ The result corresponds to

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file44913/issue28332_ver1.diff ___ Python tracker ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44912/patchedCPythonTestOutput_ver1.txt ___ Python tracker ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-01 Thread Oren Milman
New submission from Oren Milman: current state Due to the implementation of socket_htons (in Modules/socketmodule.c), in case the received integer does not fit in 16-bit unsigned integer, but does fit in a positive C int, it is silently truncated to 16-bit unsigned

[issue27800] Regular expressions with multiple repeat codes

2016-10-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> martin.panter stage: patch review -> commit review versions: +Python 3.7 ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28330] Use simpler and faster sched.Event definition

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue5830. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker ___

[issue28331] "CPython implementation detail:" is removed when contents is translated

2016-10-01 Thread INADA Naoki
New submission from INADA Naoki: "CPython implementation detail:" label is removed when contents of impl-detail directive is translated. This is very bad for people reading translated documents. Attached patch fixes this, with enabling translating the label, like versionchanged directive.

[issue28330] Use simpler and faster sched.Event definition

2016-10-01 Thread Satoru Logic
New submission from Satoru Logic: By removing the rich comparison dunder methods, the sorting of events will use the faster default implementation. -- components: Library (Lib) files: simple_def.patch keywords: patch messages: 277816 nosy: Satoru Logic priority: normal severity: normal

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2016-10-01 Thread Mark Dickinson
Mark Dickinson added the comment: New patch, with a (very slightly) cleaner implementation of `_frexp_gen`. -- Added file: http://bugs.python.org/file44908/geometric_mean_int_float_v2.patch ___ Python tracker

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2016-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Looks good for me. Thanks for catching this: I knew it was a bug, but then I ran into the issue that I could no longer build 3.6 before I could fix it, and between that and various issues in the real world I never got back to this. --

[issue28329] Add support for customizing scheduler's timefunc and delayfunc using subclassing

2016-10-01 Thread Satoru Logic
Changes by Satoru Logic : -- components: Library (Lib) files: overridable_time_delay.patch keywords: patch nosy: Satoru Logic priority: normal severity: normal status: open title: Add support for customizing scheduler's timefunc and delayfunc using subclassing

[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-01 Thread R. David Murray
R. David Murray added the comment: That would be my answer if we aren't switching to logging. I would consider that an enhancement, but are there reasons to not do that? -- ___ Python tracker

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Unfortunately I'm in a pickle at the moment, I cannot build 3.6 on any of the machines I have available (three), and no time to upgrade them to something that will build 3.6. But I can provide some tests, if somebody is willing to review and check them in to

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-01 Thread Mark Dickinson
New submission from Mark Dickinson: The newly-added statistics.geometric_mean function appears to have no tests at all, with the exception of a single doctest: >>> geometric_mean([1.10, 0.95, 1.12]) 1.0538483123382172 Steve, Ned: what do you think about taking geometric_mean out of

[issue28258] Broken python-config generated with Estonian locale

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Victor! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2016-10-01 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a fix. I was planning to add tests, but as far as I can tell geometric_mean currently has no tests at all. Steve, is that correct? That seems like something that should be fixed before the 3.6 release. -- keywords: +patch Added file:

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2016-10-01 Thread Mark Dickinson
New submission from Mark Dickinson: The following calculations should all be giving the same result: >>> import statistics >>> statistics.geometric_mean([2, 3, 5, 7]) 3.80675409583932 >>> statistics.geometric_mean([2, 3, 5, 7.0]) 1.6265765616977859 >>> statistics.geometric_mean([2, 3, 5.0,

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread ProgVal
New submission from ProgVal: Hello, The following code: import sys import multiprocessing sys.stdout.close() def foo(): pass p = multiprocessing.Process(target=foo) p.start() Crashes with: Traceback (most recent call last): File "foo.py", line 10, in p.start() File

[issue28259] Ctypes bug windows

2016-10-01 Thread Aristotel
Aristotel added the comment: Oh it's ctypes bug on windows only -- ___ Python tracker ___ ___

[issue28259] Ctypes bug windows

2016-10-01 Thread Aristotel
Changes by Aristotel : -- components: +Windows -ctypes ___ Python tracker ___ ___

[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-01 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue28325] Remove MacOS 9-specific module macurl2path.py

2016-10-01 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which the macurl2path module is an example. I propose to remove it for cleaner codes. In f6785bce54b5 (issue7908), reference to macurl2path was

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is similar issue with itertools.cycle(). And leaking SystemError to user code should be considered as a bug. Proposed patch fixes these issues. -- type: security -> crash Added file: http://bugs.python.org/file44905/itertools_setstate.patch

[issue28324] Clean up MacOS 9-specific description in the docstring of os.py

2016-10-01 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which comments about os.py are examples. I propose to clean them up for cleaner codes. Added Mac experts as well as Guido, the author of these

[issue28323] Remove MacOS 9-specific codes from exit() and quit()

2016-10-01 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: As per PEP 11, MacOS 9 support is removed in Python 2.4. There are some leftovers in CPython code base, among which site.setquit is an example. I propose to remove it for cleaner codes. Added Mac experts as well as Guido, the author of this code in the

[issue24274] erroneous comments in dictobject.c

2016-10-01 Thread INADA Naoki
Changes by INADA Naoki : -- assignee: -> inada.naoki stage: needs patch -> patch review ___ Python tracker ___

[issue28201] dict: perturb shift should be done when first conflict

2016-10-01 Thread INADA Naoki
Changes by INADA Naoki : -- stage: -> patch review type: -> performance ___ Python tracker ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-10-01 Thread Martin Panter
Martin Panter added the comment: Hi Michael, I have done some cleanup and modifications to your patch. The result is in aix-library.161001.patch, which has all the changes, i.e. it is not based on another patch. More significant changes I made: * Change getExecLibPath_aix() and find_parts()

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger, serhiy.storchaka stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker

[issue28321] Plistlib: Half of the double width characters are missing when writing binary plist

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The simplest reproducer: >>> import plistlib >>> plistlib.loads(plistlib.dumps('\U0001f40d', fmt=plistlib.FMT_BINARY)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/plistlib.py", line 1006, in loads fp, fmt=fmt,

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread John Leitch
Changes by John Leitch : Added file: http://bugs.python.org/file44900/Py35_itertools.py ___ Python tracker ___

[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread John Leitch
New submission from John Leitch: Python 3.5.2 suffers from a type confusion vulnerability in the chain.__setstate__ method of the itertools module. The issue exists due to lack of argument validation in the chain_setstate() function: static PyObject * chain_setstate(chainobject *lz, PyObject

[issue21085] Cygwin does not provide siginfo_t.si_band

2016-10-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5673cf852daa by Zachary Ware in branch 'default': Issue #21085: Fix accidental leading +'s in configure.ac https://hg.python.org/cpython/rev/5673cf852daa -- ___ Python tracker