[issue32147] improve performance of binascii.unhexlify() by using conversion table

2019-03-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue36301] Add _Py_PreInitialize() function

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fa1537684869186da7938e4330361bf02363bac8 by Victor Stinner in 
branch 'master':
bpo-36301: Add _PyPreCmdline internal API (GH-12458)
https://github.com/python/cpython/commit/fa1537684869186da7938e4330361bf02363bac8


--

___
Python tracker 

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



[issue36376] Wrong position of SyntaxError in IDLE

2019-03-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE should display the same error message and mark the error at the same spot 
that Python tells it too, which is to say, what is display and where it is 
marked when running Python in a console/terminal.  The only difference is that 
IDLE uses red background highlight instead of a caret.  For 3.7.2, IDLE 
displays the same 'invalid syntax' message but mis-marks the position as you 
say. 

The latest 3.7.3rc1 and 3.8.0a2 releases on Windows, without and with IDLE, 
with code in file or entered interactively, correctly display "SyntaxError: 
unmatched ')'", with an improved message, and mark the stray ')'.  The only new 
IDLE patch that might have fixed this (accidentally, as a side effect) was 
#34055.  Or some detail of the info IDLE gets might have changed.

If you find another example that fails with or without IDLE, in file or at 
prompt, please give all details and copy and paste the traceback from both 
python and IDLE.

I make of note of this as a test case for a future error highlight test.

--
resolution:  -> out of date
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



[issue23984] Documentation error: Descriptors

2019-03-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12412

___
Python tracker 

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



[issue23984] Documentation error: Descriptors

2019-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset abbdd1fc5c2017683da8d2ed3e8843e8c159bc8c by Miss Islington (bot) 
(Shubham Aggarwal) in branch 'master':
bpo-23984: Improve descriptor documentation (GH-1034)
https://github.com/python/cpython/commit/abbdd1fc5c2017683da8d2ed3e8843e8c159bc8c


--
nosy: +miss-islington

___
Python tracker 

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



[issue22166] test_codecs leaks references

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

Codec tests don't leak anymore. I lost track of this very old issue. I don't 
think that anything should be done. Python code base changed a lot since 2014. 
I close the issue.

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-03-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue36377] Python 'datastructures.html' docs page needs improvement because of ambiguity

2019-03-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the confirmation. I will raise a PR for this.

--

___
Python tracker 

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



[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

>From the stack trace it looks like some kind of recursion occurs on the tests 
>causing the crash. Sympy is not a part of stdlib. Can you please add a pure 
>Python reproducer or this is something that needs to be fixed by reporting to 
>sympy repo.

--
nosy: +xtreak

___
Python tracker 

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



[issue36377] Python 'datastructures.html' docs page needs improvement because of ambiguity

2019-03-19 Thread parkito


parkito  added the comment:

Hi, I have lots of interests in python data structures and their inheritance 
relationships so I often look around in python collections and collections.abc 
module.

```
https://docs.python.org/3/tutorial/datastructures.html#comparing-sequences-and-other-types
```

Please see the last section of the page. I know all Python users are well aware 
of Sequence comparisons like in tuples and list. This page also mentions that 

'Sequence objects may be compared to other objects with the same sequence type' 
in the very first line of the page.

However, we have to know that 'range' is also a subclass of 'Sequence' but 
'range' objects are not comparable to each other.

I tested 'range(1, 3) < 'range(3)' in my interpreter. If it compares correctly 
as both are same Sequence types, result would be 'False'. Instead, TypeError 
was raised. It's because comparison methods(__gt__, __lte__, etc) are not 
impleneted here. I thought range objects would compare the values with peeking. 
But they don't. 


So, I recommend you to improve 5.8 section as follows:
  
   -> Please specify that 'not all' Sequence subclass are comparable to the 
same classes: typically, 'range'.

'range' is a good example because every Python user uses 'range' in for loop.

--

___
Python tracker 

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



[issue36377] Python 'datastructures.html' docs page needs improvement because of ambiguity

2019-03-19 Thread parkito


New submission from parkito :

Hi, I have lots of interests in python data structures and their inheritance 
relationships so I often look around in python collections and collections.abc 
module.

```
https://docs.python.org/3/tutorial/datastructures.html#comparing-sequences-and-other-types
```

Please see the last section of the page. I know all Python users are well aware 
of Sequence comparisons like in tuples and list. This page also mentions that 

'Sequence objects may be compared to other objects with the same sequence type' 
in the very first line of the page.

However, we have to know that 'range' is also a subclass of 'Sequence' but 
'range' objects are not comparable to each other.

I tested 'range(1, 3) < 'range(3)' in my interpreter. If it compares correctly 
as both are same Sequence types, result would be 'False'. Instead, TypeError 
was raised. It's because comparision methods(__gt__, __lte__, etc) are not 
impleneted here. I thought range objects would compare the values with peeking. 
But they don't. 


So, I recommend you to implement 5.8 section in this page as follows:
  
   -> Please specify that 'not all' Sequence subclass are comparable to the 
same classes: typically, 'range'.

'range' is a good example because every Python user uses 'range' in for loop.

--
assignee: docs@python
components: Documentation
hgrepos: 382
messages: 338433
nosy: docs@python, shoark7
priority: normal
severity: normal
status: open
title: Python 'datastructures.html' docs page needs improvement because of 
ambiguity
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



[issue36376] Wrong position of SyntaxError in IDLE

2019-03-19 Thread Vedran Čačić

Change by Vedran Čačić :


--
type:  -> behavior

___
Python tracker 

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



[issue36376] Wrong position of SyntaxError in IDLE

2019-03-19 Thread Vedran Čačić

Change by Vedran Čačić :


--
assignee:  -> terry.reedy
components: +IDLE
nosy: +terry.reedy
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



[issue36376] Wrong position of SyntaxError in IDLE

2019-03-19 Thread Vedran Čačić

New submission from Vedran Čačić :

Open IDLE, New File, put this inside:

'abcde\
')
x = 123456789

