[issue5001] Remove assertion-based checking in multiprocessing

2017-08-17 Thread drallensmith

drallensmith added the comment:

No discussion yet on pull request (5 days); just submitted fixes for util.py.

--

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread syncosmic

syncosmic added the comment:

A related issue (since this issue is contemplating restructuring these objects 
anyway):

Other than `??_code`, none of the `f.func_X` attributes which were eliminated 
in 3.0 have direct equivalents in generator-iterators, coroutines, or async 
generator-iterators.

However, all three of those have `[gi|cr|ag]_running` and `[gi|cr|ag]_frame` 
attributes. Generator-iterators also have `gi_yieldfrom`, and coroutines and 
async generator-iterators have `[cr|ag]_await`.

On a clean slate (with no attention paid to issues around breaking changes or 
how these attributes are already used in existing code), is there an argument 
for dundering some or all of these along with `__code__`? Or is special casing 
a better pattern when dealing with these other attributes?

--

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread syncosmic

syncosmic added the comment:

Some possibly helpful background (adapted from a discussion in PR 3077):

It looks as though `gi_code` was added to generators in bpo-1473257. At this 
time, function bytecode was still stored in `f.func_code`, so `gi_code` was a 
clear analogy.

My best guess is that `gi_code` was not chosen to deliberately create a 
namespace difference between functions and generators, but just because it 
wouldn't have made sense to add a `func_code` attribute to generators. In other 
words, if functions had had `code_object` instead of `func_code` at the time, 
bpo-1473257 might well have proposed `code_object` for generators. This 
doesn't, of course, mean that there might not be some post hoc reason to 
distinguish this part of the namespace now.

Then `func_code` was changed in 3.0 to `__code__` as part of the `f.func_X` to 
`f.__X__` renaming. The 3.0 whatsnew explained that the purpose of this change 
was to "free up [the f.func_X] names in the function attribute namespace for 
user-defined attributes". But this wasn't done for the analogous code object in 
generators. On a quick look, I didn't find any discussion of this at the time, 
but that doesn't mean there wasn't any.

--

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread syncosmic

Changes by syncosmic :


--
pull_requests:  -3163

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread syncosmic

Changes by syncosmic :


--
nosy: +syncosmic

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread syncosmic

Changes by syncosmic :


--
pull_requests: +3163

___
Python tracker 

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



