[issue36694] Excessive memory use or memory fragmentation when unpickling many small objects

2019-04-30 Thread Inada Naoki
Inada Naoki added the comment: Memory allocation pattern is: alloc 24 # float alloc 24 alloc 24 alloc 64 # temporary tuple alloc 72 free 64 # free temporary tuples free 64 free 64 This cause some sort of fragmentation. Some pools in arenas are unused. This prevents pymalloc to return

[issue36694] Excessive memory use or memory fragmentation when unpickling many small objects

2019-04-30 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.8 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sorry, I will toggle back the issue status. Not sure why bpo didn't warn in this case. -- assignee: gregory.p.smith -> stage: patch review -> backport needed versions: -Python 3.8 ___ Python tracker

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset db7197543112954b0912e3d46e39fefcb1c3b950 by Victor Stinner in branch 'master': bpo-36763: Rework _PyInitError API (GH-13031) https://github.com/python/cpython/commit/db7197543112954b0912e3d46e39fefcb1c3b950 --

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This causes buildbot failure (AMD64 FreeBSD 10-STABLE Non-Debug 3.x and AMD64 Debian root 3.x). I tried debugging and it's reproducible on my mac machine that has python not built with ssl and not reproducible on Ubuntu machine built with ssl.

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: gregory.p.smith -> stage: patch review -> backport needed ___ Python tracker ___ ___

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: backports to older releases will need to be done manually and take care depending on how much of a concern tightening the existing abusive lenient behavior of the http.client API to enforce what characters are allowed in URLs is to stable releases. I

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset c4e671eec20dfcb29b18596a89ef075f826c9f96 by Gregory P. Smith in branch 'master': bpo-30458: Disallow control chars in http URLs. (GH-12755) https://github.com/python/cpython/commit/c4e671eec20dfcb29b18596a89ef075f826c9f96 --

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2019-04-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've approved both PRs, however I am rather uncomfortable about the code snippet in import.rst. Géry's change is a good one AFAICT, and thanks for the contribution! I would feel much better about the long term correctness of this code snippet if we had a

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12952 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5f38b8407b071acd96da2c8cde411d0e26967735 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig_SetArgv() (GH-13030) https://github.com/python/cpython/commit/5f38b8407b071acd96da2c8cde411d0e26967735 --

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread Chihiro Ito
Chihiro Ito added the comment: I have confirmed that all of my app's test cases have passed. What I've done: 1. Installed Python 3.7.3. 2. Replaced urllib/parse.py with the one from 781ffb1. 3. Ran my app's test cases. Thank you for the quick fix! --

[issue26493] Bad formatting in WinError 193 when using subprocess.check_call

2019-04-30 Thread Eryk Sun
Eryk Sun added the comment: >> A new issue should be raised to fix the FormatMessage calls in the >> standard library that mistakenly leave out >> FORMAT_MESSAGE_IGNORE_INSERTS. > > Do you suggest to modify OSError constructor to modify the call to > FormatMessageW(): don't pass the

[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Martin Panter
Martin Panter added the comment: Python 3.7 added the "capture_output" parameter, for Issue 32102. Before that change, you could use "subprocess.PIPE": https://docs.python.org/3.6/library/subprocess.html#subprocess.run “To [capture output], pass PIPE for the ‘stdout’ and/or ‘stderr’

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12951 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 463b82a3efe8a6a9f3924a5b37482e961dffe3b8 by Victor Stinner in branch 'master': bpo-36763: Fix Py_SetStandardStreamEncoding() (GH-13028) https://github.com/python/cpython/commit/463b82a3efe8a6a9f3924a5b37482e961dffe3b8 --

[issue14905] zipimport needs to support namespace packages when no 'directory' entry exists

2019-04-30 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36740] zipimporter misses namespace packages for implicit dirs

2019-04-30 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +12950 stage: -> patch review ___ Python tracker ___ ___

[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-04-30 Thread STINNER Victor
New submission from STINNER Victor : I'm working on changes to complete the PEP 587, Python initiaization API. -- components: Interpreter Core messages: 341167 nosy: vstinner priority: normal severity: normal status: open title: PEP 587: Rework initialization API to prepare second

[issue36762] Teach "import *" to warn when overwriting globals or builtins

2019-04-30 Thread Raymond Hettinger
New submission from Raymond Hettinger : One reason we usually suggest that people don't use star imports is that it is too easy to shadow a builtin or overwrite an existing global. Momma Gump always used to say, "import star is like a box of chocolates, you never know what you've going to

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: Python 3.7 was also affected: I fixed it as well. Thanks for your bug report. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread miss-islington
miss-islington added the comment: New changeset 5f5b187bfa17254f5ae55593820fc938c45c2b32 by Miss Islington (bot) in branch '3.7': bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970) https://github.com/python/cpython/commit/5f5b187bfa17254f5ae55593820fc938c45c2b32 --

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12949 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36329] use the right python "make -C Doc/ serve"

