[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 18-years-ago 
changeset 813f527f3bec

--
components: Library (Lib), Macintosh
files: quit-macos9.patch
keywords: patch
messages: 277802
nosy: Chi Hsuan Yen, gvanrossum, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Remove MacOS 9-specific codes from exit() and quit()
type: enhancement
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44903/quit-macos9.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 comments in some 
24-year-ago changesets 3169d38f6774, d945cf33a64f and 259923e4d7b1.

--
components: Library (Lib), Macintosh
files: os-macos9.patch
keywords: patch
messages: 277803
nosy: Chi Hsuan Yen, gvanrossum, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Clean up MacOS 9-specific description in the docstring of os.py
type: enhancement
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44904/os-macos9.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 removed from 
Lib/urllib.py, and macurl2path.py says:

Do not import directly; use urllib instead.

So, unlike the concern in issue9850, I bet there are no third party codes 
importing this module. It can be removed from CPython safely.

Added some Mac experts.

--
components: Library (Lib), Macintosh
messages: 277805
nosy: Chi Hsuan Yen, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Remove MacOS 9-specific module macurl2path.py
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28259] Ctypes bug windows

2016-10-01 Thread Aristotel

Changes by Aristotel :


--
components: +Windows -ctypes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28259] Ctypes bug windows

2016-10-01 Thread Aristotel

Aristotel added the comment:

Oh it's ctypes bug on windows only

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "/usr/lib/python3.5/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
  File "/usr/lib/python3.5/multiprocessing/context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/lib/python3.5/multiprocessing/context.py", line 267, in _Popen
return Popen(process_obj)
  File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 17, in __init__
sys.stdout.flush()
ValueError: I/O operation on closed file.


This bug has been reported to me on a daemonized program (written prior to PEP 
3143).

--
components: Library (Lib)
messages: 277807
nosy: Valentin.Lorentz
priority: normal
severity: normal
status: open
title: multiprocessing.Process depends on sys.stdout being open
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, 7.0])
2.4322992790977875
>>> statistics.geometric_mean([2, 3.0, 5.0, 7.0])
3.201085872943679
>>> statistics.geometric_mean([2.0, 3.0, 5.0, 7.0])
3.80675409583932

(Correct result is 3.80675409583932.)

The culprit is this line in statistics._product:

mant, scale = 1, 0  #math.frexp(prod)  # FIXME

... and indeed, we should be starting from `prod` rather than 1 here. But 
simply using math.frexp has potential for failure if the accumulated integer 
product overflows a float.

--
assignee: steven.daprano
messages: 277808
nosy: mark.dickinson, steven.daprano
priority: normal
severity: normal
status: open
title: statistics.geometric_mean gives incorrect results for mixed int/float 
inputs
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: http://bugs.python.org/file44906/geometric_mean_int_float.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Python 3.6, 
leaving us time to get it into shape for 3.7? The implementation of 
geometric_mean is complicated, with many edge cases. The original code was 
committed without review in #27181, and it currently suffers from some serious 
bugs: see #27761, #28111, #28327 (the first of these affects only the tests for 
nroot; the second and third are behaviour bugs in geometric_mean). With the 
lack of tests, and Python 3.6 b2 looming, I think the best thing to do might be 
to defer the inclusion of geometric_mean to Python 3.7.

I'll mark this as a release blocker until we decide what to do.

--
assignee: steven.daprano
messages: 277811
nosy: mark.dickinson, ned.deily, steven.daprano
priority: release blocker
severity: normal
stage: test needed
status: open
title: statistics.geometric_mean has no tests. Defer to 3.7?
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 3.6.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file44907/overridable_time_delay.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
status: open
title: Use simpler and faster sched.Event definition
versions: Python 3.7
Added file: http://bugs.python.org/file44909/simple_def.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: docs@python
components: Documentation
files: impl-detail.patch
keywords: patch
messages: 277817
nosy: docs@python, inada.naoki
priority: normal
severity: normal
stage: patch review
status: open
title: "CPython implementation detail:" is removed when contents is translated
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44910/impl-detail.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 integer (before 
converting to network byte order):
>>> import socket
>>> hex(socket.htons(0x1234))
'0x3412'
>>> hex(socket.htons(0x81234))
'0x3412'
>>> hex(socket.htons(0x881234))
'0x3412'
>>> hex(socket.htons(0x8881234))
'0x3412'
>>> hex(socket.htons(0x1234))
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: Python int too large to convert to C long
>>>

