[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All three test cases are raising a VallueError now: C:\py\cpython3.8>python -c "import os; os.spawnl(os.P_WAIT, '')" Running Debug|x64 interpreter... Traceback (most recent call last): File "", line 1, in File "C:\py\cpython3.8\\lib\os.py", line 931,

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think this is explained in the below answers with example that the left most loop in the comprehension has access to the class variables which the nested comprehensions don't have https://stackoverflow.com/a/22692274/2610955

[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-07-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: >> Could this have been done with: >> setattr(self.__class__, "do_" + command, func)? > Isn't that worse than doing that on an instance? It will work > as long as there's only one. Why not have multiple classes instead of multiple instances? Then use

[issue33351] Support compiling with clang-cl on Windows

2018-07-09 Thread Ethan Smith
Ethan Smith added the comment: I just updated the PR with some more information after trying this on every VS project. It seems that clang-cl still fails on some projects/tests, but I don't think that is a big problem. I was mostly interested in getting Python core to build with clang-cl,

[issue11572] bring Lib/copy.py to 100% coverage

2018-07-09 Thread Éric Araujo
Éric Araujo added the comment: I realize now that calling self.fail at https://hg.python.org/cpython/rev/74e79b2c114a#l2.20 is a problem: self is an instance of the C class, not the TestCase instance. (The line is unreachable anyway so this doesn’t matter a lot. In other projects I’d use

[issue32523] inconsistent spacing in changelog.html

2018-07-09 Thread Julien Palard
Julien Palard added the comment: Hi Ned, what do you think about https://github.com/python/cpython/pull/8154? I feel this is a bit a huge change in NEWS entry writing policy which make them less readable (in text files). Is it really worth it to change the policy to single-paragraph only

[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2018-07-09 Thread Segev Finer
Segev Finer added the comment: This should be fixed by the Windows 10 April Update (build 1803) according to https://github.com/Microsoft/vscode/issues/36630. -- ___ Python tracker

[issue34078] Broken CRL functionality in ssl.py

2018-07-09 Thread Christian Heimes
Christian Heimes added the comment: Cert revocation check is working fine for me. I've attached a demo script that uses badssl.com: $ curl -O http://crl3.digicert.com/ssca-sha2-g5.crl $ openssl crl -in ssca-sha2-g5.crl -inform DER -out ssca-sha2-g5.pem.crl -outform PEM $ python3.7

[issue11572] bring Lib/copy.py to 100% coverage

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Brandon. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker

[issue11572] bring Lib/copy.py to 100% coverage

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset 2708578736d1aa15685495e9b94b827a8e185a8c by Berker Peksag in branch 'master': bpo-11572: Make minor improvements to copy module (GH-8208) https://github.com/python/cpython/commit/2708578736d1aa15685495e9b94b827a8e185a8c --

[issue11572] bring Lib/copy.py to 100% coverage

2018-07-09 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +7757 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Joshua! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2018-07-09 Thread miss-islington
miss-islington added the comment: New changeset 22fb674fa4c8343c84c25d93f23a1d6315d0f4f5 by Miss Islington (bot) in branch '3.7': bpo-24459: Document missing env variables in python.man (GH-4142) https://github.com/python/cpython/commit/22fb674fa4c8343c84c25d93f23a1d6315d0f4f5 --

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2018-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +7756 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: New changeset 9863de0355caf23c44b708a5d68b603e135f7ae9 by Berker Peksag in branch 'master': bpo-24459: Document missing env variables in python.man (GH-4142) https://github.com/python/cpython/commit/9863de0355caf23c44b708a5d68b603e135f7ae9 --

[issue34078] Broken CRL functionality in ssl.py

2018-07-09 Thread Joe N
New submission from Joe N : CRLs in ssl.py or at the documentation is broken. Specifically I think the documentation here is wrong: https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_verify_locations Here is a stackoverflow post:

[issue22689] Posix getenv makes no guarantee of lifetime of returned string

2018-07-09 Thread miss-islington
miss-islington added the comment: New changeset 6f4fbf8ea428e13959a7aaba0ac9725ed407752a by Miss Islington (bot) in branch '3.7': bpo-22689: Copy the result of getenv() in sys_breakpointhook(). (GH-8194) https://github.com/python/cpython/commit/6f4fbf8ea428e13959a7aaba0ac9725ed407752a

[issue22689] Posix getenv makes no guarantee of lifetime of returned string

2018-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +7755 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22689] Posix getenv makes no guarantee of lifetime of returned string

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f60bf0e168255b7675a4c049250ba6b202f8e647 by Serhiy Storchaka in branch 'master': bpo-22689: Copy the result of getenv() in sys_breakpointhook(). (GH-8194) https://github.com/python/cpython/commit/f60bf0e168255b7675a4c049250ba6b202f8e647

[issue33944] Deprecate and remove pth files

2018-07-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 5, 2018, at 14:23, Ivan Pozdeev wrote: > > Ivan Pozdeev added the comment: > >> They are very difficult to debug because they're processed too early. > > .pth's are processed by site.py, so no more difficult than site/sitecustomize. > You can e.g.

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

2018-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: Of course, that's what I meant. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2018-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: > We should warn against this in the docs right away (and backport the warning > to all previous versions that have set_executor). I think we'll only allow instances of c.f.ThreadPoolExecutor (and its subclasses) to be passed to set_default_executor.

[issue31353] Implement PEP 553 - built-in breakpoint()

2018-07-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It's a convenient API. I think originally I may have just don't effectively a getattr on the imported module, but I don't remember (and don't have original implementation handy - thanks, rebase!) I don't have particularly strong feelings on the matter.

[issue32933] mock_open does not support iteration around text files.

2018-07-09 Thread Anthony Flury
Anthony Flury added the comment: But the __next__ is a method on the iterator; So long as __iter__ returns a valid iterator (which it does in my pull request), it will by definition support __next___ Although it is entirely possible that I have misunderstood what you are saying.

[issue34077] doc Be explicit about mock_open created mocks not supporting __iter__

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: There is also bpo-32933. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32933] mock_open does not support iteration around text files.

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: This is basically a duplicate of bpo-21258, but I haven't closely look at the patches in both issues yet. We should probably consider adding support for __next__ as well. -- nosy: +berker.peksag ___ Python tracker