2019-04-30 Thread Berker Peksag
Berker Peksag added the comment: Personally, I'd prefer removing the 'serve' target completely. make -C Doc htmlview should already cover most of its use cases. There is no deprecation period needed and there is already a replacement (and IMO better) for it. -- nosy: +berker.peksag

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

2019-04-30 Thread Berker Peksag
Berker Peksag added the comment: Please revert 360e1e4c519cfc139de707bcdd1e6c871eec79ee. It's not a good example to put into the documentation. It uses different naming convention. It would only confuse users relatively new to the wsgiref module and WSGI protocol. FileWrapper was supposed

[issue14546] lll.py can't handle multiple parameters correctly

2019-04-30 Thread Zackery Spytz
Zackery Spytz added the comment: I've created a PR for this issue (with a test). -- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3 ___ Python tracker

[issue14546] lll.py can't handle multiple parameters correctly

2019-04-30 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +12948 stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36761] Extended slice assignment + iterable unpacking

2019-04-30 Thread wim glenn
New submission from wim glenn : Could cases like these be made to work? *Should* cases like these be made to work? L = [0, 1, 2] L[::2], *rest = "abcdef" # ValueError: attempt to assign sequence of size 1 to extended slice of size 2 a, L[::2] = "abc" # ValueError: too many values to unpack

