[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Aldwin Pollefeyt
Aldwin Pollefeyt added the comment: FWIW: this is probably since PR14099 -- nosy: +aldwinaldwin ___ Python tracker ___ ___

[issue36528] Remove duplicate tests in Lib/tests/re_tests.py

2019-07-04 Thread makdon
makdon added the comment: It has been 3 months since this issues opened, and the 3.8 has released. Though it is a low priority, could we push this issue forward? -- nosy: +makdon ___ Python tracker

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-04 Thread Markus Mohrhard
Markus Mohrhard added the comment: Sorr, I somehow managed to overwrite my title before submitting with the one from one if the results of my searches. -- ___ Python tracker

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-04 Thread Markus Mohrhard
Change by Markus Mohrhard : -- title: Pure Python pickle module should not depend on _pickle.PickleBuffer -> Fix default argument handling for buffers argument in pickle.loads ___ Python tracker

[issue23312] google thinks the docs are mobile unfriendly

2019-07-04 Thread karl
karl added the comment: I created https://github.com/python/python-docs-theme/issues/30 -- ___ Python tracker ___ ___

[issue23312] google thinks the docs are mobile unfriendly

2019-07-04 Thread karl
karl added the comment: This issue should probably be addressed now on https://github.com/python/python-docs-theme -- nosy: +karlcow ___ Python tracker ___

[issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-07-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also issue37210 -- nosy: +pitrou, xtreak ___ Python tracker ___ ___

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Not sure if related there were some changes done to __debug__ related checks with issue37269 -- nosy: +xtreak ___ Python tracker

[issue24772] Smaller viewport shifts the "expand left menu" character into the text

2019-07-04 Thread karl
karl added the comment: So I had time to look at it today. And it would probably be better to solve https://bugs.python.org/issue23312 which would make this one here useless and would actually provide a solution for many people. -- ___ Python

[issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-07-04 Thread Markus Mohrhard
Change by Markus Mohrhard : -- keywords: +patch pull_requests: +14409 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14593 ___ Python tracker ___

[issue37501] Test failures when CPython is built without docstrings

2019-07-04 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +14408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14592 ___ Python tracker ___

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Ned Batchelder
Ned Batchelder added the comment: BTW, the same regression applies to "if not __debug__:" . Python3.8.0b1 optimized these away, but b2 does not. That optimization was new in 3.7.0a4 -- ___ Python tracker

[issue37502] Pure Python pickle module should not depend on _pickle.PickleBuffer

2019-07-04 Thread Markus Mohrhard
New submission from Markus Mohrhard : The following piece of code import pickle pickle.loads(pickle.dumps(1, protocol=pickle.HIGHEST_PROTOCOL), buffers=None) fails with "TypeError: 'NoneType' object is not iterable" The corresponding PEP (https://www.python.org/dev/peps/pep-0574/) specifies

[issue37501] Test failures when CPython is built without docstrings

2019-07-04 Thread Zackery Spytz
New submission from Zackery Spytz : test_coroutines, test_dataclasses, test_idle, test_importlib, test_module, and test_pydoc fail when CPython is built without docstrings. It seems that most of the failures occur simply because the test.support.requires_docstrings decorator is missing for

[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2019-07-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tal, I will be delighted to see this finally land. Please continue. Some immediate comments to update the years-ago discussion. 1a. IDLE now explicitly requires tk 8.5. AFAIK, it is only tested on 8.6. 1b. Feature are no longer extensions. 2a. The code

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pablogsal, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-04 Thread Ned Batchelder
New submission from Ned Batchelder : CPython 3.8.0b2 behaves differently than previous releases: it no longer optimizes away "if 0:" branches. This is something that has been done since at least 2.4. It was done in 3.8.0b1, but no longer is. Was this a purposeful change? Why? It seems like

[issue37499] test_gdb.test_pycfunction should use dedicated test functions

2019-07-04 Thread Paul Ganssle
New submission from Paul Ganssle : Currently, `test_pycfunction` picks a few built-in functions with various calling conventions to exercise all the relevant code paths: for py_name, py_args, c_name, expected_frame_number in ( ('gmtime', '', 'time_gmtime', 1), #

[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2019-07-04 Thread Carl Friedrich Bolz
Carl Friedrich Bolz added the comment: FWIW, in my opinion the col_offsets of the two nodes should be 1 and 3, respectively (the positions of the operators). -- nosy: +Carl.Friedrich.Bolz ___ Python tracker

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-07-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith resolution: duplicate -> status: closed -> open ___ Python tracker ___

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-07-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: resolved -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37498] request.urlopen(), memory leak?

2019-07-04 Thread neonene
New submission from neonene : Python3.8.0a4,b1,b2(x64,x32) Python3.7.4rc1,rc2 (x64,x32) In Windows7 SP1(x64), memory usage keep increasing by the following code. --- from urllib import request from time import sleep while True: req = request.Request('https://www.python.org/')

[issue32082] atexit module: allow getting/setting list of handlers directly

2019-07-04 Thread Christopher Hunt
Christopher Hunt added the comment: Updated link to workaround referenced in the original issue: https://github.com/sagemath/sage/blob/b5c9cf037cbce672101725f269470135b9b2c5c4/src/sage/cpython/atexit.pyx -- nosy: +chrahunt ___ Python tracker

[issue37479] IntEnum __format__ behavior can't be overridden through __str__

2019-07-04 Thread Ethan Furman
Ethan Furman added the comment: New changeset 2f19e82fbe98ce86bcd98a176328af2808b678e8 by Ethan Furman (thatneat) in branch 'master': bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__ (GH-14545)

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

2019-07-04 Thread Riccardo Schirone
Riccardo Schirone added the comment: > > A second problem comes into the game. Some C libraries like glibc strip the > > end of the hostname (strip at the first newline character) and so HTTP > > Header injection is still possible is this case: > >

[issue36132] Python cannot access hci_channel field in sockaddr_hci

2019-07-04 Thread Barry Byford
Barry Byford added the comment: I was looking to control Bluetooth on Linux machines using the BlueZ Management API available at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/mgmt-api.txt The Bluetooth management sockets can be created by setting the hci_channel member of

[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: > So consider me +1 for deprecate in 3.8 (we can still do that, right? it's > just docs and a warning on use) and remove in 3.9 or 3.10 as appropriate. I modified my PR to deprecate the feature in Python 3.8. I'm not sure about scheduling the removal yet,

[issue37266] Daemon threads must be forbidden in subinterpreters

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset b4e68960b90627422325fdb75f463df1e4153c6e by Victor Stinner in branch 'master': bpo-37266: Add bpo number to the What's New entry (GH614584) https://github.com/python/cpython/commit/b4e68960b90627422325fdb75f463df1e4153c6e --

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: Changing dict.update() calling convention may save a few nanoseconds on d1.update(d2) call, but it will make d1.update(**d2) way slower with a complexity of O(n): d2 must be converted to 2 lists (kwnames and args) and then a new dict should be created. I

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

2019-07-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Okay, the url variable against which the regex check is made is not the full url but the path. The HTTPConnection class sets self.host [0] in the constructor which is used to send the Host header. Perhaps the regex check could be done for the host

[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-07-04 Thread Zack Weinberg
Zack Weinberg added the comment: > To be clear: this issue is NOT a bug in Python I don't think that's entirely true. I think CPython needs to be linked against libgcc_s.so, so that this class of application bugs will no longer manifest as interpreter crashes. I filed #37395 for that.

[issue33965] [Windows WSL] Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time, after year 2038

2019-07-04 Thread Franklin? Lee
Franklin? Lee added the comment: Petter S reported the issue to Microsoft, and got the response that it was already fixed in Insider Preview. https://github.com/microsoft/WSL/issues/3514 Should be fixed in Windows 10 version 1809, according to the tags here:

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14407 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14589 ___ Python tracker ___

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

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: The commit b7378d77289c911ca6a0c0afaf513879002df7d5 is incomplete: it doesn't seem to check for control characters in the "host" part of the URL, only in the "path" part of the URL. Example: --- try: from urllib import request as urllib_request except

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14406 pull_request: https://github.com/python/cpython/pull/14588 ___ Python tracker ___

[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2019-07-04 Thread Tal Einat
Tal Einat added the comment: > Looks like a black belt always on the left side, this makes me feel a bit > oppressive. This currently uses the same colors as the code-context panes, which is configurable as the "context" fg/bg colors. We might find a better name for this, or even add a

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: OK, `d1.update(**d2)` is not useful in practice. Practical usages of dict.update() are: * d.update(d2) * d.update([(k1,k2),...]) * d.update(k1=v1, k2=v2, ...) * d.update(**d2, **d3, **d4) # little abuse, but possible. In all of them, kwdict is not used at

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: You are correct that PyDict_Merge() does not need to recompute the hashes of the keys. However, your example doesn't work because you need string keys for **kwargs. The "str" class caches its hash, so you would need a dict with a "str" subclass as keys to

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: - d2 = dict(**d1) + d2 = {"fizz": "buzz"} + d2.update(**d1) -- ___ Python tracker ___ ___

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: > The unpacking is only a problem if you insist on using PyDict_Merge(). It > would be perfectly possible to implement dict merging from a tuple+vector > instead of from a dict. In that case, there shouldn't be a performance > penalty. Really? ``` class K:

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > How can we avoid unpacking dict in case of d1.update(**d2)? The unpacking is only a problem if you insist on using PyDict_Merge(). It would be perfectly possible to implement dict merging from a tuple+vector instead of from a dict. In that case, there

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Above, I meant #37207 or PR 13930. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > How can we avoid unpacking dict in case of d1.update(**d2)? We cannot. However, how common is that call? One could argue that we should optimize for the more common case of d1.update(d2). -- ___ Python tracker

[issue37421] Some tests leak temporary files

2019-07-04 Thread miss-islington
miss-islington added the comment: New changeset 957656ee1d6fb42664274ef2f440a10d26870e2a by Miss Islington (bot) in branch '3.8': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/957656ee1d6fb42664274ef2f440a10d26870e2a --

[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: Can we call tp_call instead of vectorcall when kwargs is not empty? https://github.com/python/cpython/blob/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7/Objects/call.c#L209-L219 For example, dict_init may be faster than dict_vectorcall when `d2 = dict(**d1)`.

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: How can we avoid unpacking dict in case of d1.update(**d2)? -- ___ Python tracker ___ ___

[issue22117] Rewrite pytime.h to work on nanoseconds

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14405 pull_request: https://github.com/python/cpython/pull/11636 ___ Python tracker ___

[issue37493] Use _PyObject_CallNoArg() in a few more places

2019-07-04 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-04 Thread miss-islington
miss-islington added the comment: New changeset 2d438fc0b748b64d518ea8876af3f6963c6d7d60 by Miss Islington (bot) in branch '3.7': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/2d438fc0b748b64d518ea8876af3f6963c6d7d60 --

[issue37493] Use _PyObject_CallNoArg() in a few more places

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset 7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37493: use _PyObject_CallNoArg in more places (GH-14575) https://github.com/python/cpython/commit/7f41c8e0dd237d1f3f0a1d2ba2f3ee4e4bd400a7

[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: > Same problem using Python 3.6.8 on Ubuntu 18.04 LTS. To be clear: this issue is NOT a bug in Python, but a bug in your application. You must fix your application. You can try to run it on Python 3.8 with python3.8 -X dev to get a log on the error. Good

[issue37483] Add PyObject_CallOneArg()

2019-07-04 Thread Inada Naoki
Inada Naoki added the comment: New changeset 196a530e00d88a138973bf9182e013937e293f97 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37483: add _PyObject_CallOneArg() function (#14558) https://github.com/python/cpython/commit/196a530e00d88a138973bf9182e013937e293f97 --

[issue31517] MainThread association logic is fragile

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: bpo-37416 has been marked as a duplicate of this issue. It contains snippet.py to reproduce a bug. -- ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +14404 pull_request: https://github.com/python/cpython/pull/14586 ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +14403 pull_request: https://github.com/python/cpython/pull/14585 ___ Python tracker ___

[issue37421] Some tests leak temporary files

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 by Victor Stinner in branch 'master': bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) https://github.com/python/cpython/commit/9d40554e0da09a44a8547f3f3a2b9dedfeaf7928 --

[issue37266] Daemon threads must be forbidden in subinterpreters

2019-07-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +14402 pull_request: https://github.com/python/cpython/pull/14584 ___ Python tracker ___

[issue31517] MainThread association logic is fragile

2019-07-04 Thread STINNER Victor
STINNER Victor added the comment: Python internals already know who is the "main" thread: _PyRuntime.main_thread. It's maintained up to date, even after a fork, PyOS_AfterFork_Child() calls _PyRuntimeState_ReInitThreads() which does: // This was initially set in _PyRuntimeState_Init().

[issue37461] email.parser.Parser hang

2019-07-04 Thread Marcin Niemira
Marcin Niemira added the comment: I'm terribly sorry, but I feel I won't be able to fix this issue. Sorry for fuss. Closing my PR, because it's broken. -- ___ Python tracker

[issue29312] Use FASTCALL in dict.update()

2019-07-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: For the benefit of PR 37207, I would like to re-open this discussion. It may have been rejected for the wrong reasons. Victor's patch was quite inefficient, but that's to be expected: msg285744 mentions a two-step process, but during the discussion the

[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-07-04 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: >>> b'\407' b'\x07' >>> ord(b'\407') 7 This is the object structure passed to builtin_ord(): (lldb) p *((PyBytesObject *)(c)) (PyBytesObject) $19 = { ob_base = { ob_base = { ob_refcnt = 4 ob_type = 0x0001003cb0b0 } ob_size =

[issue37495] socket.inet_aton parsing issue on some libc versions

2019-07-04 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-04 Thread Kyle Stanley
Kyle Stanley added the comment: Typo in previous comment: "test_threaded_imports.py" should be "test_threaded_import.py". -- ___ Python tracker ___

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-04 Thread Kyle Stanley
Kyle Stanley added the comment: In order to avoid the merge conflicts, I'm going to move test_threaded_imports.py and threaded_import_hangers.py in separate PRs. Here's the PR for moving test_threaded_imports.py https://github.com/python/cpython/pull/14582. --

[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-04 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +14401 pull_request: https://github.com/python/cpython/pull/14582 ___ Python tracker ___

[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2019-07-04 Thread Tal Einat
Tal Einat added the comment: Ned, thanks for taking a look! If it is decided to go forward with this then I will make sure to make the menu item state consistent with that of each window. -- ___ Python tracker