[issue34077] doc Be explicit about mock_open created mocks not supporting __iter__

2018-07-09 Thread Berker Peksag
Berker Peksag added the comment: -1. We can't document every non-existent feature in the stdlib documentation. There is an already open issue for adding __iter__ support to mock_open(): Issue 21258 -- nosy: +berker.peksag resolution: -> rejected stage: patch review -> resolved

[issue34073] asyncio and ProcessPoolExecutor: OSError on loop.close()

2018-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: We plan to deprecate and later prohibit setting ProcessPoolExecutor as the default executor. See https://bugs.python.org/issue34075 for more details. -- resolution: -> remind stage: -> resolved status: open -> closed

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

2018-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: Great! Thanks for the quick reply, Guido. -- ___ Python tracker ___ ___ Python-bugs-list mailing

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

2018-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, that's a good idea. It was never meant for a ProcessPoolExecutor. We should warn against this in the docs right away (and backport the warning to all previous versions that have set_executor). I also support non-silent deprecation in 3.8.

[issue34074] Asyncio breaks coroutine finalization process

2018-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: > To make example more practical, let's change `loop.stop()` to `raise > KeyboardInterrupt()`. Program stops without calling `close()` Try to use the new `asyncio.run()` function (in Py 3.7) -- ___ Python tracker

[issue34077] doc Be explicit about mock_open created mocks not supporting __iter__

