[issue36407] xml.dom.minidom wrong indentation writing for CDATA section

2019-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 384b81d923addd52125e94470b11d2574ca266a9 by Serhiy Storchaka 
(Vladimir Surjaninov) in branch 'master':
bpo-36407: Fix writing indentations of CDATA section (xml.dom.minidom). 
(GH-12514)
https://github.com/python/cpython/commit/384b81d923addd52125e94470b11d2574ca266a9


--

___
Python tracker 

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



[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-26 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12520

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the patch!

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



[issue14817] pkgutil.extend_path has no tests

2019-03-26 Thread Windson Yang


Windson Yang  added the comment:

My base idea would be some unittests for the function like:

class ExtendPathBaseTests(unittest.TestCase):
def test_input_string(self):
path = 'path'
name = 'foo'
self.assertEqual('path', pkgutil.extend_path(path, name))

def test_parent_package_raise_key_error(self):
path = ['path']
# sys.modules['foo'] raise KeyError
name = 'foo.bar'
self.assertEqual(['path'], pkgutil.extend_path(path, name))

def test_parent_package_raise_attr_error(self):
path = ['path']
# datetime module don't have __path__ attr
name = 'datetime.date'
self.assertEqual(['path'], pkgutil.extend_path(path, name))

I would move forward if we agreed.

--

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset ead15795986972690217e52087eb946b8a5bbcda by Miss Islington (bot) 
in branch '3.7':
bpo-33832: Add "magic method" glossary entry (GH-7630)
https://github.com/python/cpython/commit/ead15795986972690217e52087eb946b8a5bbcda


--

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 6cbb4c0795099b79f0a7c7d20df4ba1c1ec0ac24 by Miss Islington (bot) 
in branch '2.7':
bpo-33832: Add "magic method" glossary entry (GH-7630)
https://github.com/python/cpython/commit/6cbb4c0795099b79f0a7c7d20df4ba1c1ec0ac24


--
nosy: +miss-islington

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12519

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12518

___
Python tracker 

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



[issue33832] doc Add "magic method" entry to Glossary

2019-03-26 Thread Éric Araujo

Éric Araujo  added the comment:


New changeset f760610bddd7e8f8ac0914d5d59ef806bc16a73b by Éric Araujo (Andre 
Delfino) in branch 'master':
bpo-33832: Add "magic method" glossary entry (GH-7630)
https://github.com/python/cpython/commit/f760610bddd7e8f8ac0914d5d59ef806bc16a73b


--
nosy: +eric.araujo

___
Python tracker 

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



[issue18697] Unify arguments names in Unicode object C API documentation

2019-03-26 Thread Rune Tynan


Change by Rune Tynan :


--
nosy: +Rune Tynan

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 484f20d2ff95cc2e1bea759852da307bc1d1d944 by Victor Stinner in 
branch 'master':
bpo-36444: Add _PyCoreConfig._init_main (GH-12572)
https://github.com/python/cpython/commit/484f20d2ff95cc2e1bea759852da307bc1d1d944


--

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12517

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b9dbc017a190d13f717e714630d620adb7c7ac2 by Victor Stinner in 
branch 'master':
bpo-36444: Remove _PyMainInterpreterConfig (GH-12571)
https://github.com/python/cpython/commit/8b9dbc017a190d13f717e714630d620adb7c7ac2


--

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 23eb816399ac7482d2bd7d50814b19a3db52e7d4 by Miss Islington (bot) 
in branch '3.7':
bpo-36429: Fix starting IDLE with pyshell (GH-12548)
https://github.com/python/cpython/commit/23eb816399ac7482d2bd7d50814b19a3db52e7d4


--
nosy: +miss-islington

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36431] Use dict unpacking for merging two dicts

2019-03-26 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

3 years ago, Trey Hunter found 11 ways to merge to a new dict.
https://treyhunner.com/2016/02/how-to-merge-dictionaries-in-python/
He followed up with a performance comparison.
https://gist.github.com/treyhunner/f35292e676efa0be1728
** unpacking was nearly twice as fast as the 2nd place methods.
(Bigger dict might change the ratio, but I expect ** unpacking to remain first.)

Trey's summary: "This is simple and Pythonic. There are quite a few symbols, 
but it’s fairly clear that the output is a dictionary at least."  I consider 
the last point a major plus.

