[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12182 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset c656e25667c9acc0d13e5bb16d3df2938d0f614b by Victor Stinner in branch 'master': bpo-36142: Add _PyPreConfig_SetAllocator() (GH-12187) https://github.com/python/cpython/commit/c656e25667c9acc0d13e5bb16d3df2938d0f614b --

[issue36199] libzmq.dll causes uncontrollable screen flickering when accessing windows 2012 R2 server through remote desktop

2019-03-05 Thread Eryk Sun
Eryk Sun added the comment: I'm closing this as third party. libzmq.dll is not part of a standard Python 3 distribution. Search for an existing issue at the site's for PyZMQ [1] and ZeroMQ [2]. [1]: https://github.com/zeromq/pyzmq [2]: https://github.com/zeromq/libzmq -- nosy: +eryk

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12183 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36201] AssertCountEqual does not work for nested dictionaries.

2019-03-05 Thread Walter Qian
New submission from Walter Qian : For dictionaries of dictionaries unittest.util._count_diff_all_purpose does not work correctly. It should recursively call itself when it encounters another dictionary. -- components: Tests messages: 337248 nosy: walterqian priority: normal severity:

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4fffd380a4070aff39b7fd443d90e60746c1b623 by Victor Stinner in branch 'master': bpo-36142: _PyPreConfig_Read() sets LC_CTYPE (GH-12188) https://github.com/python/cpython/commit/4fffd380a4070aff39b7fd443d90e60746c1b623 -- __

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: Description of this long serie of changes. I modified Py_Main() and _Py_InitializeCore() to clearly separate "pre-configuration" from "configuration" steps. The pre-configuration now decodes temporarily the command line arguments and uses its own command lin

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Steve Dower
Steve Dower added the comment: The problem is that if we add lots of new constants in 3.7.3, code written in that version very easily becomes incompatible with 3.7.2 and earlier. So we don't like making changes like that. If we know which ones are "normally" defined on Linux machines, where