2018-07-09 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +7753 stage: -> patch review ___ Python tracker ___ ___

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Joe Jevnik
Change by Joe Jevnik : -- pull_requests: +7754 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eeaae26ce5abce56292330c29459337d6bd57aaf by Serhiy Storchaka in branch '3.6': [3.6] bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159) (GH-8198)

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34074] Asyncio breaks coroutine finalization process

2018-07-09 Thread Andriy Maletsky
Andriy Maletsky added the comment: I meant that my example is a complete python script, and after `loop.run_forever()` the interpreter stops. So I expected every python object to be destructed on interpreter shutdown, but coro's `close()` is not called. To make example more practical, let's

[issue34077] doc Be explicit about mock_open created mocks not supporting __iter__

2018-07-09 Thread Andrés Delfino
New submission from Andrés Delfino : I've been bitten by this one, and while the docs are clear in what the created mock objects support, I think something explicit about __iter__ will help. -- assignee: docs@python components: Documentation messages: 321327 nosy: adelfino, docs@python

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-09 Thread Jan Christoph
New submission from Jan Christoph : The python code: ``` class _tri(object): infts = '(+/-)inf, (+/-)infty, (+/-)infinity' strange_failing = {x+s.replace('(+/-)',''):None for x in ('+','-','') for s in infts.split(', ')} ``` gives a `global name 'infts' is not defined` exception,

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

2018-07-09 Thread Yury Selivanov
New submission from Yury Selivanov : I've had a few conversations with people who were confused that asyncio starts to behave weirdly when a ProcessPoolExecutor is set as the default one. We don't really test that asyncio's built-in functionality (like DNS resolving) works well with a

[issue34074] Asyncio breaks coroutine finalization process

2018-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: There's no bug here. `loop.stop()` simply stops the loop, all running tasks are just paused. You can re-run the same loop, and the `work()` task will resume. In other words, `loop.stop()` does not trigger task cancellation, therefore it does not throw in

[issue34067] Problem with contextlib.nullcontext

2018-07-09 Thread miss-islington
miss-islington added the comment: New changeset 1b6e21730417c56748d500a96cafebbaa1bd0120 by Miss Islington (bot) in branch '3.7': bpo-34067: Include a more easily understood example for nullcontext (GH-8158) https://github.com/python/cpython/commit/1b6e21730417c56748d500a96cafebbaa1bd0120

[issue34074] Asyncio breaks coroutine finalization process

2018-07-09 Thread Andriy Maletsky
New submission from Andriy Maletsky : Source: https://stackoverflow.com/q/51245011/6275324 Asyncio somehow breaks coroutine finalization. I believe there may be a bug in C implementation (_asyncio) of tasks or futures. Reproducible within version 3.7.0@python:3.7 docker container. Consider

[issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings

2018-07-09 Thread miss-islington
miss-islington added the comment: New changeset 80a5f04592f7d732a541d5c35a1be1e9a6472ecb by Miss Islington (bot) in branch '3.7': bpo-28626: rearrange discussion of output formatting to encourage f-strings (GH-6036)

[issue34067] Problem with contextlib.nullcontext

2018-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +7752 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34067] Problem with contextlib.nullcontext

2018-07-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset c287545d62edf1a1ee65727d3c57befa8c99c13a by Nick Coghlan (Daniel Porteous) in branch 'master': bpo-34067: Include a more easily understood example for nullcontext (GH-8158)

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2018-07-09 Thread Nick Coghlan
Nick Coghlan added the comment: While Greg Smith and I both cringed at the idea when I first raised it, I'm becoming more and more convinced that the only way we're going to be able to make resource cleanup reliable is for with statements to have the ability to disable signal handling while

[issue31623] Build MSI installer for 3.4 security releases on Windows

2018-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Larry answered on pydev. -- resolution: -> wont fix stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread miss-islington
miss-islington added the comment: New changeset f5197ddfd0f2c5da848af57196448810bd18bb82 by Miss Islington (bot) in branch '3.7': bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159)