User comment: "Beautiful. Pythonic. Thank you."  No negatives.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-03-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 6a258c88906a7e8acde455ee2acb78b6f315ea0b by Terry Jan Reedy in 
branch 'master':
bpo-36429: Fix starting IDLE with pyshell (#12548)
https://github.com/python/cpython/commit/6a258c88906a7e8acde455ee2acb78b6f315ea0b


--

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12515

___
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-26 Thread STINNER Victor


STINNER Victor  added the comment:

The feature has been implemented, I close the issue. The work is continued in 
other issues.

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-26 Thread STINNER Victor


New submission from STINNER Victor :

The _PyMainInterpreterConfig structure is redundant with _PyCoreConfig: it is a 
subset but using PyObject*. PyInterpreterState has 2 fields:

_PyCoreConfig core_config;
_PyMainInterpreterConfig config;

config parameters can be found in core_config, but using a different type: it 
introduces redundancy and a risk of inconsitency (if one is modified, but not 
the other).

_PyMainInterpreterConfig doesn't provide any feature which is not accessible 
using _PyCoreConfig.

--
components: Interpreter Core
messages: 338924
nosy: vstinner
priority: normal
severity: normal
status: open
title: Python initialization: remove _PyMainInterpreterConfig
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



[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2019-03-26 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2019-03-26 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
versions: +Python 3.7, Python 3.8 -Python 3.6

___
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-26 Thread STINNER Victor


STINNER Victor  added the comment:

I created a follow-up issue: bpo-36443.

--

> Note for myself: PYTHONDEVMODE=1, PreConfig isolated=1, CoreConfig 
> isolated=0: is the dev mode enabled or not? IMHO it should not. Maybe add a 
> specific unit test?

PR 12569 adds these tests.

--

___
Python tracker 

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



[issue36443] Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?

2019-03-26 Thread STINNER Victor


New submission from STINNER Victor :

bpo-36301 created a very strict separated between Python initialization and a 
new "pre-initialization" which is responsible to configure encodings and memory 
allocators.

Nick Coghlan proposed to disable UTF-8 Mode and C locale coercion by default in 
the pre-initialization, so the LC_CTYPE locale is not coerced by Python when 
it's embedded in an application.

Maybe the UTF-8 Mode can be automatically enabled (depending on the LC_CTYPE 
locale), but not the C locale coercion?

This issue is related to bpo-36202: Calling Py_DecodeLocale() before 
_PyPreConfig_Write() can produce mojibake.

--
components: Interpreter Core
messages: 338922
nosy: ncoghlan, vstinner
priority: normal
severity: normal
status: open
title: Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?
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



[issue35165] Possible wrong method name in attribute references doc

2019-03-26 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

> Or maybe just link to 
> https://docs.python.org/3/reference/datamodel.html#object.__getattr__ (which 
> mention about it) will be enough.

In section 6.3.1, __getattr__() is already linked to the datamodel page 
referenced.  

As your suggested change is already in the docs, I'm going to close this.

--
nosy: +cheryl.sabella
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



[issue33601] [EASY DOC] Py_UTF8Mode is not documented

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

PR 7143 has been closed. So is there another candidate to write the doc?

--

___
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-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12514

___
Python tracker 

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



[issue36425] Add Simplified Chinese to the language switcher

2019-03-26 Thread Julien Palard


Julien Palard  added the comment:

That's nice to read!

Once you've added a NEWS (see PR) entry I'll be happy to merge this.

--
assignee: docs@python -> mdk

___
Python tracker 

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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-26 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
nosy: +cstratak

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 5ac626350e2bfe5f283e7322bc31045062680d2b by Miss Islington (bot) 
in branch '3.7':
bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821)
https://github.com/python/cpython/commit/5ac626350e2bfe5f283e7322bc31045062680d2b


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 5a3316931c6042df44b3b342df956cd6a77e8dcd by Miss Islington (bot) 
in branch '2.7':
[2.7] bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821) 
(GH-12568)
https://github.com/python/cpython/commit/5a3316931c6042df44b3b342df956cd6a77e8dcd


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12513

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2019-03-26 Thread Tal Einat


Tal Einat  added the comment:


New changeset 6cd658b1a5cb2413230dbc2d9395d20498be8518 by Tal Einat in branch 
'master':
bpo-34203: FAQ: improve wording of paragraph about 2.x vs. 3.x (GH-9821)
https://github.com/python/cpython/commit/6cd658b1a5cb2413230dbc2d9395d20498be8518


--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12512

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-26 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue36364] errors in multiprocessing.shared_memory examples

2019-03-26 Thread Brett Cannon


Brett Cannon  added the comment:

I've gone ahead and merged Pierre's fix (thanks!), but I'm not sure if 
SharedMemoryManager should stay in the shared_memory docs or if it should move 
over to multiprocessing.manager.

Davin, any input on that?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue36364] errors in multiprocessing.shared_memory examples

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 3b7e47aea9b29f2669e7178a461426d18bce349e by Miss Islington (bot) 
(Pierre Glaser) in branch 'master':
bpo-36364: fix SharedMemoryManager examples (GH-12439)
https://github.com/python/cpython/commit/3b7e47aea9b29f2669e7178a461426d18bce349e


--
nosy: +miss-islington

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-26 Thread Eryk Sun


Eryk Sun  added the comment:

> Any comments, questions or more feedback on the PR?

I commented on the PR that I'm concerned that ctypes.CDLL will no longer open a 
path with slashes in it (e.g. CDLL("./spam.dll") or CDLL("eggs/spam.dll")) 
relative to the working directory, and may accidentally match another directory 
in the search path. In POSIX, a path with a slash in it is always relative to 
the working directory and never searched for. In Windows, particularly for the 
loader, all relative paths are always searched for. This works with the current 
LoadLibraryW call, with minimal risk of name collisions, because only the 
application directory and system directories are checked before the working 
directory, which is checked before searching PATH. I suggest that with the 
change to use LOAD_LIBRARY_SEARCH_DEFAULT_DIRS, ctypes should first resolve 
such a path by calling GetFullPathNameW, as is suggested in the Windows docs.

