[issue34443] enum repr should use __qualname__

2019-07-16 Thread Ethan Furman


Ethan Furman  added the comment:

If someone would like to make a PR for using __qualname__ in error messages 
that would be great.  :)

--
stage: test needed -> needs patch

___
Python tracker 

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



[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-16 Thread Brett Cannon


Brett Cannon  added the comment:

Nope, loader.exec_module() doesn't either: 
https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.exec_module,
 
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py#L776.

So unfortunately I'm still not sure what you're talking about.

--

___
Python tracker 

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



[issue24231] os.makedirs('/', exist_ok=True) fails on Darwin

2019-07-16 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

This issue appears to have been fixed:

Python 3.7.3 (default, May  1 2019, 00:00:47) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.makedirs('/', exist_ok=True)
>>>

--

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks for preparing the PR.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset efd23a199b1415a9850a914d525a1e5711fdd6d8 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14803)
https://github.com/python/cpython/commit/efd23a199b1415a9850a914d525a1e5711fdd6d8


--

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 178f09f8b7d25348d46751a774666dd4ec32f3e6 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.8':
bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14802)
https://github.com/python/cpython/commit/178f09f8b7d25348d46751a774666dd4ec32f3e6


--

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

An implementation note mostly to myself: In 3.8 and before, 'python 
relative/path/to/file.py' results in the __file__ attribute of the main module 
being the relative path, and a possibly unnormalized full path is os.curdir + 
__file__.  I believe that this is the only situation in which __file__ is not 
absolute.  After os.chdir(new cwd), relative __file__ becomes useless unless 
the original curdir is saved or  __file__ is made absolute first.  The startup 
part of pyshell has this vulnerable line.
icondir = os.path.join(os.path.dirname(__file__), 'Icons')
But with curdir left alone when starting from a command line, there will be no 
problem.

--

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As near as I can tell, 'python file.py' results in absolute __file__ in 3.9 
versus still relative in 3.8.

--

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14599
pull_request: https://github.com/python/cpython/pull/14803

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14598
pull_request: https://github.com/python/cpython/pull/14802

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2019-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset f8d4cc7dbbf54b9c5435c3080582a4aa421a067d by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-27452: IDLE: Cleanup config.py code (GH-14577)
https://github.com/python/cpython/commit/f8d4cc7dbbf54b9c5435c3080582a4aa421a067d


--

___
Python tracker 

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



[issue37529] Mimetype module duplicates

2019-07-16 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

This appears to have been fixed by issue #4963 and backported to the 3.7 and 
3.8 branches:

Python 3.7.4+ (heads/3.7-dirty:e7bec26937, Jul 16 2019, 12:53:26) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.guess_extension('image/bmp')
'.bmp'
>>> mimetypes.guess_extension('image/x-ms-bmp')
'.bmp'

--

___
Python tracker 

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



[issue36711] duplicate method definition in Lib/email/feedparser.py

2019-07-16 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue36712] duplicate method definition in Lib/email/test/test_email_renamed.py

2019-07-16 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue36711] duplicate method definition in Lib/email/feedparser.py

2019-07-16 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +14597
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14801

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread miss-islington


miss-islington  added the comment:


New changeset e7bec26937ce602ca21cc1f78a391adcf5eafdf1 by Miss Islington (bot) 
in branch '3.7':
Fix infinite loop in email folding logic (GH-12732)
https://github.com/python/cpython/commit/e7bec26937ce602ca21cc1f78a391adcf5eafdf1


--

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread miss-islington


miss-islington  added the comment:


New changeset 6a2aec0ff587032beb8aac8cbebb09e7a52f6694 by Miss Islington (bot) 
in branch '3.8':
Fix infinite loop in email folding logic (GH-12732)
https://github.com/python/cpython/commit/6a2aec0ff587032beb8aac8cbebb09e7a52f6694


--
nosy: +miss-islington

___
Python tracker 

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



