[issue37503] Queue.join(): Broken example in documentation

2019-07-05 Thread Marco Dickert
New submission from Marco Dickert : I guess I found a bug in the documented Queue.join() example [1]. The problem is the break condition for the while loop of the worker. If the item is None, the loop breaks, but the worker never calls item.task_done(). Thus the q.join() statement never retur

[issue37503] Queue.join(): Broken example in documentation

2019-07-05 Thread Marco Dickert
Marco Dickert added the comment: Sorry, I missed that q.join() is executed *before* the "None" item is added to the queue. In my real-world case I called q.join() *after* I added the "None" item. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1da4462765b084dfa8d869b6cb5855e8f6014a11 by Victor Stinner in branch 'master': bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) https://github.com/python/cpython/commit/1da4462765b084dfa8d869b6cb5855e8f6014a11 -- __

[issue37346] Documentation of os not using OSError subclasses

2019-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +14411 pull_request: https://github.com/python/cpython/pull/14596 ___ Python tracker ___ __

[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +14412 pull_request: https://github.com/python/cpython/pull/14598 ___ Python tracker ___ __

[issue37346] Documentation of os not using OSError subclasses

2019-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +14413 pull_request: https://github.com/python/cpython/pull/14597 ___ Python tracker ___ __

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

2019-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure that changes in compile.c are needed now. Python/Python-ast.c is generated file. And perhaps it would be better to fix CST instead of AST. -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: patch review -> needs patch ve

[issue37499] test_gdb.test_pycfunction should use dedicated test functions

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: > Per Victor's suggestion in GH-14330, I think we should expose a few test > functions in the `testcapi` module as exemplars of their respective calling > conventions and use those, rather than arbitrary builtins. I suggest to write functions which return th

[issue37499] test_gdb.test_pycfunction should use dedicated test functions

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: By the way, PyObject_CallFunction("O") has a surprising behavior: if you pass a tuple, the tuple is unpacked, whereas any other type is passed directly. See bpo-28977. I would prefer to fix the API since it caused severe bugs in the past, like asyncio gener

[issue37346] Documentation of os not using OSError subclasses

2019-07-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks! -- nosy: +asvetlov resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-05 Thread miss-islington
miss-islington added the comment: New changeset b4cd6ba1a028c2624ac7bc93439b9d45f51cfeba by Miss Islington (bot) in branch '3.8': bpo-37481: Deprecate distutils bdist_wininst command (GH-14553) https://github.com/python/cpython/commit/b4cd6ba1a028c2624ac7bc93439b9d45f51cfeba -- nosy

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: The following commit introduced a reference leak: commit 196a530e00d88a138973bf9182e013937e293f97 Author: Jeroen Demeyer Date: Thu Jul 4 12:31:34 2019 +0200 bpo-37483: add _PyObject_CallOneArg() function (#14558) Example: https://buildbot.python.org

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

2019-07-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +levkivskyi, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

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

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: Pablo, Ivan: this old bug is able CST and AST, things that you know. You may want to have a look ;-) Note: This bug is discussed in https://twitter.com/cfbolz/status/1146866203975139328 -- nosy: +vstinner ___ Pyt

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +14414 pull_request: https://github.com/python/cpython/pull/14599 ___ Python tracker ___ _

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

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

[issue37463] ssl.match_hostname() ignores extra string after a space in IPv4 address

2019-07-05 Thread STINNER Victor
Change by STINNER Victor : -- title: socket.inet_aton IP parsing issue in ssl.match_hostname -> ssl.match_hostname() ignores extra string after a space in IPv4 address ___ Python tracker

[issue37463] ssl.match_hostname() ignores extra string after whitespace in IPv4 address

2019-07-05 Thread Christian Heimes
Change by Christian Heimes : -- title: ssl.match_hostname() ignores extra string after a space in IPv4 address -> ssl.match_hostname() ignores extra string after whitespace in IPv4 address ___ Python tracker ___

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14415 pull_request: https://github.com/python/cpython/pull/14600 ___ Python tracker ___ __

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

2019-07-05 Thread Aivar Annamaa
Aivar Annamaa added the comment: > in my opinion the col_offsets of the two nodes should be 1 and 3, > respectively (the positions of the operators) This would not match the documentation: > one can get the source segment of a one-line expression node using > source_line[node.col_offset : n

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

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: January 2019, Florian Weimer created the issue "Deprecate inet_addr, inet_aton" in glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=24111 inet_aton() ignores extra string "for historic reasons". More info at: https://sourceware.org/bugzilla/show_bug.cgi?

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread Matthias Klose
New submission from Matthias Klose : 3.8 b2 now requires sphinx2 (according to SilentGhost on IRC), but only has documented 1.8. I'm aware of issue #36007, the last time that the requirements were bumped. So again, the dependencies were bumped without documenting, and why do we require the l

[issue37463] ssl.match_hostname() ignores extra string after whitespace in IPv4 address

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: > inet_aton accepts trailing characterrs after a valid IP ( https://bugzilla.redhat.com/show_bug.cgi?id=1347549). There is a little bit of confusion between getaddrinfo() and inet_aton() here (https://bugzilla.redhat.com/show_bug.cgi?id=1347549 is about getad

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

2019-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > in my opinion the col_offsets of the two nodes should be 1 and 3, > respectively (the positions of the operators) Such change was committed once, but it was quickly reverted because it was not well discussed and contradicts the documentation. --

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

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

2019-07-05 Thread Carl Friedrich Bolz
Carl Friedrich Bolz added the comment: OK, fair enough. That means right now there is no way to find the position of the operator using the ast module at the moment, correct? -- ___ Python tracker _

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread SilentGhost
Change by SilentGhost : -- nosy: +SilentGhost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

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

2019-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is between the end position of the left operand and the start position of the right operand. -- ___ Python tracker ___

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread Matthias Klose
Matthias Klose added the comment: so this might not be a sphinx 2.x issue, the docs build fine for the html output, but the reported error is for building the texinfo files: make -C Doc texinfo That worked for 3.8 b1. -- ___ Python tracker

[issue37495] [CVE-2016-10739] socket.inet_aton parsing issue on some libc versions

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: I take the freedom of assigning CVE-2016-10739 to this Python issue, even if CVE-2016-10739 was reported to the glibc (not to Python). "In the GNU C Library (aka glibc or libc6) through 2.28, the getaddrinfo function would successfully parse a string that co

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

2019-07-05 Thread Christian Heimes
Christian Heimes added the comment: CVE-2016-10739 was filed against glibc. We cannot re-use a CVE number from another product in CPython. You can only reference that a CVE causes a security bug. -- title: [CVE-2016-10739] socket.inet_aton parsing issue on some libc versions -> sock

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: INADA-san, Jeroen: hum, you both proposed a similar fix :-) One fix is enough. See my review on PR 14600. -- ___ Python tracker ___

[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: The initial issue has been fixed. Let's continue the discussion in the Packaging forum: https://discuss.python.org/t/deprecate-bdist-wininst/1929 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 __

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Jeroen: hum, you both proposed a similar fix :-) It seems that I lost the race ;-) But seriously: if we both independently came up with the same solution, that's a good sign that the solution is correct. -- ___

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread Inada Naoki
Inada Naoki added the comment: New changeset 6e43d07324ca799118e805751a10a7eff71d5a04 by Inada Naoki (Jeroen Demeyer) in branch 'master': bpo-37483: fix reference leak in _PyCodec_Lookup (GH-14600) https://github.com/python/cpython/commit/6e43d07324ca799118e805751a10a7eff71d5a04 --

[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-07-05 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37505] Early auditing broken

2019-07-05 Thread Christian Heimes
New submission from Christian Heimes : I think that commit 838f26402de82640698c38ea9d2be65c6cf780d6 / bpo-36710 broke auditing for early events. I'm no longer seeing early events like cpython.PyInterpreterState_New. The first event is an import event without interpreter state. -- com

[issue37483] Add PyObject_CallOneArg()

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the quick fix ;-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

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

2019-07-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: One thing that keeps bothering me when using vectorcall for type.__call__ is that we would have two completely independent code paths for constructing an object: the new one using vectorcall and the old one using tp_call, which in turn calls tp_new and tp_in

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

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: One solution would to be reimplement socket.inet_aton() with inet_pton() internally. inet_pton() is well specified and standard (POSIX). inet_aton() is not ("inet_aton() is not specified in POSIX.1, but is available on most systems." says its Linux manual p

[issue36974] Implement PEP 590

2019-07-05 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 0d722f3cd602e5f5492f9c65c8af57ea9d3743b6 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: separate vectorcall functions for each calling convention (GH-13781) https://github.com/python/cpython/commit/0d722f3cd602e5f5492f9c65c8af57

[issue36974] Implement PEP 590

2019-07-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Any objections to closing this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

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

2019-07-05 Thread Christian Heimes
Christian Heimes added the comment: > inet_pton() requires an address family. Should we iterate on all supported > address families until one works? No, that is not necessary. inet_aton() only accepts IPv4 addresses. Therefore an emulation with inet_pton() would look like this: >>> import f

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

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: Attached inet_aton_pton.py is a proof-of-concept which reimplements inet_aton() using inet_pton(). It supports a.b.c.d, a.b.c, a.b and a formats. I'm not sure which exception should be raised in case of parsing error. socket.inet_aton() raises OSError"illega

[issue37421] Some tests leak temporary files

2019-07-05 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +14416 pull_request: https://github.com/python/cpython/pull/14601 ___ Python tracker ___ __

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

2019-07-05 Thread Ned Batchelder
Ned Batchelder added the comment: Since this was backported to 3.7 but not yet released, I'm adding 3.7regression. -- keywords: +3.7regression ___ Python tracker ___ _

[issue37421] Some tests leak temporary files

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: ./python -u -m test test_multiprocessing_spawn -R 3:3 still fail: ERROR: test_context (test.test_multiprocessing_spawn.TestStartMethod) ERROR: test_set_get (test.test_multiprocessing_spawn.TestStartMethod) PR 14601 fix these tests when test_multiprocessing_sp

[issue37149] link to official documentation tkinter failed !!!

2019-07-05 Thread Guilloux
Change by Guilloux : -- versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue37505] Early auditing broken

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: Oh. How can I reproduce this issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue37505] Early auditing broken

