[issue24635] test_typing is flaky

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

==
FAIL: test_abstractset (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
955, in test_abstractset
assert isinstance(set(), typing.AbstractSet)
AssertionError

==
FAIL: test_bytestring (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
979, in test_bytestring
assert isinstance(b'', typing.ByteString)
AssertionError

==
FAIL: test_container (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
951, in test_container
assert isinstance([], typing.Container)
AssertionError

==
FAIL: test_iterable (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
936, in test_iterable
assert isinstance([], typing.Iterable)
AssertionError

==
FAIL: test_iterator (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
942, in test_iterator
assert isinstance(it, typing.Iterator)
AssertionError

==
FAIL: test_mapping (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
963, in test_mapping
assert isinstance({}, typing.Mapping)
AssertionError

==
FAIL: test_mutablemapping (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
967, in test_mutablemapping
assert isinstance({}, typing.MutableMapping)
AssertionError

==
FAIL: test_mutablesequence (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
975, in test_mutablesequence
assert isinstance([], typing.MutableSequence)
AssertionError

==
FAIL: test_mutableset (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
959, in test_mutableset
assert isinstance(set(), typing.MutableSet)
AssertionError

==
FAIL: test_sequence (test.test_typing.CollectionsAbcTests)
--
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.5.bolen-ubuntu/build/Lib/test/test_typing.py", line 
971, in test_sequence
assert isinstance([], typing.Sequence)
AssertionError

--

--

___
Python tracker 

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



[issue21998] asyncio: support fork

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Surely this is too late for 3.5?

--
nosy: +larry

___
Python tracker 

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



[issue21998] asyncio: support fork

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> Surely this is too late for 3.5?

I'm not 100% convinced that asyncio must support fork, so it's too late :-) 
Anyway, we don't care, asyncio will be under provisional status for one more 
cycle (3.5) :-p

--

___
Python tracker 

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



[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Is anyone going to try and fix this for 3.5.0?  Or should we "kick the can down 
the road" and reassign it to 3.6?

--
nosy: +larry

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

I sure hope not.

--
nosy: +larry

___
Python tracker 

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



[issue23623] Python 3.5 docs need to clarify how to set PATH, etc

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Can we close this out?

--
nosy: +larry

___
Python tracker 

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



[issue24745] Better default font for editor

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Anything happening with this?  We tag 3.5.0rc3 in about 36 hours.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

I will happy delegate to Tim Peters whether or not this should be fixed in 
3.5.0, or whether it should wait until 3.5.1 or even 3.6.

Tim, ball's in your court!

--

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Anything happening with this?  We tag 3.5.0rc3 in about 36 hours.

--

___
Python tracker 

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



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

Anything happening with this?  We tag 3.5.0rc3 in about 36 hours.

--

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> Anything happening with this?  We tag 3.5.0rc3 in about 36 hours.

I believe that it's a bug in test_typing, not in the typing module. So it must 
not block the release.

--

___
Python tracker 

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



[issue21998] asyncio: support fork

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

I've remarked it as "normal" priority and moved it to 3.6.  Not my problem 
anymore!  :D

--
priority: deferred blocker -> normal
versions: +Python 3.6 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue21998] asyncio: support fork

2015-09-04 Thread Larry Hastings

Changes by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread Larry Hastings

Changes by Larry Hastings :


--
priority: deferred blocker -> high

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This was pull #12. Am I correct in thinking that all the merges Serhiy did 
after for pull #13 included the null merge for this?

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

The pull requests are numbered by creation order, not by merge order.

Normally I'd expect that yes, Serhiy's merge would include yours.  But it 
didn't work out that way.  If you look at the changeset graph:

https://bitbucket.org/larry/cpython350/commits/all

Serhiy merged his revision (2b6ce7e), not my merge commit afterwards (07e04c3) 
which includes your change.  So your change still needs to be forward-merged.

Please pull and merge the current head (07e04c3), thanks!

--

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I found a short script to reproduce the bug:
--
import typing:
assert isinstance([], typing.Container)
assert isinstance([], typing.Container)
--

The first check calls typing.GenericMeta.__subclasscheck__(list) which calls 
abc.ABCMeta.__subclasscheck__(typing.Container, list). The problem is that not 
only abc.ABCMeta.__subclasscheck__() returns False, but it adds also list to 
typing.Container._abc_negative_cache.

The next check returns False without calling 
typing.GenericMeta.__subclasscheck__(list), in fact 
ABCMeta.__instancecheck__(typing.GenericMeta, list) returns immediatly False 
because list is in typing.Container._abc_negative_cache.

The problem: GenericMeta calls ABCMeta.__subclasscheck__() which returns False, 
but ABCMeta.__subclasscheck__() also stores the result "False" in cache, 
whereas it's not the expected result.

Should we override __instancecheck__ in GenericMeta?

@Guido: are you interested to fix this complex metaclass/type issue? I don't 
have time to fix it right now.

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since your merge contains the changes that Serhiy already merged, I expect that 
there will be some conflicts.  If so, the only thing I would know to do is 
revert and make mine and his null merges. If that is correct, will do. Making 
merge clone now.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 07e04c34bab5 by Larry Hastings in branch '3.5':
Merged in storchaka/cpython350 (pull request #13)
https://hg.python.org/cpython/rev/07e04c34bab5

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 09cd7d57b080 by Terry Jan Reedy in branch '3.5':
Issue #21192: Change 'RUN' back to 'RESTART' when running editor file.
https://hg.python.org/cpython/rev/09cd7d57b080

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Larry Hastings

Larry Hastings added the comment:

There won't be conflicts with Serhiy's merge--just the opposite.  His pull 
request was merged first, so it's perfect that he did his forward merge first.  
He's already resolved any conflicts with his merge, and so when you merge 
you'll only have to worry about your own changes.

Just merge the current head (07e04c3), it'll be fine, honest!

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I was wrong, no conflicts.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue24964] Add tunnel CONNECT response headers to httplib / http.client

2015-09-04 Thread Thomas

Thomas added the comment:

Martin: Thanks for your quick answer (and sorry for sending the whole file) !
I think it is indeed a good idea to detach the proxy connection and treat it as 
any other connection, as you did in your patch. It would be great if you would 
be able to dig it up !

--

___
Python tracker 

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



[issue24745] Better default font for editor

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34a8078f6249 by Terry Jan Reedy in branch '2.7':
Issue #24745: Prevent IDLE initialization crash with Tk 8.4; patch by Ned Deily.
https://hg.python.org/cpython/rev/34a8078f6249

New changeset b4830b9f8c10 by Terry Jan Reedy in branch '3.4':
Issue #24745: Prevent IDLE initialization crash with Tk 8.4; patch by Ned Deily.
https://hg.python.org/cpython/rev/b4830b9f8c10

--

___
Python tracker 

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



[issue24745] Better default font for editor

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I backported change already in 3.5.0+.

--
priority: deferred blocker -> normal
resolution:  -> fixed
stage: needs patch -> 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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file40350/round_half_up_py34.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Backport to Python 3.4 splitted in 3 patches:

* (1) timedelta_round_half_up_py34.patch, backport changeset 0eb8c182131e: 
"datetime.timedelta constructor now rounds microseconds to nearest with ties 
going away from zero (ROUND_HALF_UP)".

* (2) round_half_up.patch: add _PyTime_ROUND_HALF_UP rounding mode to the 
_PyTime API

* (3) fromtimestamp_round_half_up.patch, backport changeset bf634dfe076f: 
"fromtimestamp() and utcfromtimestamp() methods of datetime.datetime now round 
microseconds to nearest with ties going away from zero (ROUND_HALF_UP)"

--
keywords: +patch
Added file: http://bugs.python.org/file40349/timedelta_round_half_up_py34.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

Changes by STINNER Victor :


Added file: 
http://bugs.python.org/file40351/fromtimestamp_round_half_up_py34.patch

___
Python tracker 

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-09-04 Thread Ezio Melotti

Ezio Melotti added the comment:

I'll try to take care of this during the weekend.
Feel free to ping me if I don't.

--

___
Python tracker 

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



[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

asyncio keeps its "provisional API" status in the Python 3.5 cycle, so this 
issue must not block the 3.5.0 release. It can be fixed later.

This issue is complex, I'm not convinced that 
asyncio-fix-wait-cancellation-race.patch is the best fix.

--

___
Python tracker 

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



[issue23623] Python 3.5 docs need to clarify how to set PATH, etc

2015-09-04 Thread Paul Moore

Paul Moore added the comment:

Now that "Add Python to PATH" is an option on the front screen of the installer 
(not hidden behind the scary "customize" option) this can be closed.

I recall Steve suggesting there might be issues with the way a user install 
results in the path entries coming after the system path, but let's not worry 
about those unless we get specific issue reports.

--
priority: deferred blocker -> normal
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-09-04 Thread Petr Viktorin

Petr Viktorin added the comment:

So, if I understand correctly, the problem is that the new imp.load_dynamic in 
3.5.0b checks sys.modules, so if a module of the same name was loaded 
previously, it's only reloaded, skipping the create_module step.

This patch bypasses that check, so a new module is always loaded.

This brings this aspect of imp.load_dynamic to how it was in 3.4. However, I 
have no way to test if it fixes pywin32 or py2exe.

--
keywords: +patch
Added file: http://bugs.python.org/file40352/issue24748.patch

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread STINNER Victor

New submission from STINNER Victor:

The crash occurred on the buildbot "x86-64 Windows Server 2012R2 ICC 3.x".

Do you we officially support the ICC compiler?

--

There are still some curious compiler warnings:

Objects\longobject.c(4498): warning #63: shift count is too large
=> "#if LONG_MAX >> 2*PyLong_SHIFT"
Objects\longobject.c(4519): warning #63: shift count is too large
=> "#if LONG_MAX >> 2*PyLong_SHIFT"

I don't understand the test: do we test if the result is zero?

On Windows, a long is only 32-bits. I guess that PyLong_SHIFT is 30 (so 
2*PyLong_SHIFT=60).

Maybe we should put "#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >> 
2*PyLong_SHIFT" before?

--

The crash itself:


http://buildbot.python.org/all/builders/x86-64%20Windows%20Server%202012R2%20ICC%203.x/builds/83/steps/test/logs/stdio

[ 14/398] test_re
Fatal Python error: Segmentation fault

Current thread 0x0578 (most recent call first):
  File "C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\re.py", 
line 163 in match
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\test\test_re.py", 
line 976 in test_sre_character_class_literals
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\case.py", 
line 600 in run
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\case.py", 
line 648 in __call__
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 122 in run
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 84 in __call__
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 122 in run
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 84 in __call__
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 122 in run
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\suite.py",
 line 84 in __call__
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\unittest\runner.py",
 line 176 in run
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\test\support\__init__.py",
 line 1775 in _run_suite
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\lib\test\support\__init__.py",
 line 1809 in run_unittest
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 1280 in test_runner
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 1281 in runtest_inner
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 968 in runtest
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 763 in main
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 1565 in main_in_temp_cwd
  File 
"C:\Users\buildbot\buildarea\3.x.intel-windows-icc\build\PCbuild\..\lib\test\regrtest.py",
 line 1590 in 

--
components: Build, Windows
messages: 249749
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Segfault in test_re.test_sre_character_class_literals() when Python is 
compiled by ICC
type: crash
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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Zachary Ware is the administrator of the buildbot.

--

___
Python tracker 

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



[issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18

2015-09-04 Thread Berker Peksag

Berker Peksag added the comment:

Hi Milan, thanks for the updated patch. Did you see my review comments? 
http://bugs.python.org/review/18540/

--
nosy: +berker.peksag
stage:  -> patch review
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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-04 Thread Martin Panter

Martin Panter added the comment:

Patch 3 looks better IMO. Now instead of the TypeError, we should see an error 
something like

socket.error: Tunnel connection failed: 200

I’ll commit this in a day or so, perhaps with an improved error message, like 
“Invalid response from tunnel request”.

--

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Marco Paolini

Marco Paolini added the comment:

Attaching a patch. Does it make any sense?

--
keywords: +patch
nosy: +mpaolini
Added file: http://bugs.python.org/file40353/issue24891.patch

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Marco Paolini

Marco Paolini added the comment:

ops wrong patch... trying again.

--
Added file: http://bugs.python.org/file40354/issue24891.patch

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Marco Paolini

Changes by Marco Paolini :


Removed file: http://bugs.python.org/file40353/issue24891.patch

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-04 Thread Martin Panter

Martin Panter added the comment:

I was about to commit this, but I think I was wrong about one of my comments. 
The list that is multiplied is indeed shallow-copied. E.g. “[x] * 1” copies the 
list, but the reference to x is the same. I propose to commit the second patch, 
except to revert one of the sentences to the first patch, so it reads:

Note also that the copies are shallow; nested structures are not copied but 
referenced.

--

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Yes, it looks like a good approach. Some comments:

- please mention this issue "Issue #24891"  and explain the issue in a
comment in create_stdio_checked()
- it would be safer to check the exception type, to be extra safe
- you must clear the exception
- why not putting the code in create_stdio() directly?

--

___
Python tracker 

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



[issue25000] _mock_call does not properly grab args and kwargs

2015-09-04 Thread Alex Etling

New submission from Alex Etling:

Consider the following lines of code:

def test_mock(val):
fake_mock = Mock()
a = {}  
fake_mock.func(a)
a['val'] = 5
fake_mock.func.assert_has_calls([call({})])
What i would expect would be for this statement to pass. What I actually see is 
the following:

Traceback (most recent call last):
File "/gc/gclib/python/tests/kafka_production/encoding_test.py", line 121, in 
test_mock
fake_mock.func.assert_has_calls([call({})])
File "/usr/local/lib/python2.7/dist-packages/mock.py", line 863, in 
assert_has_calls
'Actual: %r' % (calls, self.mock_calls)
AssertionError: Calls not found.
Expected: [call({})]
Actual: [call({'val': 5})]
Mock thinks that I have passed in {'val': 5}, when I in fact did pass in {}. 
The errors seems to be the way args and kwargs are being grabbed in _mock_call 
function

--
components: Macintosh
messages: 249757
nosy: ned.deily, paetling, ronaldoussoren
priority: normal
severity: normal
status: open
title: _mock_call does not properly grab args and kwargs
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, 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



[issue25000] _mock_call does not properly grab args and kwargs

2015-09-04 Thread Alex Etling

Alex Etling added the comment:

I attempted to fix this by just deepcopying on creation of the _call object, on 
line 927 of mock.py but this caused a lot of strange errors I did not expect.  
If you could advise on how best to proceed to fix, I would greatly appreciate 
it.

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-04 Thread flying sheep

flying sheep added the comment:

just because people do something doesn’t mean it’s right.

i guess the tendency for CLI applications to do it wrong comes from

1. their ad-hoc beginnings. you usually start with one script file and extend it
2. availability expanduser('~') is in the stdlib and more well-known than e.g. 
appdirs, and people don’t like to add dependencies to small things
3. the shell and old, widely used applications using ~/.appname, so it’s more 
well-know to do that

on the other hand, GUI applications usually have a build system in place for UI 
file compilation, need a .desktop file installed, and so on, i.e. need more 
boilerplate and dependencies from the start, and people have to research how to 
do things properly. GUI libraries have their built-in standard dirs interfaces 
as well.



another thing. on the python-ideas thread someone mentioned that

> I count 17 of those on my Windows machine (!) right now, including .idlerc, 
> .ipython, .matplotlib, .ipylint.d etc.

this is horrible! this is so obviously the wrong thing to do. i hope having the 
module will reduce the number of similar atrocities.

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-04 Thread Michael Foord

Changes by Michael Foord :


--
nosy:  -michael.foord

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Marco Paolini

Marco Paolini added the comment:

@haypo thanks for the quick review. This new issue24891_2.patch covers all of 
the points you raised except the "check exception type" which I am still 
figuring out.

--
Added file: http://bugs.python.org/file40355/issue24891_2.patch

___
Python tracker 

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



[issue24998] docs: subprocess.Popen example has extra/invalid parameter

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0ff7aa9a438f by R David Murray in branch '2.7':
#24998: fix cut and paste error in subprocess example.
https://hg.python.org/cpython/rev/0ff7aa9a438f

New changeset 47e711a7416b by R David Murray in branch '3.4':
#24998: fix cut and paste error in subprocess example.
https://hg.python.org/cpython/rev/47e711a7416b

New changeset fa53edb32962 by R David Murray in branch '3.5':
Merge: #24998: fix cut and paste error in subprocess example.
https://hg.python.org/cpython/rev/fa53edb32962

New changeset 75e10a5cbf43 by R David Murray in branch 'default':
Merge: #24998: fix cut and paste error in subprocess example.
https://hg.python.org/cpython/rev/75e10a5cbf43

--
nosy: +python-dev

___
Python tracker 

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



[issue24998] docs: subprocess.Popen example has extra/invalid parameter

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

Thanks for the report.  I'm surprised that hasn't been noticed before.  I'm 
also wondering why the 'shell=True' was removed from the example in the python3 
docs (and why whoever did that didn't notice the bug :), but that would be a 
separate issue (someone would need to figure out why the change was made before 
undoing it...)

--
nosy: +r.david.murray
resolution:  -> fixed
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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

We don't officially support ICC yet, but the buildbots are a step in the 
direction of proposing that we do.

--
nosy: +r.david.murray

___
Python tracker 

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




[issue23630] support multiple hosts in create_server/start_server

2015-09-04 Thread Yann Sionneau

Yann Sionneau added the comment:

A new (and hopefully last?) version of the patch, thanks again for the review 
Victor!

--
Added file: http://bugs.python.org/file40356/multibind7.patch

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

What is actually happening is that the *contents* of the list are copied, but 
the list itself is not.  This is a consequence of the definition in terms of +. 
 So, yes, that is a shallow copy, but not quite in the sense that mylist.copy() 
is a shallow copy, since the references to the contents of s get appended to 
the list being constructed by *, not a new list that is a "copy" of s.

You are correct that "s is only referenced" is not really accurate.  But how 
about "Note that the contents of the *s* object are not copied, they are 
referenced multiple times".  I think that highlights the source of the 
confusion: that the *contents* are not copied.

--

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> This new issue24891_2.patch covers all of the points you raised except the 
> "check exception type" which I am still figuring out.

See my patch issue24891_3.patch which calls 
PyErr_ExceptionMatches(PyExc_OSError). If you like it, I can push it to Python 
3.4-3.6.

--
Added file: http://bugs.python.org/file40357/issue24891_3.patch

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

Sorry, I meant "references to the content are copied" in my first sentence 
there.  This just goes to show why this is complicated to explain :)

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

The "tendency of CLI applications to do it wrong" comes from the fact that they 
are following the *older* unix (de-facto) standard, which is to put config 
files in the home directory as dot files.  That is, they are *not* doing it 
wrong, they are following the older unix de-facto standard and not the 
freedesktop.org standard (which, you will note, is a standard arising out of 
GUI applications, not CLI applications).

Not, mind, you, that I think .config is a bad standard, I'm just saying that if 
you want to follow standards you need to account for the legacy standard as 
well as the new standard.

--

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry, this is a bug in typing.py.  
https://github.com/ambv/typehinting/issues/155

It's a subtle bug but the first reporter has done some good research; I will 
try to find time to fix it today.

--

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Marco Paolini

Marco Paolini added the comment:

@haypo, yeah, definitely better than mine! All good for me.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Tim Peters

Tim Peters added the comment:

Larry, I appreciate the vote of confidence, but I'm ill-equipped to help at the 
patch level:  I'm solely on Windows, and (long story) don't even have a C 
compiler at the moment.  The patch(es) are too broad and delicate to be sure of 
without kicking the tires (running contrived examples).

So I would sub-delegate to Alexander and/or Mark.  They understand the issues 
too.  I was just the most annoying about insisting it get fixed ;-)

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Good. I have less comments, it's getting better at each iteration ;)

--

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e67bf9c9a898 by Victor Stinner in branch '3.4':
Fix race condition in create_stdio()
https://hg.python.org/cpython/rev/e67bf9c9a898

--
nosy: +python-dev

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> I don't understand the test: do we test if the result is zero?

We test that signed long is enough to contain 2 digits. May be it should be 
written as LONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT.

> Maybe we should put "#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >> 
> 2*PyLong_SHIFT" before?

No. We need to use long long only if long is not enough.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24891] race condition in initstdio() (python aborts running under nohup)

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> @haypo, yeah, definitely better than mine! All good for me.

Ok. I added your name to Misc/ACKS. I had to do some tricks to apply the patch 
to Python 3.4 (code was in Python/pythonrun.c) and then to merge to Python 3.5 
(code moved to Python/pylifecycle.c). But I checked the fix in each version 
using gdb:

* put a breakpoint on create_stdio,
* type "print close(0)" after the first is_valid_fd() check,
* see that the open() exception is correctly handled (type "next", "next", ... 
and check that we go to the error: label and then enter the if() block)

Thanks for your patch Marco.

I prefer to be extra safe by checking the raised exception to minimize the risk 
of regression.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> We test that signed long is enough to contain 2 digits. May be it should be 
> written as LONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT.

Ok, but I don't understand "if ". Does it mean "if 
 != 0"?

Maybe we can use SIZEOF_LONG instead of LONG_MAX?

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> needs patch
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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> Larry, I appreciate the vote of confidence, but I'm ill-equipped to help at 
> the patch level:  (...)  The patch(es) are too broad and delicate to be sure 
> of without kicking the tires (running contrived examples).

Well, the patches change how timedelta, .fromtimestamp() and 
.utcfromtimestamp() round the number of microseconds. It's a deliberate choice 
since it was decided that the current rounding mode is a bug, and not a feature 
:-)

The code is well tested. There are unit tests on how numbers are rounded for: 
timedelta, .(utc)fromtimestamp(), and even the C private API _PyTime. The code 
is (almost) the same in default and was validated on various platforms. So I'm 
confident on the change.

--

___
Python tracker 

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



[issue25000] _mock_call does not properly grab args and kwargs

2015-09-04 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +michael.foord, rbcollins -ned.deily, ronaldoussoren
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Tim Peters

Tim Peters added the comment:

That's great, Victor!  Another person trying the code with their own critical 
eyes would still be prudent.  Two days ago you wrote:

> This part of Python (handling timestamps, especially
> the rounding mode) is complex, I prefer to check for
> all buildbots and wait for some feedback from users
> (wait at least 2 weeks).

It's not entirely clear why that switched to "So I'm confident on the change." 
in 12 days short of 2 weeks ;-)

I have no reason to doubt your confidence.  Just saying some independent 
checking is prudent (but I can't do it at this time).

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I'll try to find the time to kick the tires on this patch this weekend.

--
assignee:  -> belopolsky

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, it means "if  != 0".

The condition is equivalent to SIZEOF_LONG*CHAR_BIT-1 >= 2*PyLong_SHIFT on 
binary computers with two-complementarn two's-complement integers. But current 
form looks more natural to me.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> The condition is equivalent to SIZEOF_LONG*CHAR_BIT-1 >= 2*PyLong_SHIFT on 
> binary computers with two-complementarn two's-complement integers. But 
> current form looks more natural to me.

Oh by the way: I have no idea if the test_re crash is related to this warning 
:-) I don't plan to install ICC to reproduce the issue.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread Zachary Ware

Zachary Ware added the comment:

Replacing the two instances of "LONG_MAX >> 2*PyLong_SHIFT" with 
"SIZEOF_LONG*CHAR_BIT-1 >= 2*PyLong_SHIFT" fixes the warnings, but does nothing 
for test_re.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-04 Thread Zachary Ware

Zachary Ware added the comment:

Another lovely facet of this segfault: it doesn't occur when built in Debug 
configuration.

--

___
Python tracker 

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



[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Which module are you asking about? We could ask author of behavior in question 
as to intention.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue24635] test_typing is flaky

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

> It's a subtle bug but the first reporter has done some good research; I will 
> try to find time to fix it today.

Oh, it's already known and investigated by someone else. Great. I
didn't know this github project.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

2015-09-04 17:52 GMT+02:00 Tim Peters :
> That's great, Victor!  Another person trying the code with their own critical 
> eyes would still be prudent.

Sure!

> It's not entirely clear why that switched to "So I'm confident on the 
> change." in 12 days short of 2 weeks ;-)

He he. 2 days ago, the buildbots were broken for various reasons. I
fixed a lot of issues (unrelated to this rounding mode issue), so I
now got the confirmation that the test pass on all platforms.

> I have no reason to doubt your confidence.  Just saying some independent 
> checking is prudent (but I can't do it at this time).

Sorry if I wasn't clear. I'm confident, but not enough to not wait for
a review :-)

--

Usually, I don't wait for a review simply because there are too few
reviewers :-( I spent the last 3 years to work alone on the funnny
_PyTime C API project. I started to write an article to tell this
journey ;-)

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

Alexander Belopolsky added the comment:
> I'll try to find the time to kick the tires on this patch this weekend.

Cool! Keep me in touch ;-)

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> commit review

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Victor,

Do I understand correctly that this is already committed in 3.4 - 3.6 
development branches and we just need to decide whether to cherry-pick this fix 
to 3.5rc?

Is the "review" link up-to date?

--

___
Python tracker 

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



[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread Sworddragon

Sworddragon added the comment:

I was thinking about cases where the default is variable for example a call to 
platform.machine() while the choices list (and the script itself) might not 
support all exotic architectures for its use that might be returned now or in a 
future version of Python from this function. In this case the call to 
platform.machine() could be wrapped into a function that checks if the returned 
value is one of the values in the choices list but that would be the same that 
I would normally expect to be done by the argparse module.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like this patch violates fromtimestamp(s) == EPOCH + 
timedelta(seconds=s) invariant:

Python 3.6.0a0 (default:73911e6c97c8, Sep  4 2015, 13:14:12)
>>> E = datetime(1970,1,1,tzinfo=timezone.utc)
>>> s = -1/2**7
>>> datetime.fromtimestamp(s, timezone.utc) == E + timedelta(seconds=s)
False

--

___
Python tracker 

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



[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-09-04 Thread Łukasz Langa

Łukasz Langa added the comment:

Thanks for handling this, I was indeed busy.

--

___
Python tracker 

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



[issue23572] functools.singledispatch fails when "not BaseClass" is True

2015-09-04 Thread Łukasz Langa

Łukasz Langa added the comment:

Thank you for fixing this and sorry for not being responsive sooner!

--

___
Python tracker 

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



[issue24488] ConfigParser.getboolean fails on boolean options

2015-09-04 Thread Łukasz Langa

Łukasz Langa added the comment:

As R. David pointed out, this is fixed in Python 3 by emphasizing configparser 
is designed to hold strings at all times. Changing this would break lots of 
existing code out there. So, sadly, #wontfix.

Thank you for your report though. If you find the documentation is misleading, 
create a change for that and we'll submit it.

--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue24957] python -m pdb error.py: stuck in unexitable infinite prompt loop

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Pdb says "Running 'cont' or 'step' will restart the program" but it seems to 
restart on any recognized command other than 'h' and traps everything else.  I 
verified behavior on Win7 with ordinary syntax error 'a = = 1' on installed 
2.7.10 and 3.4.3.  Removed qualifiers from title.

Doc says
'''
python3 -m pdb myscript.py

When invoked as a script, pdb will automatically enter post-mortem debugging if 
the program being debugged exits abnormally. After post-mortem debugging (or 
after normal exit of the program), pdb will restart the program.'''

But not being able to exit could not have been the intention. Looking at the 
code.

--
nosy: +georg.brandl, terry.reedy
stage:  -> test needed
title: python3 -mpdb gets stuck in an unexitable infinite prompt loop when 
running some Python 2 code with syntax errors -> python -m pdb error.py:  stuck 
in unexitable infinite prompt loop
versions: +Python 2.7, 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



[issue24956] Default value for an argument that is not in the choices list gets accepted

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

I assume you are talking about the behavior of the argparse 'choices' feature?  
That is what my comment was addressed to.  I didn't actually run a test to see 
if it behaves the way you describe :)

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Tim Peters

Tim Peters added the comment:

FYI, that invariant failed for me just now under the released 3.4.3 too:

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import *
>>> E = datetime(1970,1,1,tzinfo=timezone.utc)
>>> s = -1/2**7
>>> datetime.fromtimestamp(s, timezone.utc)
datetime.datetime(1969, 12, 31, 23, 59, 59, 992187, 
tzinfo=datetime.timezone.utc)
>>> E + timedelta(seconds=s)
datetime.datetime(1969, 12, 31, 23, 59, 59, 992188, 
tzinfo=datetime.timezone.utc)

It's an exactly-tied rounding case for the exactly-representable-in-binary s = 
-0.0078125.

--

___
Python tracker 

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



[issue2651] Strings passed to KeyError do not round trip

2015-09-04 Thread Łukasz Langa

Changes by Łukasz Langa :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2015-09-04 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee:  -> lukasz.langa

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread John Leitch

Changes by John Leitch :


--
nosy: +belopolsky, lemburg

___
Python tracker 

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



[issue24086] Configparser interpolation is unexpected

2015-09-04 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee:  -> lukasz.langa

___
Python tracker 

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



[issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it)

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Reported again in #24957

Xavier, your link is out of date.

--
nosy: +georg.brandl, terry.reedy
stage:  -> test needed
versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

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



[issue24957] python -m pdb error.py: stuck in unexitable infinite prompt loop

2015-09-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> cannot quit pdb when there is a syntax error in the debuggee 
(must kill it)
type:  -> behavior

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Can someone check 3.3?  I believe that was the release where we tried to get 
various rounding issues right.

--

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-04 Thread R. David Murray

R. David Murray added the comment:

Or better, "items in the list *s* are not copied..."

--

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Is there a CERT report associated with this vulnerability?

--

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> patch review

___
Python tracker 

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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread John Leitch

John Leitch added the comment:

Currently, no. Would you like us to report this and future vulnerabilities to 
CERT?

--

___
Python tracker 

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



[issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it)

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Simple fix attached.  I copied the exit code from this part of the 'while 
True:' loop.

try:
pdb._runscript(mainpyfile)
if pdb._user_requested_quit:
break
print("The program finished and will be restarted")

I am not sure if the conditional is still needed there.

Xavier, if you have a better patch, please upload it.

--
keywords: +patch
Added file: http://bugs.python.org/file40358/pdbloopfix.diff

___
Python tracker 

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



[issue24960] Can't use pip or easy_install with embeddable zip file.

2015-09-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore

___
Python tracker 

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



[issue24964] Add tunnel CONNECT response headers to httplib / http.client

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thomas, please sign a contributor agreement for your patches to be considered.
https://www.python.org/psf/contrib/
https://www.python.org/psf/contrib/contrib-form/

--
nosy: +terry.reedy
stage:  -> test needed

___
Python tracker 

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



[issue24969] functools.lru_cache: a way to set decorator arguments at runtime

2015-09-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed

___
Python tracker 

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



  1   2   3   >