I also had suggested documenting and exposing a subset of the loader flags for 
use with the CDLL `mode` parameter, which is currently unused in Windows. This 
would make it convenient for a user to include the flag 
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR when the DLL path is fully qualified. However, 
that was deemed too peripheral to be worth the extra effort of supporting and 
documenting the parameter and adding the required tests, which is 
understandable. This can maybe be addressed in another issue, if the need 
arises. That said, it would be nice to provide parity with C extension modules 
here, which are always loaded with the latter flag. If given a fully-qualified 
path, or a relative path with slashes in it that's resolved via 
GetFullPathNameW, _ctypes.LoadLibrary could automatically include the 
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag.

--

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for your bug report. It is now fixed.

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-26 Thread Steve Dower


Steve Dower  added the comment:

Thanks! Two issues here:
* symlink_or_copy doesn't verify that the source file exists after rewriting 
the path
* Tools/msi/lib/lib_files.wxs doesn't include the debug launchers

--

___
Python tracker 

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



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread SilentGhost


SilentGhost  added the comment:

This seems to be related to argument clinic work (issue 20186 and issue 20185).

--
components: +Argument Clinic
nosy: +SilentGhost, larry

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


Brett Cannon  added the comment:

I actually still think we should remove serve.py as the person who had needed 
to clean up that directory when we realized we had massive bitrot in /Tools. :) 
I don't' think that just because Debian packages means we need to continue 
supporting and maintaining it (e.g. if wsgiref was changed who is going to 
remember to update this script?).

--

___
Python tracker 

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



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread SilentGhost


Change by SilentGhost :


--
components: +Interpreter Core -Tests
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-26 Thread Steve Dower


Steve Dower  added the comment:

Since there's no chance of getting old SQL Server fixed, I think we should just 
merge it without the SetDefaultDllDirectories change.

Any comments, questions or more feedback on the PR?

--

___
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-26 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@Ned, I have found a solution on Linux, will try on this evening with my
macOS laptop. 
I hope to come with a solution on this evening or tomorrow, but need to
check my proto.

--

___
Python tracker 

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



[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-26 Thread Hardik


New submission from Hardik :

I am curious why ValueErrors are different in List and Tuple when I try to get 
an index.  ValueError of a list returns in well format with actual argument 
"ValueError: 'ITEM' is not in list", whereas tuple returns something like this 
"ValueError: tuple.index(x): x not in tuple". 
I think List and Tuple both are calling same index() method then why it is 
raising different ValueErrors? 
>>> jframe_li
['Angular', 'React', 'Vue.js', 'Ember.js', 'Mereor', 'Node.js', 'Backbone.js']
>>> jframe_tu
('Angular', 'React', 'Vue.js', 'Ember.js', 'Mereor', 'Node.js', 'Backbone.js')
>>> jframe_li.index('React')
1
>>> jframe_tu.index('React')
1
>>> jframe_li.index('react')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: 'react' is not in list

>>> jframe_tu.index('react')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: tuple.index(x): x not in tuple

--
components: Tests
messages: 338906
nosy: HardikPatel
priority: normal
severity: normal
status: open
title: Different ValueError for the same operation in List and Tuple
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-26 Thread Christian Ullrich


New submission from Christian Ullrich :

Creating a venv using "py -m venv" fails when the debug binaries are installed 
in the system-wide installation.

Note the below uses the 32-bit installation, but that is probably not 
significant.

C:\Daten\pyv>py -3.7-32 -m venv v37-32
Error: [Errno 2] No such file or directory: 'C:\\Program Files 
(x86)\\Python37-32\\lib\\venv\\scripts\\nt\\python_d.exe'

The same command line works fine when using a Python installation that does not 
have the debug binaries installed.

--
components: Windows
messages: 338904
nosy: chrullrich, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Cannot create venv with debug binaries installed
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-26 Thread Christian Ullrich


Christian Ullrich  added the comment:

Python version is 3.7.3.

--

___
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-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f8ba6f5afc317d1be3025db1be410ac66a7e5a27 by Victor Stinner in 
branch 'master':
bpo-36301: Cleanup preconfig.c and coreconfig.c (GH-12563)
https://github.com/python/cpython/commit/f8ba6f5afc317d1be3025db1be410ac66a7e5a27


--

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Meaning that no one will ever look at it again.

I am very interested in a better alternative to the parser module, so I will 
open soon another issue for that matter. But as the original issue was about a 
specific bug, I prefer to mark it as resolved :)

--

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


A. Skrobov  added the comment:

> Nothing was really "decided", just that meanwhile is better not to ship a 
> broken parser module.

Totally true, but the issue is closed and resolved, meaning that no one will 
ever look at it again.

--

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Haha, you were faster creating the PR than me posting the message!

--

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thank you very much for creating the issue :)

> Seeing that the implicit resolution at #36256 was to keep the parser module 
> in place

Nothing was really "decided", just that meanwhile is better not to ship a 
broken parser module.

>  may I suggest that the diagnostics it produces be improved, so that instead 
> of "Expected node type 305, got 11", it would raise "Expected namedexpr_test, 
> got COLON"

Would you like to produce a PR for this?

--
stage: patch review -> 

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 20fde53a25aefd076d8478f67d6db3908459c6f3 by Miss Islington (bot) 
in branch '3.7':
bpo-36436: Fix _testcapi.pymem_buffer_overflow() (GH-12560)
https://github.com/python/cpython/commit/20fde53a25aefd076d8478f67d6db3908459c6f3