[issue34067] Problem with contextlib.nullcontext

2018-07-09 Thread Daniel Porteous
Change by Daniel Porteous : -- keywords: +patch pull_requests: +7751 stage: -> patch review ___ Python tracker ___ ___

[issue34072] 3.7.0 Windows embeddable zip vcruntime140.dll

2018-07-09 Thread Steve Dower
Steve Dower added the comment: It's deliberate (and documented, IIRC). You should include the C and C++ runtimes in your application installer. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7750 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +7749 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34066] Possible resource warning in "with open()"

2018-07-09 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 3f4d90d4d72921f16babd3f52d7df804916af224 by Nick Coghlan (Serhiy Storchaka) in branch 'master': bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159)

[issue33305] Improve syntax error for numbers with leading zero

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-09 Thread INADA Naoki
INADA Naoki added the comment: Signature mismatch should raise TypeError, not IndexError. I think this should be backported to 3.6 and 3.7. -- nosy: +inada.naoki versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue33305] Improve syntax error for numbers with leading zero

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cf7303ed2aa19fb48687d7140dbc86fc23c9fca4 by Serhiy Storchaka in branch 'master': bpo-33305: Improve SyntaxError for invalid numerical literals. (GH-6517) https://github.com/python/cpython/commit/cf7303ed2aa19fb48687d7140dbc86fc23c9fca4

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b1e6e5615a8e82fcf569368fac5c5b0385929855 by Serhiy Storchaka in branch '2.7': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8196)

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d73497ba52171bc8f786a70ecf50d3104b596221 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8195)

[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-09 Thread Matej Cepl
Matej Cepl added the comment: > On Fedora after the fix we had also to BuildRequire libnsl2-devel and > libtirpc-devel after the glibc change was implemented for the correct headers > to be included within the buildroot. libnsl-devel requires libtirpc-devel here, so that isn't the issue.

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7748 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +7747 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7c43b801503c802ed6ea4b811f5bc73791249d94 by Serhiy Storchaka in branch '3.7': [3.7] bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193)

[issue22689] Posix getenv makes no guarantee of lifetime of returned string

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +7746 stage: -> patch review ___ Python tracker ___ ___

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2018-07-09 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Real world example where this actually came up: https://github.com/jupyter-widgets/ipywidgets/issues/430#issuecomment-247016263 -- nosy: +jdemeyer ___ Python tracker

[issue31353] Implement PEP 553 - built-in breakpoint()

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it needed to specify the fromlist argument for PyImport_ImportModuleLevelObject()? The only effect of this is that Python will try to import the hook as a submodule if it is not an attribute of the parent module. But I think that callable modules is

[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2018-07-09 Thread Błażej Michalik
Błażej Michalik added the comment: It seems to me as if the current implementation forces the user to violate SRP, but I'm not going to argue about that. I don't feel equipped well enough to judge. > Could this have been done with: setattr(self.__class__, "do_" + command, > func)? Isn't

[issue24665] CJK support for textwrap

2018-07-09 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Terry. I have doubt about "east asian width" support should be merged. While I agree it is "better than nothing", it may make textwrap much slower. But I didn't have courage to reject the PR. Textwrap focused on ASCII and English-like (space separated)

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7745 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD and NetBSD

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After fixing platform.libc_ver() in issue26544 we can use it for conditional skipping this assertion depending on the libc version. -- versions: +Python 3.8 ___ Python tracker

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2a9b8babf0d09946ebebfdb2931cc0d3db5a1d3d by Serhiy Storchaka in branch 'master': bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684) https://github.com/python/cpython/commit/2a9b8babf0d09946ebebfdb2931cc0d3db5a1d3d --

[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +7744 stage: test needed -> patch review ___ Python tracker ___ ___

[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

2018-07-09 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core versions: +Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker ___

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2018-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to convert your patch into a pull request Joe? -- ___ Python tracker ___ ___