Likewise, socket.ntohs has the same silent truncation feature, due to the 
implementation of socket_ntohs.

ISTM this silent truncation feature has the potential to conceal nasty bugs, 
and I guess it is rarely used in purpose.

With regard to relevant changes made in the past:
* The silent truncation was there since the two functions were first added, 
in changeset 3673 (https://hg.python.org/cpython/rev/f6ace61c3dfe).
* A check whether the received integer is negative was added (to each of 
the two functions) in changeset 40632 
(https://hg.python.org/cpython/rev/6efe3a4b10ac), as part of #1635058.
Note the lack of discussion in #1635058 and #1619659 about backward 
compatibility. It might suggest that Guido didn't hesitate to make the change, 
even though at the time, the four conversion functions (socket.htons, 
socket.ntohs, socket.htonl and socket.ntohl) were already in the wild for 10 
years.


 proposed changes 
1. In Modules/socketmodule.c, raise a DeprecationWarning before silently 
truncating the received integer. In Python 3.8, replace the DeprecationWarning 
with an OverflowError.

2. In Lib/test/test_socket.py, add tests to verify a DeprecationWarning is 
raised as expected.

3. In Doc/library/socket.rst, add a description of the silent truncation 
feature, and declare it is deprecated.


 diff 
The proposed patches diff file is attached.

(I wasn't sure you would approve deprecating a feature that was in the wild for 
so long, but I implemented it anyway, as it was quite simple.)


 tests 
I ran 'python_d.exe -m test -j3' (on my 64-bit Windows 10) with and without the 
patches, and got quite the same output. (That also means my new tests in 
test_socket passed.)
The outputs of both runs are attached.

--
components: Library (Lib)
files: CPythonTestOutput.txt
messages: 277820
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: silent truncations in socket.htons and socket.ntohs
type: behavior
versions: Python 3.7
Added file: http://bugs.python.org/file44911/CPythonTestOutput.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 print("α".encode("utf-8").decode("cp852")). That 
cp852 the default terminal encoding in my locale.

--
components: Unicode, Windows
messages: 277821
nosy: Drekin, ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: input() with Unicode prompt produces mojibake on Windows
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 like these (running a 
service), because tracking down an issue like this takes a lot of time and 
finding the issue buried in a standard library caught me off guard.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 know whether it's called from log_error(), log_request(), or
directly.

So how is it to choose logging levels? I imagine log_request() should
log at the INFO level, log_error() at the ERROR level, and let's say
that direct calls to log_message() should also log at the INFO level
(from looking at the few calls). So how should log_error() distinguish
itself to log_message() without breaking apps that override the
latter?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
priority: normal
severity: normal
status: open
title: netrc does not work if $HOME is not set
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44914/netrc-use-expanduser.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:
https://github.com/home-assistant/home-assistant/commit/922dbba8814b81b69471dc4f1bf5c5a3b2bfe4ed

What are the chances of getting the crash fixed in 3.5.3 and 3.6b2?

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22392] Clarify documentation of __getinitargs__

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 exception now and it's quite frustrating that I'm not 
seeing the full traceback of the original exception.)

--
components: Library (Lib)
messages: 277826
nosy: cool-RR, vinay.sajip
priority: normal
severity: normal
status: open
title: Exception reporting in `logging.config`
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
http://bugs.python.org/file44915/os_waitpid_updated_codebase_jaysinh.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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).