--
nosy: +miss-islington

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


New submission from A. Skrobov :

Seeing that the implicit resolution at #36256 was to keep the parser module in 
place, may I suggest that the diagnostics it produces be improved, so that 
instead of "Expected node type 305, got 11", it would raise "Expected 
namedexpr_test, got COLON"

--
components: Extension Modules
messages: 338897
nosy: A. Skrobov, benjamin.peterson, berker.peksag, brett.cannon, fdrake, 
gregory.p.smith, pablogsal, python-dev, serhiy.storchaka, xcombelle
priority: normal
severity: normal
status: open
title: more helpful diagnostics for parser module
type: enhancement
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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


Change by A. Skrobov :


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

___
Python tracker 

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



[issue36439] Inconsistencies with datetime.fromtimestamp(t) when t < 0

2019-03-26 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


--
title: OSes inconsistency whith datetime.fromtimestamp(t) when t < 0 -> 
Inconsistencies with datetime.fromtimestamp(t) when t < 0

___
Python tracker 

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



[issue36439] OSes inconsistency whith datetime.fromtimestamp(t) when t < 0

2019-03-26 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


--
title: [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6 -> 
OSes inconsistency whith datetime.fromtimestamp(t) when t < 0

___
Python tracker 

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



[issue36439] [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6

2019-03-26 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

And also reproduced on 3.8.0a3.

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



[issue36301] Add _Py_PreInitialize() function

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Note for myself: PYTHONDEVMODE=1, PreConfig isolated=1, CoreConfig isolated=0: 
is the dev mode enabled or not? IMHO it should not. Maybe add a specific unit 
test?

--

___
Python tracker 

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



[issue36439] [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue36439] [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue36439] [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6

2019-03-26 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

Reproduced on 3.6.8 and 3.7.3.

--
type:  -> behavior
versions: +Python 3.7

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12509

___
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-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +12508

___
Python tracker 

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



[issue36439] [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6

2019-03-26 Thread Mickaël Schoentgen

New submission from Mickaël Schoentgen :

A similar issue was resolved with issue29097 (with 0 <= t <= 86399).

Here, we have an inconsistency between OSes when using 
datetime.fromtimestamp(t) when t < 0.
Tested on Python 3.6.7.

GNU/Linux:

>>> datetime.fromtimestamp(-1)
datetime.datetime(1970, 1, 1, 0, 59, 59)

macOS:

>>> datetime.fromtimestamp(-1)
datetime.datetime(1970, 1, 1, 0, 59, 59)

Windows (7 and 10):

>>> datetime.fromtimestamp(-1)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 22] Invalid argument


I think having a similar behavior between all Oses would be great, right?

--
messages: 338893
nosy: Tiger-222
priority: normal
severity: normal
status: open
title: [Windows] datetime.fromtimestamp(t) when t < 0 fails on Python 3.6
versions: Python 3.6

___
Python tracker 

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



[issue35872] Creating venv from venv no longer works in 3.7.2

2019-03-26 Thread Paul Moore


Paul Moore  added the comment:

See https://github.com/pypa/virtualenv/issues/1339 - it's possible that 
something in this area is still affecting virtualenv.

--

___
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-26 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +12507

___
Python tracker 

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



[issue36438] Python 3.5.7 import error on Cross compile

2019-03-26 Thread Brian Spratke


Change by Brian Spratke :


--
type:  -> compile error

___
Python tracker 

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



[issue36438] Python 3.5.7 import error on Cross compile

2019-03-26 Thread Brian Spratke


New submission from Brian Spratke :

I apologize if this is a stupid question, but I am not very experienced 
building Python, or cross compiling.

While trying to cross compile Python 3.5.7 I can run configure, and make, but 
when I try to run 'make install' it throws the error posted below.  I was able 
to build with 3.5.1, but it appears that weakref.py has been added since then.  
I think a lot of my problem is not understanding what the 'make install' step 
is doing.  Is it using python that is install on my Ubuntu machine? Is it 
trying to do another build step? Any help would be greatly appreciated.


Could not import runpy module
Traceback (most recent call last):
  File "./Lib/runpy.py", line 14, in 
import importlib.machinery # importlib first so we can test #15386 via -m
  File "./Lib/importlib/__init__.py", line 57, in 
import types
  File "./Lib/types.py", line 166, in 
import functools as _functools
  File "./Lib/functools.py", line 23, in 
from weakref import WeakKeyDictionary
  File "./Lib/weakref.py", line 12, in 
from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'
make[1]: *** [pybuilddir.txt] Error 1
make: *** [python-3.5.7] Error 1

--
components: Cross-Build
messages: 338891
nosy: Alex.Willmer, Brian Spratke
priority: normal
severity: normal
status: open
title: Python 3.5.7 import error on Cross compile
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



[issue36409] plistlib old API should be removed

2019-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, this is mainly about modules, but in general we try to be more careful 
with removing features that do not have alternatives in 2.7. In this particular 
case, the benefit from removing the deprecated functions in 3.8 instead of 3.9 
is small, but this will make harder writing 2+3 compatible code.

In any case this is on to the module maintainer, Ronald.

--

___
Python tracker 

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2019-03-26 Thread Matthias Klose


Matthias Klose  added the comment:

no, please don't assume that if it builds for one cross build variant, that it 
builds for all. re-opening.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 414b1cde93764cdabb0798b02af4dd7df954424d by Victor Stinner in 
branch 'master':
bpo-36436: Fix _testcapi.pymem_buffer_overflow() (GH-12560)
https://github.com/python/cpython/commit/414b1cde93764cdabb0798b02af4dd7df954424d


--

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12506

___
Python tracker 

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



[issue36435] multiprocessing crashes in Python 3.7.3 on Windows

2019-03-26 Thread Paul Moore


Paul Moore  added the comment:

Oh doh. That's what I get for trying to produce a minimal test case without 
thinking :-(

Thanks for the pointer. I originally hit this (or what I thought was this) in 
pipx - see https://github.com/pipxproject/pipx/issues/122 but then tried a 
smaller test, misread the error as being the same (there's so much noise when 
the subprocesses fail!) and reported it here without sufficient checking.

Thanks, and my apologies for the noise!

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



[issue36437] method_descriptor surprising error message when self is passed a keyword argument

2019-03-26 Thread STINNER Victor


New submission from STINNER Victor :

_PyMethodDescr_FastCallKeywords() is an optimization in ceval.c to call 
methods. Problem: it introduces a wrong bug.

>>> import io
>>> help(io.FileIO.write)
Help on method_descriptor:

write(self, b, /)
Write buffer b to file, return number of bytes written.

>>> f=io.FileIO("/dev/null", "wb")
>>> io.FileIO.write(f, b"data")  # ok
4

>>> io.FileIO.write(self=f, b=b"data") # ???
Traceback (most recent call last):
  File "", line 1, in 
TypeError: descriptor 'write' of '_io.FileIO' object needs an argument


io.FileIO.write is a "method_descriptor" builtin object. It's called from 
ceval.c call_function() using _PyMethodDescr_FastCallKeywords() which starts 
with:

/* Make sure that the first argument is acceptable as 'self' */
if (nargs < 1) {
PyErr_Format(PyExc_TypeError,
 "descriptor '%V' of '%.100s' "
 "object needs an argument",
 descr_name((PyDescrObject *)descr), "?",
 PyDescr_TYPE(descr)->tp_name);
return NULL;
}
self = args[0];

...

The bug is not a regression caused by the optimization. It exists in Python 3.6 
which doesn't have the optimization:

$ python3.6
Python 3.6.8+ (heads/3.6:b241af861b, Mar 11 2019, 08:55:59) 
>>> import io
>>> f=io.FileIO("/dev/null", "wb")
>>> io.FileIO.write(f, b"data") # ok
4
>>> io.FileIO.write(self=f, b=b"data") # ???
Traceback (most recent call last):
  File "", line 1, in 
TypeError: descriptor 'write' of '_io.FileIO' object needs an argument

Extract of Python 3.6 methoddescr_call():

/* Make sure that the first argument is acceptable as 'self' */
assert(PyTuple_Check(args));
argc = PyTuple_GET_SIZE(args);
if (argc < 1) {
PyErr_Format(PyExc_TypeError,
 "descriptor '%V' of '%.100s' "
 "object needs an argument",
 descr_name((PyDescrObject *)descr), "?",
 PyDescr_TYPE(descr)->tp_name);
return NULL;
}
self = PyTuple_GET_ITEM(args, 0);

Python 2.7 raises the same exception, but the docstring is different:

$ python2
Python 2.7.15 (default, Oct 15 2018, 15:26:09) 
>>> import io
>>> f=io.FileIO("/dev/null", "wb")
>>> io.FileIO.write(f, b"data")
4L
>>> io.FileIO.write(self=f, b=b"data")
TypeError: descriptor 'write' of '_io.FileIO' object needs an argument
>>> help(io.FileIO.write)
write(...)
write(b) -> int.  Write array of bytes b, return number written.

--

At this point, it's unclear to me if it's a bug... of a feature :-)

It seems like self is a positional-only argument, but the error message isn't 
helpful.

--
messages: 338886
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: method_descriptor surprising error message when self is passed a keyword 
argument
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



[issue36435] multiprocessing crashes in Python 3.7.3 on Windows

2019-03-26 Thread Steve Dower


Steve Dower  added the comment:

If you make the change suggested in the error text, does it fix it? (It could 
be clearer, but your module needs to only run its code when 
__name__=="__main__" instead of every time it gets imported.)

--

___
Python tracker 

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2019-03-26 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

As ncurses-related modules in Python alreadu build fine for Android, I consider 
the issue resolved.

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



[issue22503] Signal stack overflow in faulthandler_user

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3 is built frequently on the Fedora infra on AArch64 and the 
test_faulthandler test doesn't fail there. Recent example of build:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1236594

Direct link to AArch64 build logs (build.log):
https://kojipkgs.fedoraproject.org//packages/python3/3.7.2/5.fc29/data/logs/aarch64/build.log

Extract:

0:02:37 load avg: 5.99 [177/414] test_faulthandler passed (41 sec 925 ms) -- 
running: test_concurrent_futures (1 min 30 sec)
...
0:03:10 load avg: 10.21 [190/414] test_faulthandler passed (1 min 2 sec) -- 
running: test_gdb (44 sec 52 ms), test_concurrent_futures (1 min 56 sec)

The test is run on a Python compiled in release mode then on a Python compiled 
in debug mode. The test pass in both cases.

I close the issue. It seems like the bug has been fixed indirectly since this 
bug has been reported.

Thanks for your bug report Andreas Schwab :-)

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

___
Python tracker 

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



[issue36409] plistlib old API should be removed

2019-03-26 Thread Jon Janzen


Jon Janzen  added the comment:

Ah, I misinterpreted PEP4. I thought it only applied to modules as a whole 
(e.g. plistlib) rather than individual functionality within that module. I'll 
close my PR and wait until 3.9 is accepting patches

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-03-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

https://bugs.python.org/issue36414#msg338876

> Travis CI config has been changed to use a more recent Ubuntu version, it can 
> explain the failure.

I am confused since the commit changes the linux build to use xenial but the 
failure is on Mac OS X and it occurs even before the change to xenial that was 
committed on (March 18, 2019) . 

commit 74ae50e53e59bbe39d6287b902757f0cd01327dc
Author: CAM Gerlach 
Date:   Mon Mar 18 05:44:58 2019 -0500

Sample failure before the change : 
https://travis-ci.org/python/cpython/jobs/506168147 (March 14, 2019)

--

___
Python tracker 

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



[issue36436] _testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> _testcapimodule.c is mostly imported as _testcapi in tests. I am not sure 
> this is a security issue.

The function triggers a memory overflow on purpose. Handling memory allocation 
failure is the least of your problem if you call this function :-)

The whole module is designed to testing purpose only. "_" prefix in "_testapi" 
means that it must not be used. It's not documented on purpose.

Attached PR fix the bug.

--
components: +Tests
title: Potential null pointer de-reference vulnerability -> 
_testcapi.pymem_buffer_overflow() doesn't handle memory allocation failure
type: security -> 
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



[issue36436] Potential null pointer de-reference vulnerability

2019-03-26 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Possibly first occurrence of this error : 
> https://travis-ci.org/python/cpython/jobs/506783665 after which it's more or 
> less consistent.

That's the first build including my change:

commit 86082c22d23285995a32aabb491527c9f5629556
Author: Victor Stinner 
Date:   Fri Mar 15 14:57:52 2019 +0100

bpo-36235: Fix CFLAGS in distutils customize_compiler() (GH-12236)

Fix CFLAGS in customize_compiler() of distutils.sysconfig: when the
CFLAGS environment variable is defined, don't override CFLAGS variable with
the OPT variable anymore.

Initial patch written by David Malcolm.

Co-Authored-By: David Malcolm 

The build starts with:

Setting environment variables from .travis.yml
$ export OPENSSL=1.1.0i
$ export OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}"
$ export PATH="${OPENSSL_DIR}/bin:$PATH"
$ export CFLAGS="-I${OPENSSL_DIR}/include -O3"
$ export LDFLAGS="-L${OPENSSL_DIR}/lib"
$ export LD_RUN_PATH="${OPENSSL_DIR}/lib"
$ export OPTIONAL=true