2019-07-05 Thread Christian Heimes
Christian Heimes added the comment: 3.8.0b1 is also broken, so it may have been a different commit. I'm sure that I was able to see interpreter initialization with dtrace hooks. # audit.stp probe process("/usr/lib64/libpython3.8.*").provider("python").mark("audit") { printf("%s\n", user_s

[issue37506] os.mkdir creates invalid folder when path string has trailing space and slash

2019-07-05 Thread Holly
New submission from Holly : If we use os.mkdir to create a folder as follows: os.mkdir("C:/test /") Then we successfully create a folder with name "test ". This folder can be accessed normally, but it cannot be renamed or deleted. Instead we get the following error message: Could not f

[issue36974] Implement PEP 590

2019-07-05 Thread Petr Viktorin
Petr Viktorin added the comment: Buildbots are green, closing. Thank you for the implementation! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue37421] Some tests leak temporary files

2019-07-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +14417 pull_request: https://github.com/python/cpython/pull/14602 ___ Python tracker ___ __

[issue37421] Some tests leak temporary files

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8fbeb14312b4c1320d31ad86e69749515879d1c3 by Victor Stinner in branch 'master': bpo-37421: multiprocessing tests now stop ForkServer (GH-14601) https://github.com/python/cpython/commit/8fbeb14312b4c1320d31ad86e69749515879d1c3 -- __