And try to Run Module. Of course, the syntax error is extra ) at the end of the 
second line. But it is not highlighted. What's highlighted is 123 in the third 
line. Some additional observations:

* the length of the first line determines somehow what's highlighted in the 
third one: the longer the first line, more to the right the highlight goes in 
the third;

* third line can be whatever you want, it just needs to be long enough for a 
highlight to appear;

* you can even have blank lines between them;

* the same phenomenon appears if you use triple-quoted strings instead of 
single-quoted with backslash line continuation.

--
messages: 338432
nosy: veky
priority: normal
severity: normal
status: open
title: Wrong position of SyntaxError in IDLE

___
Python tracker 

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



[issue36356] Failure to build with address sanitizer

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4a1468e593c4b67d8c78b78070fff9e18ec5d790 by Victor Stinner in 
branch 'master':
bpo-36356: Fix _PyCoreConfig_Read() (GH-12454)
https://github.com/python/cpython/commit/4a1468e593c4b67d8c78b78070fff9e18ec5d790


--

___
Python tracker 

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



[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-19 Thread Ma Lin


Ma Lin  added the comment:

> AC will not happen: It makes the module too large and unreadable.

AC has great performance improvements these days: issue35582 and issue36127
It's quite worthy of reconsidering this decision.

--
nosy: +Ma Lin

___
Python tracker 

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



[issue36301] Add _Py_PreInitialize() function

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12411

___
Python tracker 

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



[issue28937] str.split(): remove empty strings when sep is not None

2019-03-19 Thread Emanuel Barry


Emanuel Barry  added the comment:

Unfortunately not. I no longer have the time or means to work on this, sorry. I 
hope someone else can pick it up.

--

___
Python tracker 

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



[issue28937] str.split(): remove empty strings when sep is not None

2019-03-19 Thread Emanuel Barry


Change by Emanuel Barry :


--
nosy:  -ebarry

___
Python tracker 

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



[issue36301] Add _Py_PreInitialize() function

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f29084d611a6ca504c99a0967371374febf0ccc3 by Victor Stinner in 
branch 'master':
bpo-36301: Add _PyRuntime.pre_initialized (GH-12457)
https://github.com/python/cpython/commit/f29084d611a6ca504c99a0967371374febf0ccc3


--

___
Python tracker 

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



[issue36301] Add _Py_PreInitialize() function

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12410

___
Python tracker 

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



[issue33635] OSError when using pathlib.Path.rglob() to list device files

2019-03-19 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue26517] Crash in installer

2019-03-19 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Closing this as 'works for me' as no additional information had been provided 
by the OP to help reproduce the issue.

--
nosy: +cheryl.sabella
resolution:  -> works for me
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