[issue36712] duplicate method definition in Lib/email/test/test_email_renamed.py

2019-07-16 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +14596
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14800

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14595
pull_request: https://github.com/python/cpython/pull/14799

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset f69d5c61981ea97d251db515c7ff280fcc17182d by Barry Warsaw (Paul 
Ganssle) in branch 'master':
Fix infinite loop in email folding logic (GH-12732)
https://github.com/python/cpython/commit/f69d5c61981ea97d251db515c7ff280fcc17182d


--

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14594
pull_request: https://github.com/python/cpython/pull/14798

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14593
pull_request: https://github.com/python/cpython/pull/14797

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi


hai shi  added the comment:

Thanks, copy that.

--

___
Python tracker 

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



[issue37597] audit event table breaks PDF sphinx build

2019-07-16 Thread Steve Dower


Steve Dower  added the comment:

Guess we need a real Sphinx expert to help out here. 

Somehow we need to get explicit backlinks, but I couldn't figure out how to 
resolve them normally through an extension. If we can do that, this will 
probably go away.

--

___
Python tracker 

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



[issue37607] segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

See bpo-33725 and multiprocessing documentation:
https://docs.python.org/dev/library/multiprocessing.html#contexts-and-start-methods

"Changed in version 3.8: On macOS, the spawn start method is now the default. 
The fork start method should be considered unsafe as it can lead to crashes of 
the subprocess. See bpo-33725."

Change the start method to spawn.

--
nosy: +vstinner

___
Python tracker 

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



[issue37607] segfault running code in jupyter on macOS 10.14.5 - crashed on child side of fork pre-exec

2019-07-16 Thread wesinator


New submission from wesinator <13hu...@gmail.com>:

python 3.7.4 (homebrew) macOS 10.14.5
16 GB DDR4

segfault encountered when running test code in jupyter. 

Application Specific Information:
crashed on child side of fork pre-exec

I'm not in a position to share the code unfortunately, but I can say it was 
running multiple iterations of subprocess.Popen() within a multiprocessing Pool 
using os.cpu_count() / 2 number of processes (in this case 12/2 = 6). 


macOS .crash dump file attached

--
components: macOS
files: Python_2019-07-16-123850_MacBook-Pro.crash
messages: 348032
nosy: ned.deily, ronaldoussoren, wesinator
priority: normal
severity: normal
status: open
title: segfault running code in jupyter on macOS 10.14.5 - crashed on child 
side of fork pre-exec
type: crash
versions: Python 3.7
Added file: 
https://bugs.python.org/file48487/Python_2019-07-16-123850_MacBook-Pro.crash

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread Xiang Zhang


Change by Xiang Zhang :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread Xiang Zhang


Xiang Zhang  added the comment:

In Py3, you should use `python -m test test_dtrace` to run the test suite.

--
nosy: +xiang.zhang
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi


Change by hai shi :


--
keywords: +patch
pull_requests: +14592
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14796

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi


hai shi  added the comment:

Looks backend should be estimated before running unit tests.

--

___
Python tracker 

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



[issue37606] Improve test_dtrace.py

2019-07-16 Thread hai shi


New submission from hai shi :

$ ./python -m unittest test.test_dtrace
E
==
ERROR: setUpClass (test.test_dtrace.TraceTests)
--
Traceback (most recent call last):
  File "/home/shihai/workspace/cpython/Lib/test/test_dtrace.py", line 110, in 
setUpClass
self.backend.assert_usable()
AttributeError: 'NoneType' object has no attribute 'assert_usable'

--
Ran 0 tests in 0.008s

FAILED (errors=1, skipped=4)

--
components: Tests
messages: 348029
nosy: shihai1991
priority: normal
severity: normal
status: open
title: Improve test_dtrace.py

___
Python tracker 

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



