[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



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



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



[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



[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



[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



[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



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

> 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



[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



[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



[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



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



[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



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

2015-09-04 Thread Donald Stufft

Donald Stufft added the comment:

This looks more like lib2to3 doesn't support running from a .zip archive.

--

___
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:

Assigning to Larry since the next step is his.

--
assignee: gvanrossum -> larry
priority: high -> release blocker

___
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



[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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Rather than copying the nosy list from an old issue, which likely contains 
people no longer interested, better to announce a followup on the old issue.

I am not sure what you want me to try out.  If it is a code change, please 
upload a patch.  If it is a user action, please specify.

--

___
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 Roundup Robot

Roundup Robot added the comment:

New changeset d1f41c614e62 by Guido van Rossum in branch '3.5':
Issue #24635: Fixed flakiness in test_typing.py.
https://hg.python.org/cpython/rev/d1f41c614e62

--
nosy: +python-dev

___
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:

BTW, I screwed up and committed this into the public 3.5 repo first (and merged 
from there into default). I guess once Larry has merged the fix into his 
special closed 3.5 bitbucket repo I should do a null merge from there back to 
public 3.5 and forward the null merge to 3.6 as well.

--

___
Python tracker 

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



[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This request is similar to (if not a duplicate of) issue 15873.

Gnu date uses the following extensions to %z instruction of strftime/strptime:

   %z +hhmm numeric timezone (e.g., -0400)

   %:z+hh:mm numeric timezone (e.g., -04:00)

   %::z   +hh:mm:ss numeric time zone (e.g., -04:00:00)

   %:::z  numeric time zone with : to necessary precision (e.g., -04, 
+05:30)

I think it is reasonable to add those to python.

--
nosy: +belopolsky

___
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



[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



[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



[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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This is happening in windows-only code, so not being a windows user I cannot 
reproduce it.  It does not look like something new.  This code was last touched 
in #10653.

Can someone confirm that only 3.5 is affected?

--
nosy: +haypo

___
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 Brett Cannon

Brett Cannon added the comment:

Assuming I didn't screw this up -- I'm new to the whole Windows development 
thing -- the new test along with the rest of the test suite pass under Windows 
10 on the default branch.

--

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0194ec4195c by Eric V. Smith in branch 'default':
Removed Implementation Limitations section. While the version of the code on 
http://bugs.python.org/issue24965 has the 255 expression limitation, I'm going 
to remove this limit. The i18n section was purely speculative. We can worry 
about it if/when we add i18n and i-strings.
https://hg.python.org/peps/rev/a0194ec4195c

--
nosy: +python-dev

___
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 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



[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



[issue24635] test_typing is flaky

2015-09-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Fixed now on the 3.5 branch. I still have to merge to default and create the 
pull request for Larry.

--
assignee:  -> gvanrossum
resolution:  -> fixed

___
Python tracker 

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



[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2015-09-04 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> needs patch
type:  -> enhancement

___
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



[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



[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



[issue24917] time_strftime() Buffer Over-read

2015-09-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> Would you like us to report this and future vulnerabilities to CERT?

If it affects released versions, I think this is the right thing to do.  Note 
that I don't know what PSF policy is on this is or whether they even have one.

--

___
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:

Pull request for Larry: 
https://bitbucket.org/larry/cpython350/pull-requests/14/fix-issue-24635/diff

--

___
Python tracker 

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



[issue24981] Add a test which uses the ast module to compile the stdlib

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Forgot to mention: runtime 4 seconds.

--

___
Python tracker 

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



[issue24981] Add a test which uses the ast module to compile the stdlib

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The attached recurses one level deep in Lib. Catching UnicodeDecodeError on 
file read is needed at least for "test/test_source_encoding.py 'utf-8' codec 
can't decode byte 0xf0 in position 267: invalid continuation byte".  Catching 
"badxxx.py" is needed for several test/ modules.

This test may have found another hole:  It prints

 "C:/programs/Python35/Lib\distutils _msvccompiler.py None disallowed in 
expression list"

whereas

>>> compile(open('C:/programs/Python35/Lib\distutils\_msvccompiler.py').read(), 
>>> '', 'exec')
 at 0x034A3F60, file "", line 8>

--
nosy: +terry.reedy
Added file: http://bugs.python.org/file40359/temast.py

___
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:

I don't plan to send a pull request to the Python 3.5 release manager.
This bug existed since Python 3.0, the fix can wait for Python 3.5.1.

--

___
Python tracker 

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



[issue25001] Make --nowindows argument to regrtest propagate when running with -j

2015-09-04 Thread Brett Cannon

New submission from Brett Cannon:

Not sure how feasible this is, but when running tests under Windows it's very 
nice to run with --nowindows on, else you get barraged with a ton of debugging 
warnings. The problem is that if you use -j the use of --nowindows gets turned 
off. It would be nice if using --nowindows worked with -j to speed up test 
execution on Windows while also being less noisy.

--
components: Tests, Windows
messages: 249828
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Make --nowindows argument to regrtest propagate when running with -j
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



[issue25002] Deprecate asyncore/asynchat

2015-09-04 Thread Guido van Rossum

New submission from Guido van Rossum:

Now that we've got asyncio in two releases (3.4 and 3.5) we should start 
deprecating asyncore and asynchat. There isn't much use of these in the stdlib 
(smtpd.py uses them, and a bunch of tests) and we should probably rewrite those 
to use asyncio. Maybe smtpd.py can be deprecated itself.

--
messages: 249829
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Deprecate asyncore/asynchat
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



[issue25002] Deprecate asyncore/asynchat

2015-09-04 Thread STINNER Victor

STINNER Victor added the comment:

The documentation of both modules begin with the following note:

"This module exists for backwards compatibility only. For new code we recommend 
using asyncio."

What do you mean by deprecating the module? Emit a PendingDeprecationWarning in 
Python 3.6 and emit a DeprecationWarning in Python 3.7?

> Maybe smtpd.py can be deprecated itself.

Maybe it can be fun to rewrite the module using asyncio, but I'm not convinced 
that a SMTP server in the Python stdlib is super useful.

(A HTTP server *is* very useful, it saved my life multiple times when I worked 
on embedded devices without any server available to transfer files.)

--
nosy: +haypo

___
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:

Pull request accepted.  Please forward merge, thanks!

And, yes, this will be a null merge because you already separately committed it 
to 3.5.

--
assignee: larry -> gvanrossum
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



[issue24981] Add a test which uses the ast module to compile the stdlib

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ran with installed 3.5.0rc1.

--

___
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:

Oh, it looks like my implementation of ROUND_HALF_UP is wrong.
Negative numbers are not correctly rounded :-/ I'm working on a fix.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-04 Thread Donald Stufft

Donald Stufft added the comment:

I'm all for deprecating asyncore/asynchat but should deprecating them wait 
until asyncio is no longer provisional?

--
nosy: +dstufft

___
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:

Alex, if you like, I'll take the blame for the rounding method - I did express 
a preference for it here:

http://bugs.python.org/issue23517#msg249309

When I looked at the code earlier, the round-half-up implementation looked good 
to me (floor(x+0.5) if x >= 0 else ceil(x-0.5)).

--

___
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 paul j3

paul j3 added the comment:

A related issue which Sworddragon found just before starting this issue is

http://bugs.python.org/issue9625

The handling of defaults in argparse is a bit complicated.  In general it errs 
on the side of giving the user/developer freedom to set them how ever they 
want.  That's especially true in the case of non-string defaults.  A default 
does not have to be something that the user could give.  In particular the 
default 'default' is None, which can't be parsed from the command line.  The 
same for boolean values (the default 'type' does not translate string 'False' 
to boolean 'False'.)

Errors in the defaults are usually caught during program development.  

If the calling code generates the defaults dynamically, it seems reasonable 
that it should also check that they are valid.  The validity test for choices 
is a simple 'in' (contains) one.  'choices' can be a list or dictionary (keys), 
and can even be dynamically generated.

 parser = 
 choices = 
 default = 
 if default not in choices:
 
 parser.add_argument(..., choices=choices, default=default)
 etc.

--
nosy: +paul.j3

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Yes, in 3.6 asyncio will no longer be provisional and we can start deprecating 
async{ore,hat}. Which is why I marked this bug with 3.6.

--

___
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:

> I did not quite understand why you've chosen ROUND_HALF_UP over 
> ROUND_HALF_EVEN, but as long as fromtimestamp() uses the same rounding as 
> timedelta() - I am happy.

Not only Tim prefers this rounding mode, Python 2.7 also uses the same mode, 
and the original poster basically said that Python 3 doesn't behave like Python 
2. So... the most obvious rounding mode is the same than Python 2, 
ROUND_HALF_UP.

--

___
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:

OK, done.

--

___
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 Roundup Robot

Roundup Robot added the comment:

New changeset 0f37918440c9 by Guido van Rossum in branch 'default':
Issue #24635: Fixed flakiness in test_typing.py. (Merge from 3.5.)
https://hg.python.org/cpython/rev/0f37918440c9

New changeset 438dde69871d by Guido van Rossum in branch '3.5':
Fix issue #24635.
https://hg.python.org/cpython/rev/438dde69871d

--

___
Python tracker 

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



[issue24990] Foreign language support in turtle module

2015-09-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

> discussion elsewhere
#24978, translate docs to Russian

--
nosy: +terry.reedy

___
Python tracker 

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



[issue24997] mock.call_args compares as equal and not equal

2015-09-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +michael.foord, rbcollins

___
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 Yi Ding

Yi Ding added the comment:

Thank you everyone! I will test the next rc of 3.5.

--

___
Python tracker 

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



[issue24981] Add a test which uses the ast module to compile the stdlib

2015-09-04 Thread Brett Cannon

Brett Cannon added the comment:

Two things about the UTF-8 decode issue. One is you don't need to decode the 
source for it to be compiled; ast.parse()/compile() will work from bytes 
objects and thus handle the decoded for you. Two, if you want to decode source 
files into text, use importlib.util.decode_source().

Since Terry's script shows a complete compilation of the stdlib is very fast, 
we should make this a proper test. Any resulting test should probably should go 
into test_compile(). We can have it read all files and those that raise a a 
SyntaxError or some such exception can simply be skipped as the test is about 
AST -> code and not source -> AST (although we could theoretically have the 
test validate the failure with a source -> code compilation as well and verify 
the same exception is raised). We can also double-check that any AST -> code 
failure passes under source -> code and then report a failure (basically I'm 
trying to avoid blacklisting files that are test cases for the compiler overall 
and are known to fail).

--

___
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 Mark Lawrence

Mark Lawrence added the comment:

Python 3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 10:35:05) [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, 992187, 
tzinfo=datetime.timezone.utc)

FWIW Windows 10.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-04 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy: +barry

___
Python tracker 

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



  1   2   3   >