[issue36143] Auto-generate Lib/keyword.py

2019-03-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +12409
stage:  -> patch review

___
Python tracker 

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



[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-03-19 Thread Cameron Simpson


Change by Cameron Simpson :


--
keywords: +patch
pull_requests: +12408
stage:  -> patch review

___
Python tracker 

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



[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2019-03-19 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

It looks like this issue can be closed now that it's merged?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-03-19 Thread Cameron Simpson


New submission from Cameron Simpson :

This issue is to track the implementation of PEP 499 which we hope to get into 
the upcoming 3.8 release. I've made it because cpython PRs want a bpo number in 
the subject line.

I'll link in the proposed PR once I've filed off a few grammar issues I've just 
noticed (documentation English grammar).

--
components: Interpreter Core
messages: 338425
nosy: cameron, ncoghlan
priority: normal
severity: normal
status: open
title: PEP 499 implementation: "python -m foo" binds the main module as both 
__main__ and foo in sys.modules
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue36356] Failure to build with address sanitizer

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12407

___
Python tracker 

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



[issue36356] Failure to build with address sanitizer

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12406

___
Python tracker 

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



[issue36333] memory leaks detected with valgrind for python -V

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

"./python -V" no longer leaks, so I close the issue. See bpo-36356 for the 
follow-up.

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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread Brrr Grrr


Brrr Grrr  added the comment:

I now used a custom HTTPRedirectHandler with `max_redirections = 20`. The 
default is 10. This workaround addresses the issue, although it doesn't rule 
out a cleaner fix.

--

___
Python tracker 

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



[issue28937] str.split(): remove empty strings when sep is not None

2019-03-19 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

@veky - Thank you for pointing out splitlines(keepends=True).  If we wanted 
consistency, then we'd change the sense and use something like 
.split(keepempty=True), however:

* I don't like run-on names, so I would suggest keep_empty
* Maybe just `keep` is enough
* Either way, this should be a keyword only argument
* The default would still be None (i.e. current behavior), but keep_empty=True 
would be equivalent to prune=False and keep_empty=False would be equivalent to 
prune=True in the previous discussion.

--

___
Python tracker 

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



[issue36362] Detected unused variables in import.c and HAVE_DYNAMIC_LOADING=False with --with-address-sanitizer

2019-03-19 Thread Brett Cannon


Brett Cannon  added the comment:

Thanks!

--
nosy: +brett.cannon
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



[issue36362] Detected unused variables in import.c and HAVE_DYNAMIC_LOADING=False with --with-address-sanitizer

2019-03-19 Thread miss-islington

miss-islington  added the comment:


New changeset 0d765e3849f1010276bb349b557b79ed94befa0b by Miss Islington (bot) 
(Stéphane Wirtel) in branch 'master':
bpo-36362: Avoid unused variables when HAVE_DYNAMIC_LOADING is not defined 
(GH-12430)
https://github.com/python/cpython/commit/0d765e3849f1010276bb349b557b79ed94befa0b


--
nosy: +miss-islington

___
Python tracker 

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



[issue36365] Objects/structseq.c: warning: 'strncpy' specified bound depends on the length of the source argument

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ea3592d7ef6308bf9f6c7d86556f9b36f5ca0060 by Victor Stinner in 
branch '3.7':
bpo-36365: Fix compiler warning in structseq.c (GH-12451)
https://github.com/python/cpython/commit/ea3592d7ef6308bf9f6c7d86556f9b36f5ca0060


--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: Oh ok, thanks for testing. I fixed 3.7 as well. Would you mind to 
validate my fix?

--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f7959a9fe7e7e316899c60251e29390c4ed0307a by Victor Stinner in 
branch '3.7':
bpo-36236: Handle removed cwd at Python init (GH-12450)
https://github.com/python/cpython/commit/f7959a9fe7e7e316899c60251e29390c4ed0307a


--

___
Python tracker 

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



[issue36365] Objects/structseq.c: warning: 'strncpy' specified bound depends on the length of the source argument

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12405

___
Python tracker 

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



[issue36365] Objects/structseq.c: warning: 'strncpy' specified bound depends on the length of the source argument

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c70ab02df2894c34da2223fc3798c0404b41fd79 by Victor Stinner in 
branch 'master':
bpo-36365: Rewrite structseq_repr() using _PyUnicodeWriter (GH-12440)
https://github.com/python/cpython/commit/c70ab02df2894c34da2223fc3798c0404b41fd79


--

___
Python tracker 

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



[issue36365] Objects/structseq.c: warning: 'strncpy' specified bound depends on the length of the source argument

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12404

___
Python tracker 

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



[issue35388] _PyRuntime_Initialize() called after Py_Finalize() does nothing

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35388] _PyRuntime_Initialize() called after Py_Finalize() does nothing

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fd23cfa464ab93273370475900819c1ea37c852f by Victor Stinner in 
branch 'master':
bpo-35388: Fix _PyRuntime_Finalize() (GH-12443)
https://github.com/python/cpython/commit/fd23cfa464ab93273370475900819c1ea37c852f