[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Are you using something like below? This exception was added with ce0f33d04528fcafc673a8707871f8430d8f7ce8 (issue32102) >>> subprocess.run('ls', stdout=subprocess.PIPE, capture_output=True) Traceback (most recent call last): File "", line 1, in

[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Joe Borg
New submission from Joe Borg : Reading from https://docs.python.org/3/library/subprocess.html#subprocess.CompletedProcess """ If you ran the process with stderr=subprocess.STDOUT, stdout and stderr will be combined in this attribute, and stderr will be None. """ But, if you run `run()` with

[issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument

2019-04-30 Thread SilentGhost
SilentGhost added the comment: This seems like a duplicate (or at least very similar) to the issue 29097. Could you try a newer version of Python (that issue was fixed in 3.6.7) to make sure it's not a duplicate? That was specifically a Windows bug, Windson, make sure that what you're

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-04-30 Thread Andreas Schneider
Andreas Schneider added the comment: And how do you deal with METH_VARARGS|METH_KEYWORDS functions which have 3 arguments? PyObject* myfunc(PyObject *py_obj, PyObject *args, PyObject *kwargs) -- ___ Python tracker

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-04-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, and this particular case was fixed in adfffc7343ce7ebc88ec734a803d3247ba8927fb. -- ___ Python tracker ___

[issue36757] uuid constructor accept invalid strings (extra dash)

2019-04-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: The documentation does describe a fairly flexible parser. Perhaps it's a little too flexible on stuff like URN prefixes, but I don't think we could start enforcing a stricter class of hyphen separations without potentially breaking existing code. Is there

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2019-04-30 Thread Andreas Schneider
Andreas Schneider added the comment: Looking at: https://github.com/python/cpython/commit/359a2f3daba49fde0d3a07fb3c7a8b051c450d08 This is not fixing the underlying issue but hiding it. The right fix would be to use a union for ml_meth providing members for the 3 different function. So the

[issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument

2019-04-30 Thread Windson Yang
Windson Yang added the comment: on macOS 10.14.4, I got `ValueError: offset must be a timedelta representing a whole number of minutes, not datetime.timedelta(0, 29143).` I will do some research to see why this happen. -- nosy: +Windson Yang ___

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread miss-islington
miss-islington added the comment: New changeset 4d723e76e1ad17e9e7d5e828e59bb47e76f2174b by Miss Islington (bot) in branch '3.7': bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017)

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +12947 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12946 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread Steve Dower
Steve Dower added the comment: New changeset d537ab0ff9767ef024f26246899728f0116b1ec3 by Steve Dower in branch 'master': bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) https://github.com/python/cpython/commit/d537ab0ff9767ef024f26246899728f0116b1ec3

[issue36742] urlsplit doesn't accept a NFKD hostname with a port number

2019-04-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +12945 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument

2019-04-30 Thread Snidhi Sofpro
New submission from Snidhi Sofpro : With: Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32 import datetime; d_Time = datetime.datetime.strptime('03:30 PM', '%I:%M %p'); d_Time = d_Time.astimezone(datetime.timezone.utc); # RESULTS IN OSError: [Errno

[issue36758] configured libdir not correctly passed to Python executable

2019-04-30 Thread Michael Osipov
New submission from Michael Osipov <1983-01...@gmx.net>: I do compile Python from master on HP-UX with aCC: # echo $LDFLAGS $CPPFLAGS -L/opt/ports/lib/hpux32 -I/opt/ports/include UNIX_STD=1998 LDFLAGS="$LDFLAGS -lreadline" CPPFLAGS="-I$PREFIX/include/ncurses $CPPFLAGS" ./configure

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread Michael Osipov
Michael Osipov <1983-01...@gmx.net> added the comment: I do not know because I haven't really tested that branch. My HP-UX PRs (https://github.com/python/cpython/pulls/michael-o) are still open and apply to master currently. We (you and me) agreed some time ago, that we go master first.

[issue26493] Bad formatting in WinError 193 when using subprocess.check_call

2019-04-30 Thread Raúl Núñez de Arenas
Raúl Núñez de Arenas added the comment: That's the kind of patch I assumed was created for the Windows part, Berker, that's why I reopened the issue. Thanks for the information. -- ___ Python tracker

[issue6584] gzip module has no custom exception

2019-04-30 Thread Zackery Spytz
Zackery Spytz added the comment: I'd like to see this issue move forward, so I've created a PR. -- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.4 ___ Python tracker ___

[issue6584] gzip module has no custom exception

2019-04-30 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +12944 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: Thanks for testing, I merged my PR. Does Python 3.7 have the same issue? -- ___ Python tracker ___

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b84cb70880a0acfcbbaca7bcda405af08f94d269 by Victor Stinner in branch 'master': bpo-36734: Fix compilation of faulthandler.c on HP-UX (GH-12970) https://github.com/python/cpython/commit/b84cb70880a0acfcbbaca7bcda405af08f94d269 --

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread Michael Osipov
Michael Osipov <1983-01...@gmx.net> added the comment: The memset() works as expected and compiles for me. -- ___ Python tracker ___

[issue36756] tkinter tk.createcommand memory leak

2019-04-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gpolo, serhiy.storchaka title: createcommand memory leak -> tkinter tk.createcommand memory leak ___ Python tracker ___

[issue36757] uuid constructor accept invalid strings (extra dash)

2019-04-30 Thread Cédric Cabessa
New submission from Cédric Cabessa : UUID constructor accept string with too many dashes or keyword like urn: / uuid: For eg, this code do not raise ``` >>> import uuid >>> uuid.UUID('0be--468urn:urn:urn:urn:54-4bf9-41--d4-9697-41d735uuid:4fbe85uuid:')

[issue36756] createcommand memory leak

2019-04-30 Thread Wolfram Kraus
New submission from Wolfram Kraus : When using tk.createcommand you get a memory leak when you don't explicitly call tk.deletecommand to remove this command. See attached file: __del__ never get's called due to the memory leak and because of that calling tk.deletecommand inside __del__ has no

[issue32223] distutils doesn't correctly read UTF-8 content from config files

2019-04-30 Thread Eduardo Suarez-Santana
Eduardo Suarez-Santana added the comment: In my opinion, 'setup.cfg' is setuptools stuff and not part of python project. Anyway I think it is a good idea to read it as UTF-8. Setuptools seems to be defaulting to UTF-8: https://github.com/pypa/setuptools/pull/1735 -- nosy:

[issue25430] speed up ipaddress __contain__ method

2019-04-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset 3bbcc92577f8e616bc94c679040043bacd00ebf1 by Inada Naoki (gescheit) in branch 'master': bpo-25430: improve performance of IPNetwork.__contains__ (GH-1785) https://github.com/python/cpython/commit/3bbcc92577f8e616bc94c679040043bacd00ebf1

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b0a2c0fa83f9b79616ccf451687096542de1e6f8 by Raymond Hettinger in branch 'master': bpo-36018: Test idempotence. Test two methods against one-another. (GH-13021) https://github.com/python/cpython/commit/b0a2c0fa83f9b79616ccf451687096542de1e6f8

[issue36018] Add a Normal Distribution class to the statistics module

2019-04-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12943 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36750] test_socket leaks file descriptors on macOS

2019-04-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The test failure is reproducible on the PR 12271 merging master branch on Ubuntu with -R 3:3 test_socket. Sorry, I tried it initially on master thinking it was a master branch problem. I don't see C related code in the PR. There was a merge commit