A syntax asymmetry like this shall not be imposed to those using non-literal 
slicing indexes, as it would be necessarily to introduce a control condition to 
test whether the upper bound index is a non-negative quantity, assuming the 
lower bound index is negative. Furthermore, it breaks the whole negative 
slicing idea, being that (I consider) index i always be treated as i mod 
len(s), so that constructions like s[-a:b] (for a, b > 0 or a, b < 0) could 
return s[-a:] + s[:b].

--
components: Interpreter Core
messages: 277829
nosy: jksware
priority: normal
severity: normal
status: open
title: Slicing (operation) is not symmetrical with respect to suffixes and 
prefixes
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 subsequence from 
index a to the end, while s[0:a] means the same as s[:a], i.e. returns a 
subsequence from the begin to index a, what should mean s[0:0]? There is a 
contradiction.

This change would break existing code.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28335] Exception reporting in `logging.config`

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28089] Document TCP_NODELAY by default

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28088] Document Transport.set_protocol and get_protocol

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
https://hg.python.org/cpython/rev/d55fd379b994

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
https://hg.python.org/cpython/rev/2c7034d59c7b

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: enhancement -> 
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to actually remove all traces of macpath, that 
would be great!

--
assignee: ronaldoussoren -> 
type: enhancement -> 
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 not available wouldn't be 
an ideal solution.

We probably need to do something like:

if pygments is not None:
self.assertEqual(len(msgs), 0)
else:
self.assertEqual(len(msgs), 1)
self.assertEqual(
str(msgs[0][1]),
'Cannot analyze code. Pygments package not found.'
)

--
nosy: +berker.peksag
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 remove 
them from the versions field.

We need two things from you to move this forward:

1. A test. It should go in Lib/test/test_netrc.py. You can use

   env = support.EnvironmentVarGuard()
   env.unset('HOME')

   to test the new behavior.

2. A CLA form. You can sign it online at 
https://www.python.org/psf/contrib/contrib-form/

--
nosy: +berker.peksag
stage:  -> patch review
versions:  -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The patch looks reasonable.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 haven't been 
able to run this until I resolve my gcc issues and can build 3.6 again. 
(I did run this some weeks ago, and they passed *then*, but I cannot be 
sure they still pass now.) If somebody would like to test this for me, 
it would be appreciated.

--
keywords: +patch
Added file: http://bugs.python.org/file44920/geometric_mean_tests.patch

___
Python tracker 

___diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py
--- a/Lib/test/test_statistics.py
+++ b/Lib/test/test_statistics.py
@@ -1694,6 +1694,124 @@
 self.assertEqual(statistics.mean([tiny]*n), tiny)
 
 