[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-16 Thread Benjamin Mintz


Benjamin Mintz  added the comment:

I dunno, one of those three does. I suppose it's spec.loader.exec_module().

--

___
Python tracker 

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



[issue3753] bytearray incompatible with y#

2019-07-16 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +14590, 14591
pull_request: https://github.com/python/cpython/pull/14679

___
Python tracker 

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



[issue3753] bytearray incompatible with y#

2019-07-16 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +14590
pull_request: https://github.com/python/cpython/pull/14679

___
Python tracker 

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



[issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

PR 14433 seems to fix this issue and it contains a test.

My PR 14789 fixed get-pip.py, but it introduces another bug: I closed it.

--

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2019-07-16 Thread Ethan Furman


Ethan Furman  added the comment:

Both are good suggestions.  The first should definitely happen.  I'll 
investigate the second.

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

___
Python tracker 

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



[issue37605] CI should not depend on gmane response

2019-07-16 Thread Zachary Ware


Zachary Ware  added the comment:

Victor, note that this issue is about the nntplib doctests in 
Doc/library/nntplib.rst.  I agree that any examples in that file that actually 
hit an external server should be marked as not doctests.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, zach.ware
versions: +Python 2.7, Python 3.7, Python 3.8

___
Python tracker 

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



[issue37605] CI should not depend on gmane response

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

> On Travis, 'Documentation tests' passing is apparently required.  Line 23 of 
> nntplib.rst is ">>> s = NNTP('news.gmane.org')"  I use gmane and occasional 
> failures to respond are routine.  Being able to merge should not depend on 
> this external site.

Python test suite uses many external services:
https://pythondev.readthedocs.io/infra.html#services-used-by-unit-tests

You should all be skipped if the "network" resource is not used, which is the 
default.

Many tests were modified to catch network failures and ignore the test in this 
case. test_nntplib is known to be very fragile: it doesn't handle network 
issues.

I would suggest to remove functional tests which depend on external servers, 
since these tests fail often and nobody seems to care of test_nntplib.

--

___
Python tracker 

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



[issue37605] CI should not depend on gmane response

2019-07-16 Thread Terry J. Reedy


New submission from Terry J. Reedy :

On Travis, 'Documentation tests' passing is apparently required.  Line 23 of 
nntplib.rst is ">>> s = NNTP('news.gmane.org')"  I use gmane and occasional 
failures to respond are routine.  Being able to merge should not depend on this 
external site.

In addition to a real failure, the following happen on PR 14675 earlier today.

https://travis-ci.org/python/cpython/jobs/559289634

Warning, treated as error:
**
File "library/nntplib.rst", line ?, in default
Failed example:
s = NNTP('news.gmane.org')
Exception raised:
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/doctest.py", line 1328, in 
__run
exec(compile(example.source, filename, "single",
  File "", line 1, in 
s = NNTP('news.gmane.org')
  File "/home/travis/build/python/cpython/Lib/nntplib.py", line 1050, in 
__init__
_NNTPBase.__init__(self, file, host,
  File "/home/travis/build/python/cpython/Lib/nntplib.py", line 331, in 
__init__
self.welcome = self._getresp()
  File "/home/travis/build/python/cpython/Lib/nntplib.py", line 456, in 
_getresp
raise NNTPTemporaryError(resp)
nntplib.NNTPTemporaryError: 400 load at 16.59, try later

Try later is what I do.  This exception should somehow be skipped.  I don't 
know anything about Travis and doctest tests and how flakey doctests are 
supposed to be handled. If nothing else, put the whole example is a try-except 
block?

>>> try:  # News sites can fail to respond.
... s = NNTP('news.gmane.org')
... ...
... except: # If site failure, try later.
... pass

Since output varies, I presume output checking is suppressed.

--
components: Tests
messages: 348023
nosy: pablogsal, terry.reedy, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: CI should not depend on gmane response
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue37499] test_gdb.test_pycfunction should use dedicated test functions

2019-07-16 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +14589
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14795

___
Python tracker 

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



[issue37565] test_faulthandler: test_register_chain() crash with SIGSEGV (signal 11) on Skylake chipset

2019-07-16 Thread Michelle Johnson


Michelle Johnson  added the comment:

Is the problem I'm seeing possibly related to this issue:

https://bugs.python.org/issue21131

It seems to share a lot of similarities.

--

___
Python tracker 

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



[issue37599] Remove a vague statement in documentation of Integer Objects

2019-07-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.7, Python 3.8

___
Python tracker 

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



[issue37599] Remove a vague statement in documentation of Integer Objects

2019-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 1d8b04edfdc3030e645730492bfcc27b75718b96 by Raymond Hettinger 
(sgal) in branch 'master':
bpo-37599: Remove a vague statement in documentation of Integer Objects (#14786)
https://github.com/python/cpython/commit/1d8b04edfdc3030e645730492bfcc27b75718b96


--

___
Python tracker 

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



[issue37352] Typo in documentation: "to making it easy"

2019-07-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9

___
Python tracker 

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



[issue37352] Typo in documentation: "to making it easy"

2019-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset a0f7119f1584db5b32deffb60a68d830673ebbdf by Raymond Hettinger 
(Ilya Kamenshchikov) in branch 'master':
bpo-37352: Minor word-smithing for design.rst (GH #14730)
https://github.com/python/cpython/commit/a0f7119f1584db5b32deffb60a68d830673ebbdf


--

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-07-16 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +14588
pull_request: https://github.com/python/cpython/pull/14794

___
Python tracker 

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



[issue37599] Remove a vague statement in documentation of Integer Objects

2019-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

There's nothing wrong with a little wry humor in the docs, especially when the 
provide a little insight into the implementation.  It isn't irresponsible at 
all -- please avoid those pejoratives.

That said, I'll accept the patch because the sentence isn't necessary and has 
other issues (the statement makes more sense in the ctypes module where such 
changes are possible and it applies broadly to all immutable objects, not just 
pre-computed singleton integers).

--
nosy: +rhettinger

___
Python tracker 

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



[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-16 Thread Luis Alejandro Martínez Faneyth

Luis Alejandro Martínez Faneyth  added the comment:

Thanks Christian for the suggestion and Matthias.

--

___
Python tracker 

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



[issue37256] urllib.request.Request documentation erroneously refers to the "final two"

2019-07-16 Thread Ngalim Siregar


Change by Ngalim Siregar :


--
keywords: +patch
pull_requests: +14587
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14792

___
Python tracker 

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



[issue37577] ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

2019-07-16 Thread Matthias Klose


Matthias Klose  added the comment:

this is issue #37561, making the sysconfigdata file name not changing with the 
kernel version of the OS.  I need to commit that patch to the trunk and 3.8.  
But apparently pip needs to be aware of that as well ...

--

___
Python tracker 

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



[issue37604] warnings should use a ContextVar to manage filters/registry

2019-07-16 Thread Thomas Grainger


Thomas Grainger  added the comment:

note that PEP 550 previously mentions catch_warnings as something that would 
benefit from some sort of Execution Context management


> Context managers like decimal contexts, numpy.errstate, and 
> warnings.catch_warnings.

--

___
Python tracker 

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



[issue37604] warnings should use a ContextVar to manage filters/registry

2019-07-16 Thread Thomas Grainger


New submission from Thomas Grainger :

this would allow ``warnings.catch_warnings`` to be threadsafe

--
messages: 348015
nosy: graingert
priority: normal
severity: normal
status: open
title: warnings should use a ContextVar to manage filters/registry

___
Python tracker 

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



[issue34443] enum repr should use __qualname__

2019-07-16 Thread Walter Dörwald

Walter Dörwald  added the comment:

Can we at least get the __qualname__ in exception messages?

Currently enum.Enum.__new__() and enum.Enum._missing_() use:

   raise ValueError("%r is not a valid %s" % (value, cls.__name__))

IMHO this should be:

   raise ValueError("%r is not a valid %s" % (value, cls.__qualname__))

in both spots.

Example code:

class Person:
class Type(enum.Enum):
EMPLOYEE = "employee"
CUSTOMER = "customer"
SUPPLIER = "supplier"

class Contact:
class Type(enum.Enum):
EMAIL = "email"
PHONE = "phone"
MOBILE = "mobile"

with this the following code:

Person.Type('foo')

raises the exception:

ValueError: 'foo' is not a valid Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py",
 line 310, in __call__
return cls.__new__(cls, value)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py",
 line 564, in __new__
raise exc
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py",
 line 548, in __new__
result = cls._missing_(value)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/enum.py",
 line 577, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 'foo' is not a valid Type

IMHO the exception message:

ValueError: 'foo' is not a valid Person.Type

would be much more helpful and unambiguous.

And BTW, maybe we should suppress exception chaining here, i.e. use:

   raise ValueError("%r is not a valid %s" % (value, cls.__qualname__)) from 
None

--

___
Python tracker 

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



[issue37601] shutil.make_archive does not follow symlinks for zip archives

2019-07-16 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This looks like a reasonable addition to me. Other APIs in shutil have 
follow_symlinks parameter.

➜  /tmp ls -al sym
total 0
drwxr-xr-x   3 karthikeyansingaravelan  staff   102 Jul 16 15:52 .
drwxr-xr-x  58 karthikeyansingaravelan  staff  1972 Jul 16 15:52 ..
-rw-r--r--   1 karthikeyansingaravelan  staff 0 Jul 16 15:05 a

➜  /tmp ls -al foo
total 8
drwxr-xr-x   5 karthikeyansingaravelan  staff   170 Jul 16 15:43 .
drwxr-xr-x  58 karthikeyansingaravelan  staff  1972 Jul 16 15:52 ..
-rw-r--r--   1 karthikeyansingaravelan  staff 0 Jul 16 15:00 a
-rw-r--r--   1 karthikeyansingaravelan  staff 0 Jul 16 15:00 b
lrwxr-xr-x   1 karthikeyansingaravelan  staff 8 Jul 16 15:04 c -> /tmp/sym

# Using zip in Mac and zipfile module

➜  /tmp python3 -m zipfile -c cmd.zip foo/*
➜  /tmp python3 -m zipfile -l cmd.zip
File Name Modified Size
a  2019-07-16 15:00:040
b  2019-07-16 15:00:100
c/ 2019-07-16 15:52:060
c/a2019-07-16 15:05:460

# Using make_archive

➜  /tmp python3 -c "import shutil; shutil.make_archive('make_archive', 'zip', 
'foo')"
➜  /tmp python3 -m zipfile -l make_archive.zip
File Name Modified Size
c/ 2019-07-16 15:52:060
a  2019-07-16 15:00:040
b  2019-07-16 15:00:100

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue37406] Disable runtime checks in release mode

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't find time to write a proper a rationale for this change, and I will 
not be available next weeks. So I prefer to close this issue. I may reopen it 
later once I have a strong rationale :-) In the meanwhile, have a look at the 
new PyHandle API idea which will start without sanity check in release mode 
since day 1 :-)
https://github.com/pyhandle/pyhandle/

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



[issue37324] collections: remove deprecated aliases to ABC classes

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

Right now (pip 19.1.1?), "./python -m venv env" still fails because of 
html5lib/_trie/py.py. There is still no activitiy on the request to get a new 
release:
https://github.com/html5lib/html5lib-python/issues/419

--

___
Python tracker 

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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

commit 995d9b92979768125ced4da3a56f755bcdf80f6e introduced a regression: 
bpo-37603: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - 
line_start)' failed, when running get-pip.py.

--
nosy: +vstinner

___
Python tracker 

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



[issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py

2019-07-16 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +14586
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14789

___
Python tracker 

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



[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-16 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-16 Thread Vinay Sajip


Vinay Sajip  added the comment:

> Since order of kwargs is guaranteed from Python 3.6 can this be removed?

Well, the statement about order isn't inaccurate when talking about Python in 
general and the cookbook is a resource meant to be useful across multiple 
Python implementations and versions, so I'd be inclined to leave it as is.

--

___
Python tracker 

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



[issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py

2019-07-16 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file48486/get-pip2.py

___
Python tracker 

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



[issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py

2019-07-16 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +inada.naoki, pablogsal, serhiy.storchaka

___
Python tracker 

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



[issue37603] parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - line_start)' failed, when running get-pip.py

2019-07-16 Thread STINNER Victor


New submission from STINNER Victor :

bpo-16806 introduced a regression with the following change:

commit 995d9b92979768125ced4da3a56f755bcdf80f6e (refs/bisect/bad)
Author: Anthony Sottile 
Date:   Sat Jan 12 20:05:13 2019 -0800

bpo-16806: Fix `lineno` and `col_offset` for multi-line string tokens 
(GH-10021)

get-pip.py does now crash:

$ ./python get-pip.py --help
python: Parser/parsetok.c:266: parsetok: Assertion `(intptr_t)(int)(a - 
line_start) == (a - line_start)' failed.
Aborted (core dumped)

Python 3.8 is also affected.

get-pip.py comes from: https://bootstrap.pypa.io/get-pip.py

Reproducing depends if REALLOC() returns a new pointer, see below.

I attached get-pip2.py: simplified version which crash when using "./python 
get-pip2.py --help". If it doesn't crash, duplicate lines to make the file 
larger.

--

The root issue seems to be that tok->multi_line_start isn't updated on 
REALLOC() in tok_nextc():

newbuf = (char *)PyMem_REALLOC(newbuf,
   newsize);
if (newbuf == NULL) {
tok->done = E_NOMEM;
tok->cur = tok->inp;
return EOF;
}
tok->buf = newbuf;
tok->cur = tok->buf + cur;
tok->line_start = tok->cur;

I guess that multi_line_start should also be updated there?

tok->multi_line_start = tok->cur;

--
components: Interpreter Core
keywords: 3.8regression
messages: 348008
nosy: lukasz.langa, vstinner
priority: release blocker
severity: normal
status: open
title: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - 
line_start)' failed, when running get-pip.py
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

docutils is already fixed in the development version. I requested a release:
https://sourceforge.net/p/docutils/bugs/364/

--

___
Python tracker 

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



[issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on

2019-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

"""
On ext4 this creates 4 different files: ['\u03d4', '\u03d2\u0308', '\u03ab', 
'\u03a5\u0308']
On ZFS with utf8only=true (and I believe normalization=formD), only 2 files are 
created but each of the 4 filenames can be used to access either of the 2 files.
This is also the default behavior on Mac.

The test is already skipped on darwin 
(Lib/test/test_unicode_file_functions.py:120), and should be skipped for ZFS 
too (might depend on the exact flags used), however we weren't able to find a 
portable way to determine the filesystem and flags.
"""

I suggest to create a temporary directory, create the 4 files and see how many 
files you can using os.listdir(). If you get 4, the FS doesn't normalize 
anything. If you get less, it's likely that the FS normalizes names.

--

___
Python tracker 

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



[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-16 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Slightly unrelated to the issue but I noticed the below statement in the docs 
page couple of times. I think it's related to the order of kwargs when the 
statement was added in 3d9e972270270e1498712065a17ec3a589ae8986. Since order of 
kwargs is guaranteed from Python 3.6 can this be removed?

> Note that the order of items might be different according to the version of 
> Python used.

--
nosy: +xtreak

___
Python tracker 

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



[issue37602] nonzero fixer problem

2019-07-16 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +benjamin.peterson

___
Python tracker 

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