--

___
Python tracker 

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



[issue18016] subprocess should open stdin in mode w+b on windows

2019-03-19 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Since Steve was inclined to close this in 2014 and there haven't been any 
additional comments since then, I am going to close this now.

--
nosy: +cheryl.sabella
resolution:  -> works for me
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



[issue32147] improve performance of binascii.unhexlify() by using conversion table

2019-03-19 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Since this PR was merged, can the issue be closed?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue28937] str.split(): remove empty strings when sep is not None

2019-03-19 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@ebarry, any interest in converting your patch to a GitHub pull request?  
Thanks!

--
nosy: +cheryl.sabella
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue36374] A possible null pointer dereference in compile.c's merge_consts_recursive()

2019-03-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +12403
stage:  -> patch review

___
Python tracker 

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



[issue36374] A possible null pointer dereference in compile.c's merge_consts_recursive()

2019-03-19 Thread Zackery Spytz


New submission from Zackery Spytz :

If PyDict_SetDefault() fails in merge_consts_recursive(), Py_INCREF() will be 
called on a null pointer.

--
components: Interpreter Core
messages: 338411
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: A possible null pointer dereference in compile.c's 
merge_consts_recursive()
type: crash
versions: Python 3.8

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-03-19 Thread miss-islington


miss-islington  added the comment:


New changeset fe13883f01da855967403acab77e0f16707a56cb by Miss Islington (bot) 
(Raymond Hettinger) in branch 'master':
bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational 
approximation (GH-12448)
https://github.com/python/cpython/commit/fe13883f01da855967403acab77e0f16707a56cb


--
nosy: +miss-islington

___
Python tracker 

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



[issue36324] Inverse cumulative normal distribution function

2019-03-19 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +12402

___
Python tracker 

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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread Brrr Grrr


Brrr Grrr  added the comment:

That's not to say that cookies are not needed for this URL. They may very well 
be needed using HTTPCookieProcessor. I'm saying that cookies alone won't solve 
this issue.

--

___
Python tracker 

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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread Brrr Grrr


Brrr Grrr  added the comment:

This error is not due to cookies either. I tried `HTTPCookieProcessor` with no 
luck. Cookies help with opening certain other URLs but evidently not with this 
one.

--

___
Python tracker 

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



[issue36371] FancyGetopt.generate_help crashes with TypeError

2019-03-19 Thread SilentGhost


SilentGhost  added the comment:

I'm not sure why you're using distutils, but two extra spaces at the end of 
string is not likely to be fixed. The module is frozen and only present in the 
tree for historical reasons.

--
components: +Distutils
nosy: +SilentGhost, dstufft, eric.araujo
resolution:  -> rejected
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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-03-19 Thread dtrauma


New submission from dtrauma :

https://docs.python.org/3.7/library/asyncio-task.html#running-tasks-concurrently

For asyncio.gather, the docs should probably say

The loop argument is deprecated and scheduled for removal in Python 3.10.

as they do for all the other loop arguments of other functions.

--
assignee: docs@python
components: Documentation
messages: 338406
nosy: docs@python, dtrauma
priority: normal
severity: normal
status: open
title: asyncio.gather: no docs for deprecated loop parameter
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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib) -IO
nosy: +orsenthil
type: crash -> behavior

___
Python tracker 

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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread Brrr Grrr


Brrr Grrr  added the comment:

Please note that the `requests` package, for example, has no trouble reading 
this URL. I don't want to use that package for this task for certain other 
reasons though.

```python
>>> import requests
>>> requests.__version__
'2.21.0'
>>> requests.get('https://www.annemergmed.com/article/S0196-0644(99)70271-4/abstract')

```

--