[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-17 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset fe2b56ab9212c1cf19c48b848fa60f7f201c366f by Nick Coghlan 
(syncosmic) in branch 'master':
bpo-31183: `dis` now handles coroutines & async generators (GH-3077)
https://github.com/python/cpython/commit/fe2b56ab9212c1cf19c48b848fa60f7f201c366f


--

___
Python tracker 

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



[issue31197] Namespace disassembly omits some compiled objects

2017-08-17 Thread Nick Coghlan

Nick Coghlan added the comment:

For ease of reference, I separated out the idea of a common __code__ attribute 
to its own RFE: https://bugs.python.org/issue31230

--

___
Python tracker 

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



[issue31230] Add __code__ attributes to generator and coroutine objects

2017-08-17 Thread Nick Coghlan

New submission from Nick Coghlan:

As covered in issue 31183, correctly disassembling functions, 
generator-iterators, coroutines, and async generator-iterators currently 
requires checking for 4 different attributes:

* __code__ (functions)
* gi_code (generator iterators)
* cr_code (coroutines)
* ag_code (async generator iterators)

This could be simplified if the latter three all *also* exposed their code 
attributes as `__code__`.

--
messages: 300468
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add __code__ attributes to generator and coroutine objects
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Another big thank you.

--

___
Python tracker 

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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 6db2edbe050cc9ac9026f350a24f2d525bcadecd by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-31001: IDLE: Add tests for configdialog highlight tab (GH-3123) 
(#3124)
https://github.com/python/cpython/commit/6db2edbe050cc9ac9026f350a24f2d525bcadecd


--

___
Python tracker 

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



[issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Delete frame.highlight_sample when frame becomes self.
text = self.highlight_sample = frame.highlight_sample = Text( 

Change coverage to 95% when edit test file.

--

___
Python tracker 

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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +3162

___
Python tracker 

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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 82aff62462e65077a6614b466c986f93a601c33d by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-31001: IDLE: Add tests for configdialog highlight tab (#3123)
https://github.com/python/cpython/commit/82aff62462e65077a6614b466c986f93a601c33d


--

___
Python tracker 

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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Coverage now 95%.  We are getting close.  Still not covered in highlight group: 
 
create_page_highlight:  # Highlight only.
text.bind('', lambda e: 'break')
text.bind('', lambda e: 'break')
Callbacks are never called. I presume that these mask something.  I am not sure 
that they are needed.

save_new:  # Same as for keys.
if not idleConf.userCfg['highlight'].has_section(theme_name): 
Never false.

delete_custom:  # Same as for keys.
if not item_list: 
self.custom_theme_on['state'] = DISABLED 
self.customlist.SetMenu(item_list, '- no custom themes -') 
else: 
self.customlist.SetMenu(item_list, item_list[0]) 
Condition never false, else never executed.

--

___
Python tracker 

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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-17 Thread Łukasz Langa

Łukasz Langa added the comment:

I am unable to repro this locally. With the changes to libpython.py test_gdb 
still passes on CentOS 7 and macOS 10.12.

--

___
Python tracker 

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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

While our CI is getting better everyday, it still has a few flaws.

There is no automated buildbot failure notification to the author and
committer yet because random failures were very common 6 months ago. I
fixed something like 90% of the most common race conditions (in tests but
also in the code), and now the remaining 10% are the least funny ones :-)
My latest report:
https://haypo.github.io/python-buildbots-2017q2.html

In the meanwhile I check manually buildbots output and report bugs and
regressions.

For gdb, don't worry, the buildbots were fixed quickly, it's fine if the
pre-commit CI missed the issue since gdb changes are rare. I am confident
that we can design a fix without introducing regressions ;-)

--

___
Python tracker 

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



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

See https://github.com/python/cpython/pull/1224 and 
http://bugs.python.org/issue30121

--

___
Python tracker 

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



[issue31225] allow hashlib `update' to accept str

2017-08-17 Thread Christian Heimes

Christian Heimes added the comment:

Yes, what Antoine and Serhiy said.

--

___
Python tracker 

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



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I determined in #31228 (also on Windows, closed as a duplicate) that a debug 
build, bad file, and subprocess.PIPE are all required.  Has this been tried on 
non-Windows?  I confirmed the crash on 3.6.  I do not have a 2.7 repository 
build.

The two lines above constitute a unittest that currently fails  on a Windows 
debug build.  Even if there is no such buildbot, I think a test should be added 
that will fail on developer machines with such builds.  It should be skipped on 
non-debug and perhaps non-Windows machines.

--
nosy: +terry.reedy
stage:  -> patch review
type: behavior -> 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



[issue30983] eval frame rename in pep 0523 broke gdb's python extension

2017-08-17 Thread Łukasz Langa

Łukasz Langa added the comment:

In this case it would be great if the buildbots commented on the relevant pull 
request that it broke the build. Otherwise this creates this dissonance that it 
was all green during merging of the PR when in fact it wasn't.

I think we need to make test_gdb run on Travis, this is an unfortunate omission.

--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f6ebd838f00b4c211c72d85ee49749e910cd3afe by Victor Stinner in 
branch 'master':
bpo-30871: pythoninfo: add expat and _decimal (#3121)
https://github.com/python/cpython/commit/f6ebd838f00b4c211c72d85ee49749e910cd3afe


--

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Using any kind of potentially-blocking synchronization primitive from __del__ 
or weakref callback is indeed a bug waiting for happen.  I agree non-trivial 
cases can be hard to debug, especially when people don't expect that kind of 
cause.

It would be ok to submit a patch solving this issue using C code IMHO.  Note 
the maxsize argument complicates things even though most uses of Queue don't 
use maxsize.

Of course, the general issue isn't only about Queue: other synchronization 
primitives are widely used.  See 
https://github.com/tornadoweb/tornado/pull/1876 for an example.

--
nosy: +pitrou
resolution: wont fix -> 
stage:  -> needs patch
type: crash -> behavior
versions: +Python 3.7 -Python 2.7, Python 3.3, 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



[issue31001] IDLE: Add tests for configdialog highlight tab

2017-08-17 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +3161

___
Python tracker 

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



[issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE

2017-08-17 Thread Eryk Sun

Changes by Eryk Sun :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Windows: subprocess debug assertion on failure to execute the 
process

___
Python tracker 

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



[issue31229] wrong error messages when too many kwargs are received

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In all of these cases PyArg_ParseTupleAndKeywords() is used in uncommon way. 
These functions accept variable number of positional-only arguments, and 
PyArg_ParseTupleAndKeywords() is called with empty args tuple for parsing 
keyword arguments only. The patch uses a trick for detecting this case and 
generating more appropriate error message. Correct error message is generated 
in a normal case too.

LGTM. But it may be worth to add a short comment about the necessary of this 
special case. And please add tests for error messages in all of these 
functions. test_call looks appropriate place for them.

--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

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



[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2017-08-17 Thread Igor

Igor added the comment:

Oren, 

won't the "too large _length_" case vanish, if 
https://github.com/python/cpython/pull/3006 would be accepted ?

( http://bugs.python.org/issue16865 )

--
nosy: +i3v

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2017-08-17 Thread Igor

Changes by Igor :


--
nosy: +i3v

___
Python tracker 

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



[issue29593] Improve UnboundLocalError message for deleted names

2017-08-17 Thread Matthias Bussonnier

Matthias Bussonnier added the comment:

Thanks you all for your input, it seem like to much of electronic ink and time 
has been spend on this issue. For the sake of everyone and avoiding more to be 
spent, I'm going to close it.

--
resolution:  -> duplicate
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



[issue31229] wrong error messages when too many kwargs are received

2017-08-17 Thread Oren Milman

Changes by Oren Milman :


--
keywords: +patch
Added file: http://bugs.python.org/file47091/issue31229_ver1.diff

___
Python tracker 

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



[issue31229] wrong error messages when too many kwargs are received

2017-08-17 Thread Oren Milman

New submission from Oren Milman:

Some functions produce wrong error messages in case they receive too many
keyword arguments:
- in Objects/exceptions.c - ImportError_init:
>>> ImportError(1, 2, 3, 4, a=5, b=6, c=7)
TypeError: ImportError() takes at most 2 arguments (3 given)
- in Python/bltinmodule.c - min_max:
>>> min(1, 2, 3, 4, a=5, b=6, c=7)
TypeError: function takes at most 2 arguments (3 given)
>>> max(1, 2, 3, 4, a=5, b=6, c=7)
TypeError: function takes at most 2 arguments (3 given)
- in Modules/itertoolsmodule.c - product_new:
>>> itertools.product(0, a=1, b=2, c=3, d=4, e=5, f=6)
TypeError: product() takes at most 1 argument (6 given)
- in Python/bltinmodule.c - builtin_print: 
>>> print(0, a=1, b=2, c=3, d=4, e=5, f=6)
TypeError: print() takes at most 4 arguments (6 given)

ISTM that changing these error messages to refer to 'keyword arguments' instead
of 'arguments' is a possible solution. (e.g. the last one would become
'print() takes at most 4 keyword arguments (6 given)'

To do that, I changed two 'takes at most' PyErr_Format calls in 
Python/getargs.c.
I ran the test suite, and it seems that this patch doesn't break anything.
The diff file is attached.
(I didn't open a PR before hearing your opinion, as ISTM that changing code in
getargs.c is a delicate thing.)

what do you think?

--
components: Interpreter Core
messages: 300451
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: wrong error messages when too many kwargs are received
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2017-08-17 Thread Eryk Sun

Changes by Eryk Sun :


--
components:  -IO
stage:  -> test needed
type:  -> behavior
versions: +Python 3.7 -Python 3.3

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2017-08-17 Thread Eryk Sun

Eryk Sun added the comment:

Junctions are sometimes used as links (e.g. mklink /j) and sometimes as volume 
mount points (e.g. mountvol.exe). GetVolumePathName can be called to 
distinguish these cases. If a junction is a volume mount point, then its 
absolute path and volume path are the same. This test is already used in 
ntpath.ismount().

For a junction link, islink() should return true, readlink() should work, and 
S_ISDIR() should return false for the lstat() st_mode. For a junction mount 
point, islink() should return false, readlink() should not work, and S_ISDIR() 
should return true for the lstat() st_mode.

A helper function could be added in fileutils.c to determine whether a reparse 
point is a link, based on the file path and reparse tag. Then modify 
_Py_attribute_data_to_stat() to take `BOOL is_link` instead of `ULONG 
reparse_tag`.

--
nosy: +eryksun

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

> The exact behavior depends on the order of files in directories, on string 
> hashes randomization, on address randomization, and on many other things out 
> of our control.

For hash randomization, maybe we need to generate a PYTHONHASHSEED, as tox test 
runner does.

For the filesystem: right, it's not possible to get 100% reproductible tests, 
but IMHO it's worth it to make them more reliable.

> Couldn't reseeding the PRNG just add a false promise?

I'm trying to fix random failures on the Refleaks buildbots, not to promise 
anything :-) To be honest, at this point, I don't know if it would be enough 
since I'm unable to reproduce bugs...

> The success in making tests deterministic can also narrow down the coverage 
> of the testing. Some branches that lead to failures can be never executed. 
> Our target not just making tests always success, but catch and fix even 
> pretty rare errors.

I know that it's though question, and that's why I opened this issue, to 
discuss it :-)

But I see more and more projects to get more reproductible softwares and tests:

* https://reproducible-builds.org/
* systemd big project to get more "stateless" computers, or said differently: 
to isolate better services
* containers which also want to isolate services, "stateless" containers
* etc.

Other test runners, like tox, also make efforts to get reproductible tests, 
like setting PYTHONHASHSEED.

--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

python -m test.pythoninfo crashes for me on Win10, debug32, but I don't think 
it is the fault of pythoninfo.  See #31288.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Appveyor ran pythoninfo successfully on its normal 32-bit build.
https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.5381

--

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The PRNG is not the only source of the randomness in the tests. The exact 
behavior depends on the order of files in directories, on string hashes 
randomization, on address randomization, and on many other things out of our 
control. Couldn't reseeding the PRNG just add a false promise? The success in 
making tests deterministic can also narrow down the coverage of the testing. 
Some branches that lead to failures can be never executed. Our target not just 
making tests always success, but catch and fix even pretty rare errors.

--
nosy: +ezio.melotti, mark.dickinson, michael.foord, rhettinger

___
Python tracker 

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



[issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE

2017-08-17 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Running Debug|Win32 interpreter...
Python 3.7.0a0 (heads/master:b907abc885, Aug 17 2017, 11:41:56) [MSC v.1900 32 
bit (Intel)] on win32

I get the following crash report
--
Microsoft Visual C++ Runtime Library
(X) Debug Assertion Failed!
Program: F:\dev\3x\PCBuild\win32\python_d.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\close.cpp
Line: 48

Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle
...
(Press Retry to debug the application)


when running the following, extracted from test.pythoninfo

import subprocess
proc = subprocess.Popen(["gdb", "-nx", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)

If I do any of the following, I get the expected FileNotFound error.
1. Run with installed normal 64-bit 3.6.
2. Replace 'gdb' with 'python' (but 'xyz' still crashes).
3. Remove the std... options or replace subprocess.PIPE with a real file.

--
components: Library (Lib), Windows
messages: 300445
nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE
type: crash
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3160

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

I'm not sure if we should use the same RNG seed for all tests, or create one 
seed per test when the option -r is used.

For example, I expect that "./python -m test -r -F test_tools" will catch a 
random bug which only occurs for a specific random seed.

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

regrtest also has an issue: when tests are run again, they should be run in a 
fresh process, especially when tests are run in parallel (-jN).

--

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

It's even worse, many tests fail with 1 to 3 memory blocks on x86 Gentoo 
Refleaks 3.x... but then pass when run again.

I created bpo-31227 "regrtest: reseed random with the same seed before running 
a test file" which might help (or not?) this issue.

http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/62

test_sys leaked [1, 1, 1] memory blocks, sum=3
test_robotparser leaked [1, 1, 1] memory blocks, sum=3
test_nntplib leaked [1, 1, 1] memory blocks, sum=3
test_tools leaked [3, 2, 1] memory blocks, sum=6
test_fork1 leaked [1, 1, 1] memory blocks, sum=3
test_poll leaked [1, 1, 1] memory blocks, sum=3
test_asyncio leaked [2, 1, 1] memory blocks, sum=4

Re-running failed tests in verbose mode
Re-running test 'test_sys' in verbose mode
Re-running test 'test_robotparser' in verbose mode
Re-running test 'test_nntplib' in verbose mode
Re-running test 'test_tools' in verbose mode
test_tools leaked [1, 3, 1] memory blocks, sum=5
Re-running test 'test_fork1' in verbose mode
Re-running test 'test_poll' in verbose mode
Re-running test 'test_asyncio' in verbose mode

--

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Antoine Pitrou: "If refleaks depend on the random seed, perhaps it's a bug 
worth fixing?"

I propose to change regrtest behaviour even when -R is not used, to make 
regrtest more deterministic.

Currently, when you run "./python -m test -r test_xxx test_", it's hard to 
guess the state of the RNG in test_yyy: it depends on many bytes were consumed 
by test_xxx. For example, if test_xxx is run on a buildbot, but skipped when I 
run it locally: we get a different behaviour.

I would prefer that test_yyy behaves the same when run with "./python -m test 
-r --randseed=5 test_xxx test_" (with test_xxx) and with "./python -m test 
-r --randseed=5 test_" (without test_xxx).

With my change, "./python -m test -r --randseed=5 test_ test_" 
(sequential) and "./python -m test -r --randseed=5 -j2 test_ test_" 
(parallel) runs test_yyy twice with the RNG in the same state.

Proposed change is part of a more global project to reduce side effects of 
tests, to make tests more reproductible and more "isolated".

--

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If refleaks depend on the random seed, perhaps it's a bug worth fixing?

--

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.x

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

I created bpo-31227: "regrtest: reseed random with the same seed before running 
a test file".

--

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3159

___
Python tracker 

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



[issue31227] regrtest: reseed random with the same seed before running a test file

2017-08-17 Thread STINNER Victor

New submission from STINNER Victor:

Attached PR changes regrtest to reseed the random RNG before each test file. 
Use also more entropy for the seed: 2**32 (32 bits) rather than
10_000_000 (24 bits).

The change should avoid random failure of test_tools when hunting reference 
leaks: see bpo-31174.

Maybe it will also reduce false positive when hunting memory leaks, like 
bpo-31217.

--
components: Tests
messages: 300438
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest: reseed random with the same seed before running a test file
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

If libexpat is upgraded in Python 2.7, the new Modules/expat/loadlibrary.c 
should also be added to PC/VS9.0/ project files, as I did for PCbuild.

Note: PC/VS7.1/ and PC/VS8.0/ are likely broken and don't need to be updated, 
right?

--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

patchcheck fixed in 2.7, 3.6 and 3.7 master.

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d45cb040b9fcd74e8824d417bf789fcef4c9592c by Victor Stinner in 
branch '2.7':
[2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118)
https://github.com/python/cpython/commit/d45cb040b9fcd74e8824d417bf789fcef4c9592c


--

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-17 Thread Julien Palard

Julien Palard added the comment:

Has been merged on master, backported to 3.6 and 2.7.

It starts to appear on some versions as the script is currently running, like 
in https://docs.python.org/2.7/.

I'll close when I'll see this on all versions.

--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

> I plan to backport Lib/test/pythoninfo.py and "make pythoninfo" to Python 2.7 
> and 3.6 to ease debug on all supported Python branches.

Oh, but I will first only run pythoninfo on buildbot for the master branch, 
since I expect surprises depending on the platform :-) Once everything is fine, 
I will backport the enhancement to other branches.

--

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-17 Thread Steve Dower

Steve Dower added the comment:

The idea interests me from a theoretical point of view, but then I did my PhD 
in that field. I don't believe it's a practical solution, if only because you 
would need to manually generate the result in order to validate before 
releasing, and that's the step you're going to avoid.

I don't think there's anything left to pursue here. Good luck with your efforts.

--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

I created https://github.com/python/cpython/pull/3120 to add "make pythoninfo" 
because it's more tricky than what I expected to run "./python -m 
test.pythoninfo" on buildbots. Depending if Python is built with shared 
library, depending on the OS (./python, or ./python.exe for macOS?), ... the 
command is different.

I plan to backport Lib/test/pythoninfo.py and "make pythoninfo" to Python 2.7 
and 3.6 to ease debug on all supported Python branches.

--
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3158

___
Python tracker 

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



[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Oren Milman

Changes by Oren Milman :


--
pull_requests: +3157

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d23b1c4fd82a326e729027a791220d6011e097b4 by Victor Stinner in 
branch '3.6':
[3.6] bpo-31221: patchcheck ignores external libraries (#3109) (#3116)
https://github.com/python/cpython/commit/d23b1c4fd82a326e729027a791220d6011e097b4


--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b907abc88589f7bea52c5afe172ececc6edcda70 by Victor Stinner in 
branch 'master':
bpo-30871: Add test.pythoninfo (#3075)
https://github.com/python/cpython/commit/b907abc88589f7bea52c5afe172ececc6edcda70


--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3156

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-17 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3155

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-17 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3154

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3153

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 4a347ce426fe7381885703d9074d7a6b3aeb2f2b by Victor Stinner in 
branch 'master':
bpo-31221: patchcheck ignores external libraries (#3109)
https://github.com/python/cpython/commit/4a347ce426fe7381885703d9074d7a6b3aeb2f2b


--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Stefan Krah: "Yes, please add libmpdec to the ignored files."

Ok, (already) done.

--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: "The parts for OSX and MSVC still are in the source tree."

Oh, I didn't know that we still had two special libffi directories for macOS 
and Windows!

Why do we still have these directories? Both seems to be very outdated, no?

I completed my list:
http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries


Serhiy: "As for dropping support for Mercurial, is patchcheck.py used in other 
Python implementations (PyPy, Jython) which still use Mercurial?"

I reverted my change to keep Mercurial support.

--

___
Python tracker 

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



[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: "For example TCL_VERSION and TK_VERSION are static versions (they 
should be equal in modern Tcl/Tk), and Tcl command "info patchlevel" returns 
the dynamic version."

Ok, I added tkinter.patchlevel info which calls "info patchlevel".


Serhiy: "In the readline module _READLINE_VERSION is header version, 
_READLINE_RUNTIME_VERSION and _READLINE_LIBRARY_VERSION are runtime versions."

The 3 variables are stored.


Serhiy: "In the zlib module ZLIB_VERSION is header version, 
ZLIB_RUNTIME_VERSION is runtime version."

I just added the 2 variables.

--

___
Python tracker 

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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The side effect of this patch is making dict.copy() atomic. This is a worthy 
feature if extent it to dict constructor. For now the only way of making an 
atomic (or almost atomic) copy of a dict is dict(list(d.itemview())). It isn't 
very time and memory efficient.

If you will make dict copying removing holes and extend your patch to dict 
constructor, it could be more useful.

Look at the set implementation. It doesn't just use memcpy, but it contains 
specialized insertion implementation for the case if all items are unique. Fast 
copying is more important for dicts since the copying is more common for sets. 
It is a part of set operations and it is common to convert a set to a frozenset.

--

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2017-08-17 Thread Vidar Fauske

New submission from Vidar Fauske:

On Windows (Windows 10 in my case), given the following directory structure:
- rootfolder
 - a
 - b
  - junc (directory junction to ../a)

a call to `shutil.rmtree('root')` will fail with an exception 
`FileNotFoundError: [WinError 3]`, in a call to `os.listdir()` in 
`_rmtree_unsafe`. See attached minimal working example.

Note that sorting order is important: A link in 'a' pointing to 'b' does not 
fail. This is because `os.listdir()` raises an exception for 'b/junc' when its 
target ('a') has already been deleted.

Also, note that this is only for junctions, not directory links (`mklink /J` vs 
`mklink /D`), because:
 - Directory links flag false in the `stat.S_ISDIR(os.lstat('b/junc').st_mode)` 
test while junctions do not.
 - `os.islink()` returns false for both junctions, while directory links do not.

Indicated Python versions are those which I have personally tested on, and 
observed this behavior.

Current use case: Deleting a folder tree generated by an external tool, which 
creates junction links as part of its normal operation ('lerna' tool for the 
'npm' javascript package manager).

--
components: IO, Library (Lib), Windows
files: mwe.py
messages: 300424
nosy: paul.moore, steve.dower, tim.golden, vidartf, zach.ware
priority: normal
severity: normal
status: open
title: shutil.rmtree fails when target has an internal directory junction 
(Windows)
versions: Python 3.3, Python 3.6
Added file: http://bugs.python.org/file47090/mwe.py

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Yury Selivanov

Yury Selivanov added the comment:

An idea from the blog post: if we rewrite queue in C it will use the GIL as a 
lock which will fix this particular bug.  I can make a patch.

--
status: closed -> open

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Nick Coghlan

Nick Coghlan added the comment:

Itamar wrote up a post describing the GC variant of this problem in more 
detail: https://codewithoutrules.com/2017/08/16/concurrency-python/

In particular, he highlighted a particularly nasty action-at-a-distance variant 
of the deadlock where:

1. Someone registers a logging.handlers.QueueHandler instance with the logging 
system
2. One or more types in the application or libraries it uses call logging 
functions in a __del__ method or a weakref callback
3. A GC cycle triggers while a log message is already being processed and hence 
the thread already holds the queue's put() lock
4. Things deadlock because the put() operation isn't re-entrant

As far as I can see, there's no application level way of resolving that short 
of "Only register logging.handlers.QueueHandler with a logger you completely 
control and hence can ensure is never used in a __del__ method or weakref 
callback", which doesn't feel like a reasonable restriction to place on the 
safe use of a standard library logging handler.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-17 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3152

___
Python tracker 

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



[issue31187] suboptimal code in Py_ReprEnter()

2017-08-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue31141] Start should be a keyword argument of the built-in sum

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Your tests show that there is a performance regression of getting rid of 
Argument Clinic (in addition to increasing the maintenance cost of the code 
that was generated previously). Try to use the simple Argument Clinic change 
(it can has non-zero cost too, but I expect that its penalty is much smaller).

--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread Stefan Krah

Stefan Krah added the comment:

Yes, please add libmpdec to the ignored files.

--

___
Python tracker 

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



[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Answered questions on Rietveld. I'm not sure email notification from Rietveld 
works now.

--

___
Python tracker 

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



[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-17 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> also, i found two places with a quite similar issue:
> may I fix them also as part of this issue?

This looks as a different issue to me. All these cases are similar, but 
different from the original issue. Please open a new issue.

--

___
Python tracker 

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



[issue24700] array compare is hideously slow

2017-08-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Adrian's PR was merged. Thank you Adrian!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24700] array compare is hideously slow

2017-08-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 7c17e2304b9387f321c813516bf134e4f0bd332a by Antoine Pitrou 
(Adrian Wielgosik) in branch 'master':
bpo-24700: Add a fast path for comparing array.array of equal type (#3009)
https://github.com/python/cpython/commit/7c17e2304b9387f321c813516bf134e4f0bd332a


--

___
Python tracker 

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



[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could the updating script be added into the CPython repository?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> libffi should be excluded in Python 2.7 and 3.6, but it was removed from 
> Python 3.7.

The parts for OSX and MSVC still are in the source tree.

As for dropping support for Mercurial, is patchcheck.py used in other Python 
implementations (PyPy, Jython) which still use Mercurial?

--
nosy: +skrah

___
Python tracker 

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



[issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:


New changeset ffbb6f7334ccf54f09dcc9e760766d861928f13e by Victor Stinner in 
branch '3.6':
bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666) 
(#3102)
https://github.com/python/cpython/commit/ffbb6f7334ccf54f09dcc9e760766d861928f13e


--

___
Python tracker 

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



[issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: "Is it worth to add other imported libs (libmpdec, libffi)?"

Oh right, I forgot libmpdec: I updated my PR.

By the way, I started a list of embedded libraries:
http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries

* zlib
* expat
* libmpdec
* libffi

libffi should be excluded in Python 2.7 and 3.6, but it was removed from Python 
3.7.


Serhiy: "Or may be just remove trailing spaces when import sources from 
upstream?"

I prefer to leave the copied code unchanged, so it allows to easily cherry-pick 
from upstream. I did that once for libexpat (for fix a compilation issue on 
Visual Studio 2008).

--

___
Python tracker 

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



[issue31225] allow hashlib `update' to accept str

2017-08-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Explicit is better than implicit.

It is easy to add ".encode()" in the user code if it needs this.  Adding this 
feature has non-zero (and actually not a small) cost. Since update() is not 
just a method, but a part of a protocol, you need to update all 
implementations. On other hand, raising an error on string argument can help to 
catch an error if a string unexpectedly occurred instead of a bytes object.

--
nosy: +christian.heimes, gregory.p.smith, serhiy.storchaka
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6

2017-08-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue31225] allow hashlib `update' to accept str

2017-08-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This will never happen as this is precisely the kind of confusion Python 3 was 
designed to avoid.

--
nosy: +pitrou
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30910] Add -fexception to ppc64le build

2017-08-17 Thread Gustavo Serra Scalet

Gustavo Serra Scalet added the comment:

Sorry, I didn't take a deeper analysis on what you said, I guess you wanted to 
point out this problem:

.-.
| A C++ code  | <= Designed to be the catcher
:-:
|   cpython   | <= Malloc'd something but unwind will not free it
:-:
| called C++ function | <= Raises a C++ exception
'-'

I guess memory leak would be a consequence, yes. *Sigh*

--

___
Python tracker 

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



[issue30910] Add -fexception to ppc64le build

2017-08-17 Thread Gustavo Serra Scalet

Gustavo Serra Scalet added the comment:

> Throwing exceptions through CPython is totally unsupported, -fexceptions or 
> not. Like C++ code that's not exception-aware, CPython lacks any of the catch 
> handlers to properly clean up resources on unwind. 

wait wait. It's not expected that CPython would handle the exception at all! 
The only thing it's needed for CPython is to let the compiler generate extra 
information about how each function looks like in the stack (how the frame is 
structured, in DWARF language) in order for the unwinder to do his job.

As documented, the code would not change its current behavior (no machine code 
is added or removed, so when debugging your function looks the same) but extra 
information is given in other for unwind to happen through those frames.

--

___
Python tracker 

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



[issue31225] allow hashlib `update' to accept str

2017-08-17 Thread ksqsf

New submission from ksqsf:

It'll be nice if `update' can accept str directly, rather than str.encode first.

One of the most common use cases is "m.update(s.encode())", so it shouldn't 
make a big difference to just use "m.update(s)"; after all, users who want to 
specify encoding explicitly can still do so.

--
components: Library (Lib)
messages: 300406
nosy: ksqsf
priority: normal
severity: normal
status: open
title: allow hashlib `update' to accept str
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



[issue31224] Missing definition of frozen module

2017-08-17 Thread Marco Buttu

New submission from Marco Buttu:

In the doc there are several hints [*] to frozen modules, but there is no 
definition of them.  Do you think we should add a "frozen module" definition to 
the glossary?

* Doc/library/importlib.rst, Doc/library/imp.rst, Doc/reference/import.rst, ...

--
assignee: docs@python
components: Documentation
messages: 300405
nosy: docs@python, marco.buttu
priority: normal
severity: normal
status: open
title: Missing definition of frozen module
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue31208] Simplify `low_fds_to_close` in subprocess.py

2017-08-17 Thread TaoQingyun

Changes by TaoQingyun <845767...@qq.com>:


--
resolution:  -> not a bug
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



[issue30616] Cannot use functional API to create enum with zero values

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for the bugreport Gerrit Holl and thanks for fixes Dong-hee Na!

--
nosy: +haypo
resolution:  -> fixed
stage: backport needed -> 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



[issue31210] Can not import modules if sys.prefix contains DELIM

2017-08-17 Thread Nick Coghlan

Nick Coghlan added the comment:

If you have access to modify PYTHONPATH at all, you can already shadow almost 
all standard library modules:

$ PYTHONPATH=/MY_CHOSEN_DIRECTORY python3 -m site
sys.path = [
'/home/ncoghlan',
'/MY_CHOSEN_DIRECTORY',
'/usr/lib64/python36.zip',
'/usr/lib64/python3.6',
'/usr/lib64/python3.6/lib-dynload',
'/home/ncoghlan/.local/lib/python3.6/site-packages',
'/usr/lib64/python3.6/site-packages',
'/usr/lib/python3.6/site-packages',
]

The only ones you can't shadow that way are builtin and frozen modules, and any 
modules that get imported even before PYTHONPATH is processed. So no, this 
doesn't open up any new attack vectors that weren't already present by design.

As far as whether or not it's worth fixing goes, yes, I think so - one of my 
original motivations for writing PEP 432 was to allow the use of CPython data 
structures when calculating the initial value of sys.path, and this is a nice 
concrete example of a bug arising from the current implementation.

--

___
Python tracker 

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



[issue28332] keyword arguments

2017-08-17 Thread Oren Milman

Changes by Oren Milman :


--
title: silent truncations in socket.htons and socket.ntohs -> keyword arguments

___
Python tracker 

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



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

2017-08-17 Thread Oren Milman

Changes by Oren Milman :


--
title: keyword arguments -> Deprecated silent truncations in socket.htons and 
socket.ntohs.

___
Python tracker 

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



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

2017-08-17 Thread Oren Milman

Changes by Oren Milman :


--
title: Deprecated silent truncations in socket.htons and socket.ntohs. -> 
silent truncations in socket.htons and socket.ntohs

___
Python tracker 

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



[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Oren Milman

Oren Milman added the comment:

After more looking, I found this issue in two more places:
- in Modules/itertoolsmodule.c in product_new:
>>> itertools.product(0, a=1, b=2, c=3, d=4, e=5, f=6)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: product() takes at most 1 argument (6 given)
- in Python/bltinmodule.c in builtin_print: 
>>> print(0, a=1, b=2, c=3, d=4, e=5, f=6)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: print() takes at most 4 arguments (6 given)

what do you think?
should I open another issue for these and the other two I
mentioned in msg300366?

--

___
Python tracker 

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



[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2017-08-17 Thread Andy Balaam

Andy Balaam added the comment:

bump

--

___
Python tracker 

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



  1   2   >