Extract of .travis.yml:

env:
  global:
- OPENSSL=1.1.0i
- OPENSSL_DIR="$HOME/multissl/openssl/${OPENSSL}"
- PATH="${OPENSSL_DIR}/bin:$PATH"
# Use -O3 because we don't use debugger on Travis-CI
- CFLAGS="-I${OPENSSL_DIR}/include -O3"
- LDFLAGS="-L${OPENSSL_DIR}/lib"
# Set rpath with env var instead of -Wl,-rpath linker flag
# OpenSSL ignores LDFLAGS when linking bin/openssl
- LD_RUN_PATH="${OPENSSL_DIR}/lib"

Maybe it's a bad idea to set CFLAGS globally, and they should only set when 
building Python itself, not when building C extensions?

To be honest, I don't understand well the relationship between CFLAGS and new 
"Dangling thread: ..." errors. Maybe it's just unrelated.

Another question is why Travis CI is just fine on PR, but fails on "CRON" jobs?

--

___
Python tracker 

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



[issue36436] Potential null pointer de-reference vulnerability

2019-03-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

_testcapimodule.c is mostly imported as _testcapi in tests. I am not sure this 
is a security issue.

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



[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> https://travis-ci.org/python/cpython/jobs/510447290

That's a run on the master branch ("CRON").

xvfb-run ./venv/bin/python -m coverage run --pylib -m test --fail-env-changed 
-uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x 
test_multiprocessing_spawn -x test_concurrent_futures
== CPython 3.8.0a2+ (heads/master:a7987e7, Mar 23 2019, 23:53:10) [GCC 5.4.0 
20160609]
== Linux-4.15.0-1028-gcp-x86_64-with-glibc2.17 little-endian
== cwd: /home/travis/build/python/cpython/build/test_python_26699
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 1.49 [  1/416] test_grammar
0:00:03 load avg: 1.45 [  2/416] test_opcodes
0:00:03 load avg: 1.45 [  3/416] test_dict
0:00:12 load avg: 1.41 [  4/416] test_builtin
0:00:18 load avg: 1.35 [  5/416] test_exceptions
Exception ignored in: .BrokenDel.__del__ at 0x7f9e77198dc0>
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_exceptions.py", line 
1182, in __del__
raise exc
ValueError: del is broken
Exception ignored in: .BrokenExceptionDel.__del__ at 
0x7f9e771988c0>
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_exceptions.py", line 
1188, in __del__
raise exc
test.test_exceptions.BrokenStrException: 
test test_exceptions failed -- multiple errors occurred; run in verbose mode 
for details
0:00:22 load avg: 1.35 [  6/416/1] test_types -- test_exceptions failed
test test_types failed -- Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_types.py", line 1433, 
in test_duck_gen
self.assertIsInstance(gen, collections.abc.Generator)
AssertionError:  is not an 
instance of 

0:00:25 load avg: 1.32 [  7/416/2] test_unittest -- test_types failed
test test_unittest failed -- multiple errors occurred; run in verbose mode for 
details
0:01:33 load avg: 1.11 [  8/416/3] test_doctest -- test_unittest failed in 1 
min 7 sec
0:01:50 load avg: 1.08 [  9/416/3] test_doctest2
0:01:50 load avg: 1.08 [ 10/416/3] test_support
0:02:11 load avg: 1.05 [ 11/416/3] test___all__
0:02:31 load avg: 1.04 [ 12/416/3] test___future__
0:02:32 load avg: 1.04 [ 13/416/3] test__locale
0:02:32 load avg: 1.04 [ 14/416/3] test__opcode
0:02:34 load avg: 1.03 [ 15/416/3] test__osx_support
0:02:34 load avg: 1.03 [ 16/416/3] test__xxsubinterpreters
Warning -- threading._dangling was modified by test__xxsubinterpreters
  Before: <_weakrefset.WeakSet object at 0x7f9e7751a160>
  After:  <_weakrefset.WeakSet object at 0x7f9e752abb20> 
0:02:50 load avg: 1.03 [ 17/416/4] test_abc -- test__xxsubinterpreters failed 
(env changed)
0:02:51 load avg: 1.03 [ 18/416/4] test_abstract_numbers
0:02:52 load avg: 1.03 [ 19/416/4] test_aifc
0:02:55 load avg: 1.02 [ 20/416/4] test_argparse
0:05:14 load avg: 1.02 [ 21/416/4] test_array -- test_argparse passed in 2 min 
19 sec
0:05:38 load avg: 1.01 [ 22/416/4] test_asdl_parser
0:05:39 load avg: 1.01 [ 23/416/4] test_ast
0:05:51 load avg: 1.01 [ 24/416/4] test_asyncgen


0:05:54 load avg: 0.93 [ 25/416/4] test_asynchat
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
2)
Dangling thread: 
(...)
Dangling thread: 
Dangling thread: <_MainThread(MainThread, started 140318701401856)>
Dangling thread: 
Warning -- threading._dangling was modified by test_asynchat
  Before: <_weakrefset.WeakSet object at 0x7f9e70f061c0>
  After:  <_weakrefset.WeakSet object at 0x7f9e6fff7af0> 