___
Python tracker 

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



[issue10514] configure does not create accurate Makefile on AIX

2019-03-19 Thread Michael Felt


Michael Felt  added the comment:

>From memory I do not believe this is still a problem, at least on Python3.

There was recently a different issue (do not recall the #) where there was an 
issue with CXX regardless of compiler.

In any case, the apporach I would recommend would be to export the environment 
variable OBJECT_MODE=64.

The only issue I have run into is when pip modules require a C compiler and 
there is a size mis-match (unset OBJECT_MODE is assumed to be 32. exporting 
OBJECT_MODE=64 and then running the pip command again ends successfully (or at 
least goes farther).

--

___
Python tracker 

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



[issue36372] Flawed handling of URL redirect

2019-03-19 Thread Brrr Grrr


New submission from Brrr Grrr :

I'm unable to use `urlopen` to open 
'https://www.annemergmed.com/article/S0196-0644(99)70271-4/abstract' with 
Python 3.7. I believe this to be flawed URL redirection, possibly due to flawed 
URL parsing.

```python
from sys import version
version
'3.7.2 (default, Dec 25 2018, 03:50:46) \n[GCC 7.3.0]'
from urllib.request import urlopen
urlopen('https://www.annemergmed.com/article/S0196-0644(99)70271-4/abstract')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302
return 

[issue35866] concurrent.futures deadlock

2019-03-19 Thread Jakub Wilk


Change by Jakub Wilk :


Added file: https://bugs.python.org/file48224/gdb-bt-child.txt

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-03-19 Thread Jakub Wilk


Jakub Wilk  added the comment:

There are two processes running (parent and child) when the thing hangs.
I'm attaching GDB backtraces for both.

--
Added file: https://bugs.python.org/file48223/gdb-bt-parent.txt

___
Python tracker 

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



[issue36371] FancyGetopt.generate_help crashes with TypeError

2019-03-19 Thread Maxim


Change by Maxim :


--
keywords: +patch
pull_requests: +12400
stage:  -> patch review

___
Python tracker 

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



[issue36371] FancyGetopt.generate_help crashes with TypeError

2019-03-19 Thread Maxim


New submission from Maxim :

Hi!

FancyGetopt.generate_help crashes if help text in option_table is None:

instance = FancyGetopt([('long', 'l', None)])
help_text = instance.generate_help()

TypeError Traceback (most recent call last)
 in 
> 1 a.generate_help()

/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/fancy_getopt.py
 in generate_help(self, header)
352  (max_opt, opt_names, text[0]))
353 else:
--> 354 lines.append("  --%-*s" % opt_names)
355
356 for l in text[1:]:

TypeError: * wants int

This code is in master branch too.

And if help_text is empty string code behavior is like a help_text is actually 
pass and added 2 whitespaces.

--
components: Library (Lib)
messages: 338401
nosy: crztssr
priority: normal
severity: normal
status: open
title: FancyGetopt.generate_help crashes with TypeError
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-03-19 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Pretty sure you can't actually get rid of READONLY; it's part of the public 
API. Adding PY_READONLY to match PY_READWRITE is fine, but unlike 
WRITE_RESTRICTED/PY_WRITE_RESTRICTED (which isn't used at all in Py3,  has been 
non-functional since 2.3, and caused compilation errors on Visual Studio; more 
details on #36355), READONLY is commonly used by third party C extensions, 
doesn't have any known conflicts with compiler headers, and can't be removed.

Go ahead and add PY_READONLY, and change the documentation to prefer it, but:

#define READONLY 1

needs to stick around in the header indefinitely.

--

___
Python tracker 

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



[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-19 Thread Aaron Meurer


New submission from Aaron Meurer :

I am getting a Fatal Python error: Cannot recover from stack overflow. running 
the SymPy tests on a branch of mine where the tests fail. I have reproduced 
this in Python 3.6.7, as well as CPython master 
(fc96e5474a7bda1c5dec66420e4467fc9f7ca968).

Here are the repro steps:

1. Check out my git branch https://github.com/asmeurer/sympy/tree/python-crash
2. Install or point PYTHONPATH to mpmath
3. Run python and type

from sympy import test
test('sets', subprocess=False)

The tests will run (with failures) until they reach a point where Python 
crashes with

Fatal Python error: Cannot recover from stack overflow.

Current thread 0x7fffa8e623c0 (most recent call first):
  File 
"/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/relational.py", 
line 385 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1594 in _contains
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 286 in contains
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1257 in 
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/logic.py", 
line 139 in fuzzy_and
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1257 in _handle_finite_sets
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1900 in simplify_intersection
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1200 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 109 in intersect
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 309 in is_subset
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1348 in reduce
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1338 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 551 in __sub__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1269 in _handle_finite_sets
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1900 in simplify_intersection
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1200 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 109 in intersect
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 309 in is_subset
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1348 in reduce
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1338 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 551 in __sub__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1269 in _handle_finite_sets
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1900 in simplify_intersection
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1200 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 109 in intersect
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 309 in is_subset
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1348 in reduce
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1338 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 551 in __sub__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1269 in _handle_finite_sets
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1900 in simplify_intersection
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1200 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 109 in intersect
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 309 in is_subset
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1348 in reduce
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1338 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 551 in __sub__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1269 in _handle_finite_sets
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1900 in simplify_intersection
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 1200 in __new__
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 109 in intersect
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/sets/sets.py", 
line 

[issue36343] Certificate added to Win Store not available

2019-03-19 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +steve.dower

___
Python tracker 

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



[issue36342] test_venv fails on Android with clang

2019-03-19 Thread Brett Cannon


Brett Cannon  added the comment:

So this is a test_multiprocessing issue? If it is then the title is misleading.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue36326] Build-out help() to read __slots__ with an optional data dictionary

2019-03-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The direct assignments to __doc__ are reasonable for named tuples because there 
usually isn't any code between the factory function call and the __doc__ 
assignments.  For other classes, the technique is awkward because it widely 
separates the initial field name iterable from the corresponding docstrings.

Setting default values is responsibility of the __new__ or __init__ methods. It 
doesn't make sense to use a __slots__ dictionary for this purpose as well.

--

___
Python tracker 

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



[issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d

2019-03-19 Thread Brett Cannon


Brett Cannon  added the comment:

I agree that if it's a good example of using wsgiref then it should exist in 
the wsgiref docs as an example. Then that would mean dropping the script and 
updating the Makefile.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Michael Foord


Michael Foord  added the comment:

It's almost certainly an oversight rather than a design decision. I'd be happy 
with the change you suggest Karthikeyan.

--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Yup:

~
❯ cd /tmp

/tmp
❯ mkdir check

/tmp
❯ cd check

/tmp/check
❯ rm -rf ../check

/tmp/check
❯ python3.7 -m pdb
Fatal Python error: pymain_compute_path0: memory allocation failed
ValueError: character U+e0895f00 is not in range [U+; U+10]

Current thread 0x00011d9405c0 (most recent call first):

--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo: is Python 3.7 affected by the issue?

--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fc96e5474a7bda1c5dec66420e4467fc9f7ca968 by Victor Stinner in 
branch 'master':
bpo-36236: Fix _PyPathConfig_ComputeSysPath0() for empty argv (GH-12441)
https://github.com/python/cpython/commit/fc96e5474a7bda1c5dec66420e4467fc9f7ca968


--

___
Python tracker 

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



[issue36367] tokenizer.c memory leak in case of realloc failure

2019-03-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36367] tokenizer.c memory leak in case of realloc failure

2019-03-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cb90c89de14aab636739b3e810cf949e47b54a0c by Pablo Galindo in 
branch 'master':
bpo-36367: Free buffer if realloc fails in tokenize.c (GH-12442)
https://github.com/python/cpython/commit/cb90c89de14aab636739b3e810cf949e47b54a0c


--
nosy: +pablogsal

___
Python tracker 

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



[issue36369] test_weakref super slow on RPi Zero

2019-03-19 Thread Thomas Knox


New submission from Thomas Knox :

When building Python 3.7.2 on a Raspberry Pi Zero W, it takes over 6 hours to 
run test_weakref, and almost 15 hours total to run through all the tests.

14:28:14 load avg: 1.00 [396/416] test_weakset -- test_weakref passed in 6 hour 
24 min

Does it really need to take this long for one test?

--
components: Tests
messages: 338390
nosy: DNSGeek
priority: normal
severity: normal
status: open
title: test_weakref super slow on RPi Zero
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



[issue36356] Failure to build with address sanitizer

2019-03-19 Thread Ben Harper


Change by Ben Harper :


--
pull_requests: +12399

___
Python tracker 

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



[issue36363] Wrong type when missname dataclass attribute with existing variable name

2019-03-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

A simpler example shows it has nothing to do with annotations -- it is simply 
behavior of the typing module.

>>> import typing
>>> typing.Optional[str]
typing.Union[str, NoneType]
>>> typing.Optional[None]

>>> 

I don't think there's a bug here, and I am closing this as "not a bug". The 
problem in the original code is that the annotation references a global name 
that is shadowed by a local (to the class body) name, and because of the 
initialization, the latter takes precedence.  (To see for yourself, use the dis 
module to disassemble the code for Spam and Spaz.)

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



[issue34160] ElementTree not preserving attribute order

2019-03-19 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> how that's acceptable?

For docutils, we'll most likely propose some variant of Stéphane Wirtel's 
script to test semantic equivalence for docutils.  For other cases, Serhiy is 
working on a C14N canonicalization tool which is specifically designed for the 
task of creating reproducible output, in a cross-language standards compliant 
way.

As Stefan Behnel clearly articulated, there are multiple reasons why Python 
should not guarantee byte-for-byte serialization across point releases.  That 
said, we'll likely make the guarantee across micro-releases.  That will make it 
possible a third mitigation strategy of generating new baseline files for a new 
point releases and adding a version check to decide which baseline to test 
against.

FWIW, we had a similar discussion regarding hash randomization.  While there 
are a number of significant differences, the outcome is relevantL  User tests 
that depended on non-guaranteed implementation details had to be fixed.

--

___
Python tracker 

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



[issue36363] Wrong type when missname dataclass attribute with existing variable name

2019-03-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

class Spam:
bar: typing.Optional[bar] = str

class Spaz:
bar: typing.Optional[bar] = None

print(Spam.__annotations__)
print(Spaz.__annotations__)

{'bar': typing.Union[str, NoneType]}
{'bar': }

In Spam bar has str assigned to it and seems like in Spaz bar is assigned None 
and hence during annotation creation this evaluates to bar: 
typing.Optional[None] where None is the value of bar and in Spam.bar it's 
typing.Union[str, NoneType] instead.

--

___
Python tracker 

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



[issue35388] _PyRuntime_Initialize() called after Py_Finalize() does nothing

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

PR 12443 fix the issue.

--

___
Python tracker 

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



[issue35388] _PyRuntime_Initialize() called after Py_Finalize() does nothing

2019-03-19 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +12398
stage:  -> patch review

___
Python tracker 

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



[issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-36348.

--

___
Python tracker 

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



[issue36348] test_imaplib.RemoteIMAP_STARTTLSTest.test_logout() fails randomly

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-35462.

--

___
Python tracker 

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



[issue35752] test_buffer fails on ppc64le: memoryview pack_single() is miscompiled

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

The root issue was a bug in GCC which has been fixed. Fedora Rawhide got the 
new fixed GCC and so I close the issue.

--
resolution:  -> third party
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



[issue36215] Should AppVeyor run compile Python in debug mode?

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

> Doubling CI time would be painful.  How often are buildbot failure due to the 
> build or test-arg differences, as opposed to system differences?

Yeah, you're right. Such issue is really rare, so I'm ok to leave the 
pre-commit CI as it is ;-)

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



[issue36263] test_hashlib.test_scrypt() fails on Fedora 29

2019-03-19 Thread STINNER Victor


STINNER Victor  added the comment:

Update: my OpenSSL PR https://github.com/openssl/openssl/pull/8483 has been 
merged and new a new OpenSSL package for Fedora is being tested: 
https://bugzilla.redhat.com/show_bug.cgi?id=1688284

--

___
Python tracker 

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



[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-19 Thread Pierre Glaser


New submission from Pierre Glaser :

When starting a SharedMemoryManager in an interactive session, any 
KeyboardInterrupt event will be transmitted to the (sub)process running the 
shared memory server, which causes the Manager to be unusable thereafter:

>>> from multiprocessing.managers import SharedMemoryManager
>>> smm = SharedMemoryManager()
>>> smm.start()
>>> start typing something wrong
KeyboardInterrupt
>>> sl = smm.ShareableList(range(10))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/managers.py", line 
1342, in ShareableList
with self._Client(self._address, authkey=self._authkey) as conn:
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/connection.py", 
line 502, in Client
c = SocketClient(address)
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/connection.py", 
line 629, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory


I suggest ignoring SIGINT in the server process.

--
files: 0001-FIX-protect-shared_memory-server-from-SIGINT.patch
keywords: patch
messages: 338380
nosy: davin, pierreglaser, pitrou
priority: normal
severity: normal
status: open
title: server process of shared_memory shuts down if KeyboardInterrupt
type: crash
versions: Python 3.8
Added file: 
https://bugs.python.org/file48222/0001-FIX-protect-shared_memory-server-from-SIGINT.patch

___
Python tracker 

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



[issue36356] Failure to build with address sanitizer

2019-03-19 Thread Ben Harper


Ben Harper  added the comment:

I'm on Ubuntu 18.10/amd64 compiling with Ubuntu's GCC 8.2.0, I know there's 
some libraries that are missing dependencies (including bz2 and sqlite) so I 
may have missed the ipv6 dependencies as well.

My eventual goal was to be able to build a pgo optimized build of cpython with 
the address sanitizer turned on. Currently on my build of f5f336a819 I see 12 
failing tests and a heap use after free as part of the ctypes test suite. 

The ctypes use after free has already been submitted as bpo-36253 since it was 
the only thing asan caught during tests with the leak sanitizer turned off.

--

___
Python tracker 

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



[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

When mock.patch is creates a patch object and patch.start calls __enter__ that 
sets is_local. On stop __exit__ is called where a check is done is to make sure 
is_local attribute is present and then cleanup is done along with deleting 
calling del self.is_local so calling stop second time causes the attribute 
check to fail. There is no specific reason I could find with git history. 

It seems that calling patch.stop without patch.start makes cleanup to happen on 
unpatched objects and raises errors which I hope is avoided by always setting 
is_local on start and removing it on stop like a flag. That being said I am not 
sure why a early return couldn't be made when is_local is absent instead of 
proceeding with cleanup logic or raising a runtime error. I see no tests 
failing on early return except a test where RuntimeError is intentionally 
tested by calling stop on unstarted patch. I have added mock module devs for 
some context.

A sample script would be as below : 

from unittest import mock

class Foo:
bar = None

patch = mock.patch.object(Foo, 'bar', 'x')
patch.start()
patch.stop()
patch.stop()

--
nosy: +xtreak
type:  -> behavior
versions: +Python 3.8

___
Python tracker 

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



[issue36367] tokenizer.c memory leak in case of realloc failure

2019-03-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +12397
stage:  -> patch review

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-03-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Could you use gdb/lldb to attach to the process hanging and give us a stack 
trace?

--

___
Python tracker 

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



[issue36367] tokenizer.c memory leak in case of realloc failure

2019-03-19 Thread Charalampos Stratakis


New submission from Charalampos Stratakis :

In tokenizer.c we have those lines of code [0]:

if (final_length < needed_length && final_length)
/* should never fail */
buf = PyMem_REALLOC(buf, final_length);
return buf;

If however that realloc fails, the memory allocated initially for buf, will not 
be freed.

[0] https://github.com/python/cpython/blob/master/Parser/tokenizer.c#L652

--
messages: 338375
nosy: cstratak
priority: normal
severity: normal
status: open
title: tokenizer.c memory leak in case of realloc failure

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-03-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seem related to https://bugs.python.org/issue35809

--
nosy: +pablogsal

___
Python tracker 

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



[issue35809] test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest fails intermittently on Travis and passes in verbose mode

2019-03-19 Thread cagney


Change by cagney :


--
nosy: +cagney

___
Python tracker 

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



[issue36308] Fix warning in _PyPathConfig_ComputeArgv0

2019-03-19 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Thanks for the time detecting this, opening this issue and the PR (and all the 
others), Stéphane! :)

--

___
Python tracker 

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



[issue36308] Fix warning in _PyPathConfig_ComputeArgv0

2019-03-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

That was funny to use gdb and valgrind for the debugging session. Now I can 
help you for the refleaks ;-)

--

___
Python tracker 

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



[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +cjw296, mariocj89, michael.foord

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-03-19 Thread cagney


Change by cagney :


--
nosy: +cagney

___
Python tracker 

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



[issue36366] Patcher stop method should be idempotent

2019-03-19 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@Samuel,

1. What's the version of Python?
2. Could you provide a script with an example?

Thank you

--
nosy: +matrixise

___
Python tracker 

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



  1   2   >