[issue1875] "if 0: return" not raising SyntaxError

2019-07-05 Thread Ned Deily
Ned Deily added the comment: See also discussion in Issue37500. -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mail

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

2019-07-05 Thread Ned Deily
Ned Deily added the comment: How serious a regression is this? We still have time to revert the 3.7 commit of Issue1875 (85ed1712e428f93408f56fc684816f9a85b0ebc0) from 3.7.4 final if we act immediately. -- nosy: +ned.deily versions: +Python 3.7 _

[issue37507] multiprocessing: Add a stop() method to ForkServer

2019-07-05 Thread STINNER Victor
New submission from STINNER Victor : While working on bpo-37421, I fixed multiprocessing tests to explicitly call _run_finaliers(), so temporary directories are removed: New changeset 039fb49c185570ab7b02f13fbdc51c859cfd831e by Victor Stinner in branch 'master': bpo-37421: multiprocessing tes

[issue37421] Some tests leak temporary files

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: I created a follow-up issue: bpo-37507 "multiprocessing: Add a stop() method to ForkServer". -- ___ Python tracker ___ _

[issue37505] Early auditing broken

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: I don't see how the first call to PyInterpreterState_New() can be audited: PySys_Audit() builds a tuple to call hooks, but there is no interpreter yet, so we cannot even build tuples. Are you talking about the "main" interpreter, or sub-interpreters? I'm su