0:15:10 load avg: 0.96 [ 26/416/5] test_asyncio -- test_asynchat failed (env 
changed) in 9 min 15 sec
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
2)
Dangling thread: <_MainThread(MainThread, started 140318701401856)>
Dangling thread: 
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
6)
Dangling thread: 
Dangling thread: 
Dangling thread: 
(...)
Dangling thread: 
Dangling thread: 
Dangling thread: 
Dangling thread: 
Dangling thread: <_MainThread(MainThread, started 140318701401856)>


The job exceeded the maximum time limit for jobs, and has been terminated.

--

___
Python tracker 

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



[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> https://travis-ci.org/python/cpython/jobs/510447289

This failure is on the master branch.

./python.exe  ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest 
--fail-env-changed --timeout=1200 -j4 -uall,-cpu
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/Users/travis/build/python/cpython/Lib/hashlib.py", line 244, in 

globals()[__func_name] = __get_hash(__func_name)
  File "/Users/travis/build/python/cpython/Lib/hashlib.py", line 113, in 
__get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
(...)

Travis CI config has been changed to use a more recent Ubuntu version, it can 
explain the failure.

commit 74ae50e53e59bbe39d6287b902757f0cd01327dc
Author: CAM Gerlach 
Date:   Mon Mar 18 05:44:58 2019 -0500

bpo-36307: Travis: upgrade to Xenial environment (GH-12356)

--

___
Python tracker 

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



[issue36436] Potential null pointer de-reference vulnerability

2019-03-26 Thread SilentGhost


Change by SilentGhost :


--
nosy: +vstinner

___
Python tracker 

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



[issue36436] Potential null pointer de-reference vulnerability

2019-03-26 Thread wangjiangqiang


New submission from wangjiangqiang <767563...@qq.com>:

In Modules/_testcapimodule.c  line 4186 and 4187.
Allocated memory is used without null check.

--
messages: 338875
nosy: wjq-security
priority: normal
severity: normal
status: open
title: Potential null pointer de-reference vulnerability
type: security

___
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-26 Thread STINNER Victor


STINNER Victor  added the comment:

Would it me sense to use ".. literalinclude:: ../../Tools/scripts/serve.py" in 
the wsgi doc to keep serve.py and and this example up to date? It seems like 
serve.py is going to stay.

--

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> And that change should be made for every platform so it will affect a much 
> broader group of users than are affected by *this* issue.

Do you mean to stop using fork on Linux as well? Using fork is just fine on 
Linux, no?

--

___
Python tracker 

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



[issue36434] Zipfile breaks if signalled during write()

2019-03-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2019-03-26 Thread Bas Nijholt


Bas Nijholt  added the comment:

I think this issue is related to  the problem in 
https://bugs.python.org/issue36281

If it indeed is the case, then the fix proposed here and implemented in 
https://github.com/python/cpython/commit/22d25085db2590932b3664ca32ab82c08f2eb2db
 won't really help.

--
nosy: +basnijholt

___
Python tracker 

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



[issue13282] the table of contents in epub file is too long

2019-03-26 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +ezio.melotti, mdk, willingc
type:  -> enhancement
versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.2

___
Python tracker 

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



[issue36408] Tkinter multi-processing performance, Linux 10-25 times faster than Windows 10

2019-03-26 Thread J.E.McCormack


J.E.McCormack  added the comment:

Attached is a minimal reproducer script which is sufficient to show the issue 
clearly.

It is a simple single-thread Tkinter program with one canvas. No 
multiprocessing, no shared variables, no connections between instances. 
Instructions at top of file.

Results on i7-6700HQ, 4-core (8 thread), 2.60GHz, 16GB, Windows 10:-

1 process running alone: 29k objects/sec
6 processes running concurrently:4.3k objects/sec each, = 25.8k 
objects/sec combined.

Conclusion: One-core performance, global system-wide lock.

--
Added file: https://bugs.python.org/file48232/mosaic.py

___
Python tracker 

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



[issue36435] multiprocessing crashes in Python 3.7.3 on Windows

2019-03-26 Thread Paul Moore


New submission from Paul Moore :

If I run the following sample program using Python 3.7.3 (64 bit) for Windows, 
it immediately fails, producing a massive traceback.

import multiprocessing

def f(n):
return n+1

with multiprocessing.Pool() as p:
for n in p.map(f, [1,2,3]):
print(n)

This is a part of the traceback produced - the whole traceback seemed to be 
continually increasing, until I killed (some of) the python processes via task 
manager:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 105, in spawn_main
exitcode = _main(fd)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 114, in _main
prepare(preparation_data)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 277, in _fixup_main_from_path
run_name="__mp_main__")
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 263, in run_path
pkg_name=pkg_name, script_name=fname)
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 96, in _run_module_code
Traceback (most recent call last):
  File "", line 1, in 