[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-05 Thread STINNER Victor
New submission from STINNER Victor : Calling Py_DecodeLocale() before Py_Initialize() or _Py_InitializeCore() is broken since Python 3.7 if the C locale coercion (PEP 538) or UTF-8 mode (PEP 540) changes the encoding in the middle of _Py_InitializeCore(). I added a new phase to the Python ini

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-36202: "Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake". -- ___ Python tracker ___ ___

[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: Ok, the _PyPreConfig structure is now available and used internally. The API can likely be enhanced, but I prefer to open new follow-up issues like bpo-36202, since this issue has already a long list of changes :-) I close this issue. Nick: thanks for updat

[issue36203] PyWeakref_NewRef docs are misleading

2019-03-05 Thread Maxwell Bernstein
New submission from Maxwell Bernstein : The docs for `PyWeakref_NewRef` state "if callback is not callable, None, or NULL, this will return NULL and raise TypeError". It does not appear as though there is a callable check for the callback. -- messages: 337255 nosy: Maxwell Bernstein p

[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

2019-03-05 Thread STINNER Victor
New submission from STINNER Victor : If Py_Main() is called after Py_Initialize(), the configuration read by Py_Main() is mostly ignored to only keep the configuration read and writen by Py_Initialize(). Only sys.argv and the internal "path configuration" are updated. Problem: in this case, "

[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: PySys_SetArgvEx() can be called before Py_Initialize(), but arguments passed to this function are not parsed. https://docs.python.org/dev/c-api/init.html#c.PySys_SetArgvEx -- ___ Python tracker

[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: INADA-san proposed to make the existing _Py_UnixMain() function public. (Currently, the function is private.) https://discuss.python.org/t/adding-char-based-apis-for-unix/916 -- nosy: +inada.naoki ___ Python tracke

[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-36202: Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake. -- ___ Python tracker ___ __

[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: The "vim" editor embeds Python. It sets the Python home by calling Py_SetPythonHome() with the following code: --- size_t len = mbstowcs(NULL, (char *)p_py3home, 0) + 1; /* The string must not change later, make a copy in static memory

[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: By the way, according to Nick Coghlan (author of the PEP 538), Py_Initialize() and Py_Main() called from an application embedding Python should not coerce the C locale. -- ___ Python tracker

[issue14385] Support other types than dict for __builtins__

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: This issues is now closed. Please open a new issue. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue36177] test_io: test_daemon_threads_shutdown_stdout_deadlock() fails on x86 Windows7 3.x

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: > This is resolved with gh-12159, no? I was waiting to see if buildbot workers feel better. It's the case, so I close the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python track

[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: > This is resolved with gh-12159, no? I was waiting to see if buildbot workers feel better. It's the case, so I close the issue. -- priority: release blocker -> normal resolution: -> fixed stage: -> resolved status: open -> closed

[issue36114] test_multiprocessing_spawn dumps core in AMD64 FreeBSD CURRENT Shared 3.x

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: > This is resolved with gh-12159, no? I was waiting to see if buildbot workers feel better. It's the case, so I close the issue. -- priority: release blocker -> normal resolution: -> fixed stage: -> resolved status: open -> closed

[issue36144] Dictionary addition.

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: Is this issue directly or indirectly related to the PEP 584 "Add + and - operators to the built-in dict class"? https://www.python.org/dev/peps/pep-0584/ -- nosy: +vstinner ___ Python tracker

[issue36144] Dictionary addition. (PEP 584)

2019-03-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36144] Dictionary addition. (PEP 584)

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: > Is this issue directly or indirectly related to the PEP 584 "Add + and - > operators to the built-in dict class"? > https://www.python.org/dev/peps/pep-0584/ Ah yes, it's written in the title of the PR. I add it to the bug title as well. -- title:

[issue36201] AssertCountEqual does not work for nested dictionaries.

2019-03-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe this is outside the scope of what intended. For the most part, the test methods need to be as direct and non-magical as possible so that we're clear on what is being tested. Another issue with built in recursion is that different people have

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Andrew Brezovsky
Andrew Brezovsky added the comment: I see your point. Then perhaps only a subset of the more vital ones get added to previous releases? #define IPPROTO_IPV4 IPPROTO_IPV4 #define IPPROTO_IPV6 IPPROTO_IPV6 #define IPPROTO_TCP IPPROTO_TCP #define IPPROTO_UDP IPPROTO_UDP #define IPPROTO_ICMP IPP

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly (twice then expected)

2019-03-05 Thread Alexander Lopatin
New submission from Alexander Lopatin : I see this problem only on my iMac (macOS Mojave, Version 10.14.3). My Windows and Linux (CentOS) computers have no such problem. I asked the question on Stack Overflow today, investigated, and reported here: https://stackoverflow.com/questions/5500839

[issue36201] AssertCountEqual does not work for nested dictionaries.

2019-03-05 Thread Lisa Roach
Lisa Roach added the comment: I agree with Raymond, I think this might end up complicating things too much. It is common in the unit test library to only recurse one level deep and not assume too much about the intentions of the tester. -- ___ Pyt

[issue36206] re.match() not matching escaped hyphens

2019-03-05 Thread Lottie Price
New submission from Lottie Price : Problem: re.match("\\-", "\\-") returns None. I expected a match. Context: I have some random text strings I want to match against. I'm using re.escape() to ensure that the text characters are not interpreted as special characters: re.match(re.escape

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2019-03-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: IPPROTO_TCP/UDP/RAW/ICMP are already there. AFAICT the only useful one here is IPPROTO_IPV6, because it's needed for enabling dual-stack. I don't think IPPROTO_IPV4 is a must (e.g. it's not available on Linux). Same for IPPROTO_ICMPV6. The only reason we

[issue36206] re.match() not matching escaped hyphens

2019-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: "\\-" is equivalent to the raw string r"\-" (that it, it has one backslash, followed by a hyphen). \X (where X is any ASCII non-letter, non-digit) matches the character itself (the escape does nothing except ensure the punctuation doesn't have any special re

[issue36206] re.match() not matching escaped hyphens

2019-03-05 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue36206] re.match() not matching escaped hyphens

2019-03-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: You don't escape the text you are searching. Try this: py> re.match(re.escape('-'), "-") <_sre.SRE_Match object; span=(0, 1), match='-'> py> re.match(re.escape('a-c'), "a-c") <_sre.SRE_Match object; span=(0, 3), match='a-c'> -- nosy: +steven.daprano

[issue36198] Misleading in library/sets document

2019-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: The "returns" bit is accurate when referring to the in-place operator overloads (__ior__), so those lines may have been written referring to the overloads described on the same line (they shouldn't have been written that way, but that would explain why only

[issue36158] Regex search behaves differently in list comprehension

2019-03-05 Thread Josh Rosenberg
Change by Josh Rosenberg : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue36172] csv module internal consistency

2019-03-05 Thread Josh Rosenberg
Change by Josh Rosenberg : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-05 Thread Ned Deily
Ned Deily added the comment: Thanks for your report. There does indeed seem to be a problem but, as can be seen if you run your test from SO (please attach it to this issue!) with a current python.org 3.6.x installer for macOS which uses the same build infrastructure as the 3.7 and 3.8 inst

[issue36162] error: implicit declaration of function 'sendfile' is invalid in C99

2019-03-05 Thread Inada Naoki
Inada Naoki added the comment: May I close this issue? I feel target SDK v21 is too old. https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html -- nosy: +inada.naoki ___ Python tracker

[issue20774] collections.deque should ship with a stdlib json serializer

2019-03-05 Thread Lisa Roach
Lisa Roach added the comment: Serhiy might be right, it looks significantly worse with benchmarking: lisroach$ python3 -m timeit "import json; json.dumps(['test'])" 10 loops, best of 3: 2.73 usec per loop lisroach$ ./python.exe -m timeit "import json; json.dumps(['test'])" 1 loops, be

[issue36198] Misleading in library/sets document

2019-03-05 Thread Han
Han added the comment: Thanks, I didn't notice the Deprecated sign on the Sets page. -- stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-05 Thread Nick Coghlan
Nick Coghlan added the comment: They weren't *intended* to change it, and didn't in the original implementation of the PEP, but they do in the as-shipped Python 3.7 implementation, and I abandoned my attempts to revert to the as-designed behaviour as impractical given the other changes made

[issue35838] ConfigParser calls optionxform twice when assigning dict

2019-03-05 Thread Inada Naoki
Inada Naoki added the comment: It seems twice call of `optionxform` is not avoidable when read-and-write workflow. I'm not against about fixing readdict. But I don't think configparser supports non-idempotent optionxform. >>> import configparser >>> cfg = configparser.ConfigParser() >>> cfg.o

[issue35807] Update bundled pip to 19.0

2019-03-05 Thread Pradyun Gedam
Change by Pradyun Gedam : -- keywords: +patch pull_requests: +12184 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36203] PyWeakref_NewRef docs are misleading

2019-03-05 Thread SilentGhost
Change by SilentGhost : -- assignee: -> docs@python components: +Documentation, ctypes nosy: +docs@python type: -> behavior ___ Python tracker ___ ___

<    1   2