[issue37506] os.mkdir creates invalid folder when path string has trailing space and slash

2019-07-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: > it would be better for an exception to be thrown rather than creating a > corrupt folder. I am not convinced that Python should refuse to create a perfectly valid directory because some components of Windows sometimes have trouble resolving the pathname

[issue23312] google thinks the docs are mobile unfriendly

2019-07-05 Thread Ned Deily
Change by Ned Deily : -- nosy: +mdk versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs

[issue37421] Some tests leak temporary files

2019-07-05 Thread miss-islington
miss-islington added the comment: New changeset 229f6e85f8b4d57a2e742e0d3fc361c5bd15f1cb by Miss Islington (bot) in branch '3.8': bpo-37421: multiprocessing tests now stop ForkServer (GH-14601) https://github.com/python/cpython/commit/229f6e85f8b4d57a2e742e0d3fc361c5bd15f1cb -- ___

[issue37151] Calling code cleanup after PEP 590

2019-07-05 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +14418 pull_request: https://github.com/python/cpython/pull/14603 ___ Python tracker ___ __

[issue37508] A wrong return type in memory.rst

2019-07-05 Thread hai shi
New submission from hai shi : the result should be a bytes object in #L70 in https://github.com/python/cpython/blob/master/Doc/c-api/memory.rst -- assignee: docs@python components: Documentation messages: 347356 nosy: docs@python, shihai1991 priority: normal severity: normal status: op

[issue37508] A wrong return type in memory.rst

2019-07-05 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14419 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14604 ___ Python tracker ___

[issue37505] Early auditing broken

2019-07-05 Thread Steve Dower
Steve Dower added the comment: Yeah, at some point we had to add an initialization check to the audit calls because of the tuple, so it essentially became a subinterpreter event but not the main one. But I thought the dtrace call happened before that check? Looking through the linked commit

[issue37505] Early auditing broken

