[issue38331] Exec not recognizing global variables inside function

2019-09-30 Thread Huyston
New submission from Huyston : This seems like a bug for me, forgive me if its not. Consider the following script: def func(): print(var) my_globals = {'func':func,'var':14} exec("print(var);func()",my_globals,my_globals) This is the output: 14 Traceback (most recent call last): File "

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16092 pull_request: https://github.com/python/cpython/pull/16502 ___ Python tracker ___

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue37725] "make clean" should remove PGO task data

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I created GH-16502. I'm not exactly sure of the process of making a revert on a branch like '3.8' so hopefully it is correct. The code change is exactly what has been reverted in 3.8. The net effect will be as if the revert was never done. --

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +benjamin.peterson, larry, ned.deily versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Andrei Troie
New submission from Andrei Troie : The following will cause a KeyError on email.message.get() import email import email.policy text = "Subject: =?us-ascii?X?somevalue?=" eml = email.message_from_string(text, policy=email.policy.default) eml.get('Subject') This is caused by the fact that the c

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread Ma Lin
Ma Lin added the comment: On my Windows, some non-ASCII characters cause this warning: d:\dev\cpython\modules\expat\xmltok.c : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent dat

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread Ma Lin
Ma Lin added the comment: Other warnings: c:\vstinner\python\master\objects\longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data c:\vstinner\python\master\objects\longobject.c(428): warning C4267: 'function': conversion from 'si

[issue38325] [Windows] test_winconsoleio failures

2019-09-30 Thread Eryk Sun
Eryk Sun added the comment: Does test_partial_reads fail for you when run separately? If so, it's for a different reason. Otherwise, there may have been text left in the input buffer from test_input that led to the failure, which is a separate problem that needs to be addressed via FlushCons

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2019-09-30 Thread miss-islington
miss-islington added the comment: New changeset cf57cabef82c4689ce9796bb1fcdb125fa05efcb by Miss Islington (bot) (Maxwell A McKinnon) in branch 'master': bpo-32689: Updates shutil.move to allow for Path objects to be used as source arg (GH-15326) https://github.com/python/cpython/commit/cf57

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello, I am not a email expert, but according to RFC 1342 the enconding can be either "B" or "Q". So, I think is reasonable that when a not correct enconding is set, should be raise an exception I think that we can improve the message raising a more specif

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2019-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: 3.9 only! -- nosy: +gvanrossum resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I worked some on trying to create a unit test this evening. Attached is my best result so far (gc_weakref_bug_demo.py). It requires that you enable the 'xx' module so we have a container object without tp_traverse. We should probably add one to _testcap

[issue38329] macOS python.org installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x

2019-09-30 Thread Ned Deily
Ned Deily added the comment: Thanks for the reminder. Unfortunately, the macOS installer is working as designed. As discussed at length in Issue18117 (and elsewhere), building using the -framework Python, either directly in compiler calls or indirectly through Xcode is problematic because

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 94e165096fd65e8237e60de570fb609604ab94c9 by Giampaolo Rodola in branch 'master': bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491) https://github.com/python/cpython/commit/94e165096fd65e8237e60de570fb609604

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +16093 pull_request: https://github.com/python/cpython/pull/16506 ___ Python tracker ___ __

[issue38333] add type signatures to library function docs

2019-09-30 Thread paul rubin
New submission from paul rubin : It would be nice if the library reference manual had type signatures for all the stdlib functions at some point. It might be possible to extract a lot of them automatically from typeshed and semi-automatically paste them into the doc files. It might also be

[issue38333] add type signatures to library function docs

2019-09-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe there was an explicit decision not to do this. For the time being, optional typing is still optional. -- nosy: +rhettinger ___ Python tracker

[issue38333] add type signatures to library function docs

2019-09-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> gvanrossum nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list m

[issue38333] add type signatures to library function docs

2019-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: Even if this not desirable for the source code, it still makes sense to add the types to the docs, at least when they are simple and compact. The proposed notation from PEP 604 ('|' for unions) might help with compactness. Many docs are unnecessarily vague

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looks like it worked: https://buildbot.python.org/all/#/builders/176/builds/1383 -- ___ Python tracker ___ ___

[issue38333] add type signatures to library function docs

2019-09-30 Thread Vedran Čačić
Vedran Čačić added the comment: > Many docs are ... vague about types. ... and I consider that a feature. At least if you do that, make an explicit decision not to introduce TypeErrors for "disagreeing with the documented signature". For example, I'd be ok with sum being documented as taking

<    1   2