+class TestGeometricMean(NumericTestCase, AverageMixin, UnivariateTypeMixin):
+def setUp(self):
+self.func = statistics.geometric_mean
+
+def prepare_data(self):
+# Override mixin method.
+values = super().prepare_data()
+values.remove(0)
+return values
+
+def prepare_types_for_conservation_test(self):
+# Override mixin method.
+return (float, Decimal)
+
+def prepare_values_for_repeated_single_test(self):
+# Override mixin method.
+return (3.5, 17, 2.5e9, Decimal('4.9712'), Decimal('9236.40781'))
+
+def test_repeated_fractions(self):
+# This test has been split out from the test_repeated_single_value 
mixin.
+for x in (Fraction(61, 67), Fraction(935, 821)):
+expected = float(x)
+for n in (2, 14, 93):
+with self.subTest(x=x, n=n):
+self.assertEqual(self.func([x]*n), expected)
+
+def test_repeated_huge_single_value(self):
+# Test geometric mean with a single really big float repeated many 
times.
+x = 2.5e15
+for count in (2, 3, 10):
+self.assertEqual(self.func([x]*count), x)
+count = 20
+self.assertApproxEqual(self.func([x]*count), x, rel=1e-15)
+
+def test_zero(self):
+# Test that geometric mean returns zero if zero is an element.
+values = [1, 2, 3, 0, 5]
+self.assertEqual(self.func(values), 0.0)
+
+def test_negative_error(self):
+# Test that geometric mean raises when given a negative value.
+exc = statistics.StatisticsError
+for values in ([-1], [1, -2, 3]):
+with self.subTest(values=values):
+self.assertRaises(exc, self.func, values)
+
+def test_ints(self):
+# Test geometric mean with ints.
+data = [12, 21, 294]
+random.shuffle(data)
+self.assertEqual(self.func(data), 42.0)
+data = [90, 135, 270, 320]
+random.shuffle(data)
+self.assertEqual(self.func(data), 180.0)
+
+def test_floats_exact(self):
+# Test geometric mean with some carefully chosen floats.
+data = [1.0, 2.0, 6.125, 12.25]
+random.shuffle(data)
+self.assertEqual(self.func(data), 3.5)
+
+def test_singleton_lists(self):
+# Test that geometric mean([x]) returns x.
+for i in range(100):
+x = random.uniform(0.0, 1.0)
+self.assertEqual(self.func([x]), x)
+
+def test_decimals_exact(self):
+# Test geometric mean with some carefully chosen Decimals.
+D = Decimal
+data = [D("0.972"), D("8.748"), D("23.328")]
+random.shuffle(data)
+self.assertEqual(self.func(data), D("5.832"))
+
+def test_fractions(self):
+# Test geometric mean with Fractions.
+F = Fraction
+data = [F(1, 2), F(2, 3), F(3, 4), F(4, 5), F(5, 6), F(6, 7), F(7, 8)]
+random.shuffle(data)
+expected = 1/(8**(1/7))
+self.assertApproxEqual(self.func(data), expected, rel=1e-13)
+
+def test_inf(self):
+# Test geometric mean with infinity.
+INF = float('inf')
+values = [2.0, INF, 1.0]
+self.assertEqual(self.func(values), INF)
+
+def test_nan(self):
+# Test geometric mean with NANs.
+values = [2.0, float('nan'), 1.0]
+self.assertTrue(math.isnan(self.func(values)))
+
+def test_multiply_data_points(self):
+# Test multiplying every data point by a constant.
+c = 111
+data = [3.4, 4.5, 4.9, 6.7, 6.8, 7.2, 8.0, 8.1, 9.4]
+expected = self.func(data)*c
+result = self.func([x*c for x in data])
+self.assertApproxEqual(self.func(data), expected, rel=1e-13)
+
+def test_doubled_data(self):
+# Test doubling data from [a,b...z] to [a,a,b,b...z,z].
+data = [random.uniform(1, 500) for _ in range(1000)]
+expected = self.func(data)
+

[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 258ebc539b2e by Serhiy Storchaka in branch '3.5':
Issue #28322: Fixed possible crashes when unpickle itertools objects from
https://hg.python.org/cpython/rev/258ebc539b2e

New changeset c4937d066a8e by Serhiy Storchaka in branch '3.6':
Issue #28322: Fixed possible crashes when unpickle itertools objects from
https://hg.python.org/cpython/rev/c4937d066a8e

New changeset cb0755aa9f3d by Serhiy Storchaka in branch 'default':
Issue #28322: Fixed possible crashes when unpickle itertools objects from
https://hg.python.org/cpython/rev/cb0755aa9f3d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28322] chain.__setstate__ Type Confusion

2016-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution John.

cycle.__setstate__() was fixed in a4d5ef7fdec3 in 3.6, but the fix was not 
backported to 3.5. There is no pickle support in 2.7.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-01 Thread Oren Milman

Oren Milman added the comment:

Thanks for the review :)
I changed some stuff, according to your comments (and replied to one comment in 
Rietveld).
Version2 diff and test output are attached.

--
Added file: http://bugs.python.org/file44922/issue28332_ver2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/file44923/patchedCPythonTestOutput_ver2.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com