2019-07-05 Thread STINNER Victor
STINNER Victor added the comment: PySys_Audit() exit immediately if ts=NULL: /* Early exit when no hooks are registered */ if (!should_audit(ts)) { return 0; } It exits before calling: /* Dtrace USDT point */ if (dtrace) { PyDTrace_AUDIT(event, (void *)eve

[issue37151] Calling code cleanup after PEP 590

2019-07-05 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 7b57c03a7cb63ccfb2b8dfa82a1bf169268d80ba by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-37151: remove _PyMethodDef_RawFastCall* functions (GH-14603) https://github.com/python/cpython/commit/7b57c03a7cb63ccfb2b8dfa82a1bf169268d80ba --

[issue37505] Early auditing broken

2019-07-05 Thread Christian Heimes
Christian Heimes added the comment: The hooks are about auditing the behavior of an interpreter. It's not strictly tight to some attack scenario. I would find it useful to either get back the old behavior or to have some sort of event, which indicates the start of the auditing log.

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread Dmitry Shachnev
Change by Dmitry Shachnev : -- nosy: +mitya57 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Brett Cannon
Brett Cannon added the comment: Bit surprised by the test_importlib failure. What has crept into there that requires docstrings? -- nosy: +brett.cannon ___ Python tracker ___

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

2019-07-05 Thread Ned Batchelder
Ned Batchelder added the comment: The real-word implications from my world are this: if your code has "if 0:" clauses in it, and you measure its coverage, then because the lines have not been optimized away, coverage.py will think the lines are a possible execution path, and will be consider

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Eric V. Smith
Eric V. Smith added the comment: Also surprised by the marked dataclasses tests. I don't see anything there that requires docstrings. See my review on the PR. -- ___ Python tracker _

[issue37509] OSError preadv()

2019-07-05 Thread YoSTEALTH
New submission from YoSTEALTH : import os import ctypes # Stdlib # -- def test_preadv_stdlib(path): fd = os.open(path, os.O_RDWR | os.O_CREAT) buffer = bytearray(10) buffers = [buffer] try: length = os.preadv(fd, buffers, 0, os.RWF_NOWAIT) # OSError: [Errno 9

[issue30090] Failed to build these modules: _ctypes

2019-07-05 Thread hai shi
hai shi added the comment: In centos, `sudo yum install -y libffi libffi-devel` should worked -- nosy: +shihai1991 ___ Python tracker ___ _

[issue37506] os.mkdir creates invalid folder when path string has trailing space and slash

2019-07-05 Thread Steve Dower
Steve Dower added the comment: Yeah, I'd rather not do this level of validation in Python. If Windows decides to reject or automatically correct this, fine, but Python is just being a thin layer over the operating system here. We shouldn't try and prevent things that the OS allows.

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

2019-07-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +14420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14605 ___ Python tracker __

[issue37476] Adding a unit test of unicode in test_unicode.py

2019-07-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

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

2019-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ned, I have prepared PR14605 for the 3.7 branch to revert 85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior in the 3.7 series, I think is the best course of action for 3.7. For 3.8 the proposed way to do this is not using

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

2019-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ned, I have prepared PR14605 for the 3.7 branch to revert 85ed1712e428f93408f56fc684816f9a85b0ebc0. As this is somehow changing behavior in the 3.7 series, I think is the best course of action for 3.7. For 3.8 the proposed way to do this is now using

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

2019-07-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg347367 ___ Python tracker ___ ___ Python-bugs-list

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

2019-07-05 Thread miss-islington
miss-islington added the comment: New changeset 7d93effeb4f8e86dfa283f2376ec5362275635c6 by Miss Islington (bot) (Pablo Galindo) in branch '3.7': [3.7] bpo-37500: Revert commit 85ed1712e428f93408f56fc684816f9a85b0ebc0 (GH-14605) https://github.com/python/cpython/commit/7d93effeb4f8e86dfa283f

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

2019-07-05 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: I think the attached patch fixes the problem. Will create a pull request soon. -- versions: +Python 3.5 -Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48458/binop-offset.patch _

[issue37478] Docs: Method os.chdir() does not mention errors that can be raised

2019-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: > what exactly is the standard for mentioning errors My impression is that there is none, or that it is inconsistent, but that the trend is to say more. If you want to followup, check the documentation chapters of the devguide, and if there is nothing clear

[issue37504] 3.8 b2 now requires sphinx2, but only has documented 1.8

2019-07-05 Thread Dmitry Shachnev
Change by Dmitry Shachnev : -- keywords: +patch pull_requests: +14421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14606 ___ Python tracker ___

[issue37504] Documentation fails to build when using Sphinx' texinfo builder

2019-07-05 Thread Dmitry Shachnev
Change by Dmitry Shachnev : -- title: 3.8 b2 now requires sphinx2, but only has documented 1.8 -> Documentation fails to build when using Sphinx' texinfo builder ___ Python tracker __

[issue37496] Support annotations in signature strings.

2019-07-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

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

2019-07-05 Thread Ned Batchelder
Ned Batchelder added the comment: I don't know what you mean by, "it should not be rely upon." Are you saying that in 3.8 you want to keep the lines in the compiled bytecode? Do you understand the implications for coverage measurement? -- ___ Py

[issue37487] PyList_GetItem() document regarding index

2019-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Good catch. (In the future, try to include the url, as below.) The full sentence in question, at https://docs.python.org/3/c-api/list.html#c.PyList_GetItem, is "The position must be positive, indexing from the end of the list is not supported." 'positive'

[issue37369] Issue with pip in venv on Powershell in Windows

2019-07-05 Thread Paul Moore
Paul Moore added the comment: On Thu, 27 Jun 2019 at 18:08, Steve Dower wrote: > However, it does mean that we need to start reporting a sys.executable that > is not inside sys.prefix, and I'm not sure whether that is a good idea. > > Looking at venv (+Vinay for confirmation here), it seems t

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

2019-07-05 Thread Stefan Behnel
Stefan Behnel added the comment: > it should not be rely upon IMHO, the correct behaviour under coverage analysis is to keep the code and not discard it. After all, it is code that exists, and that is not being executed, so it should count as uncovered code. The fact that some Python version

[issue37369] Issue with pip in venv on Powershell in Windows

2019-07-05 Thread Steve Dower
Steve Dower added the comment: > I'm pretty sure there is code in the wild that expects / > python.exe to be the Python executable (when you're not in a virtual > environment) ... for example, when getting > sys.prefix from the registry (um, I don't think that's right, as the > executable path

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

2019-07-05 Thread Ned Batchelder
Ned Batchelder added the comment: I can see the logic of the argument that says the code exists, and should be measured. But this is changing behavior that has been in place for at least 15 years. Before this change, code could have had an unreported SyntaxError, but it was code that was b

[issue37510] argparse removing more "--" than it should

2019-07-05 Thread Jorge L. Martinez
New submission from Jorge L. Martinez : $ python -c ' import argparse p = argparse.ArgumentParser() p.add_argument("first_arg") p.add_argument("args", nargs="*") r = p.parse_args(["foo", "--", "bar", "--", "baz", "--", "zap"]) print(r.first_arg + " " + " ".join(r.args)) '

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

2019-07-05 Thread Carl Friedrich Bolz-Tereick
Change by Carl Friedrich Bolz-Tereick : -- pull_requests: +14423 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14607 ___ Python tracker __

[issue37511] mmap module add OpenBSD MADV_CONCEAL flag

2019-07-05 Thread David Carlier
Change by David Carlier : -- nosy: David Carlier priority: normal pull_requests: 14424 severity: normal status: open title: mmap module add OpenBSD MADV_CONCEAL flag versions: Python 3.9 ___ Python tracker __

[issue37510] argparse removing more "--" than it should

2019-07-05 Thread Jorge L. Martinez
Jorge L. Martinez added the comment: Sorry, I forgot to add details on my machine. Python: 3.7.3 OS: Archlinux -- ___ Python tracker ___ _

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

2019-07-05 Thread Ned Batchelder
Ned Batchelder added the comment: To add to the confusion, the treatment of "if __debug__:" and "if not __debug__:" is now asymmetric: Here is debug.py: import dis import sys print(sys.version) def f(): if __debug__: print("debug") else: print("not debug") if not

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

2019-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >Before this change, code could have had an unreported SyntaxError, but it was >code that was being discarded by the optimizer anyway if __debug__ can a valid form of if 0 and therefore any syntax error will not be reported until that branch becomes t

  1   2   >