mod_name, mod_spec, pkg_name, script_name)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 105, in spawn_main
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 85, in _run_code
exitcode = _main(fd)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 114, in _main
exec(code, run_globals)
prepare(preparation_data)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 225, in prepare
  File "C:\Work\Scratch\t.py", line 6, in 
_fixup_main_from_path(data['init_main_from_path'])
with multiprocessing.Pool() as p:
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 277, in _fixup_main_from_path
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py",
 line 119, in Pool
run_name="__mp_main__")
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 263, in run_path
context=self.get_context())
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py",
 line 176, in __init__
pkg_name=pkg_name, script_name=fname)
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\runpy.py", 
line 85, in _run_code
self._repopulate_pool()
exec(code, run_globals)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py",
 line 241, in _repopulate_pool
  File "C:\Work\Scratch\t.py", line 6, in 
with multiprocessing.Pool() as p:
w.start()
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py",
 line 119, in Pool
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py",
 line 112, in start
context=self.get_context())
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py",
 line 176, in __init__
self._popen = self._Popen(self)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py",
 line 322, in _Popen
self._repopulate_pool()
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py",
 line 241, in _repopulate_pool
return Popen(process_obj)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py",
 line 46, in __init__
w.start()
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py",
 line 112, in start
prep_data = spawn.get_preparation_data(process_obj._name)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 143, in get_preparation_data
self._popen = self._Popen(self)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\context.py",
 line 322, in _Popen
return Popen(process_obj)
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\popen_spawn_win32.py",
 line 46, in __init__
_check_not_importing_main()
  File 
"C:\Users\pmoore\AppData\Local\Programs\Python\Python37\lib\multiprocessing\spawn.py",
 line 136, in _check_not_importing_main
prep_data = spawn.get_preparation_data(process_obj._name)
  File 

[issue36433] Unhelpful error message in classmethoddescr_call()

2019-03-26 Thread Inada Naoki


Change by Inada Naoki :


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



[issue36433] Unhelpful error message in classmethoddescr_call()

2019-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 03440850e7266aa7fd531c7f281a3fdcf17f90a4 by Miss Islington (bot) 
in branch '3.7':
bpo-36433: fix confusing error messages in classmethoddescr_call (GH-12556)
https://github.com/python/cpython/commit/03440850e7266aa7fd531c7f281a3fdcf17f90a4


--

___
Python tracker 

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



[issue34602] python3 resource.setrlimit strange behaviour under macOS

2019-03-26 Thread Inada Naoki


Inada Naoki  added the comment:

https://bugs.python.org/issue34602 may be relating to this.

--
nosy: +inada.naoki

___
Python tracker 

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



  1   2   >