[issue32690] Return function locals() in order of creation?

2018-01-29 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- pull_requests: +5272 stage: resolved -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue29571] test_re is failing when local is set for `en_IN`

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I've also added Matthias and Barry to the cc list, in case this does turn out to be a Debian or Ubuntu specific quirk. Restating the problem, the issue is that test_locale_flag in test_re may fail for at least the en_IN locale, and

[issue32703] 'async with' somehow suppresses unawaited coroutine warnings

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Ah, and in my REPL example, the NameError was pending when the internal result storage was getting set back to None. I'm not sure I even knew the "Don't complain when an exception is pending" check existed, so it would have

[issue32703] 'async with' somehow suppresses unawaited coroutine warnings

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Looking at the ceval code, I think Yury's theory is plausible, and we may also be leaving the interpreter's internal stack in a dubious state. Things then get cleaned up if you wrap the async with in a try/except or try/f

[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: A warning I'm sometimes seeing currently on successful test runs is as follows: -- /home/ncoghlan/devel/cpython/Lib/multiprocessing/semaphore_tracker.py:55: UserWarning: semaphore_tracker: process died unexpectedly, relaunching.

[issue29571] test_re is failing when local is set for `en_IN`

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Hmm, this actually works for me on Fedora 27 even if I go back to 1b3d88eb33085e90af729c4c2f78b5ba1b942b1e, the commit just before the initially merged (and subsequently reverted) test change above. Unassigning, since I can't r

[issue29571] test_re is failing when local is set for `en_IN`

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Hmm, even though we reverted the original test_re based change, and the initial attempted fix for bpo-20087 was also reverted, I'm still not currently seeing the failure for: LANG=en_IN.utf8 ./python -m test -v test_re I d

[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks for the patches, Sanyam & Nitish, and for the original bug report Mayank. Thanks also to Cheryl for nudging us to get it resolved :) -- resolution: -> fixed stage: patch review -> resolved status

[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset b3b4b81d0147534151941105eba4af984acdc763 by Nick Coghlan (Miss Islington (bot)) in branch '3.6': bpo-32685: Improve suggestion for print statement (GH-5380) https://github.com/python/cpython/

[issue29120] Move hash randomisation initialisation out of Python/random.c

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Aye, but the reason they're here rather than in the os module where you might otherwise expect to find them is because the hash randomization bootstrapping needs them. -- ___ Python tracke

[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- stage: patch review -> backport needed ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32685] Erroneous suggestion in print statement

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 43c0f1ac5ed8bc9c3bd048d2ce4de4c98a83de99 by Nick Coghlan (Nitish Chandra) in branch 'master': bpo-32685: Improve suggestion for print statement (GH-5375) https://github.com/python/cpython/

[issue32649] complete C API doc debug and profile part with new PyTrace_OPCODE

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Merged, thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <https:/

[issue32649] complete C API doc debug and profile part with new PyTrace_OPCODE

2018-01-28 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 255f7a26da47ca6b7bd1d375b8a04920f68c119c by Nick Coghlan (Xiang Zhang) in branch 'master': bpo-32649: Add C API docs for per-opcode tracing & profiling (GH-5360) https://github.com/python/cpyt

[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- assignee: -> ncoghlan ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32690> ___ _

[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks for the issue report and patch Martin, and sorry for the long delay in getting it merged! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset a278ad2faa76ae61569a58f36e06ba8745f4a9b7 by Nick Coghlan in branch 'master': bpo-30306: Add missing NEWS entry (GH-5374) https://github.com/python/cpython/commit/a278ad2faa76ae61569a58f36e06ba8745

[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: They're the only characters we won't want to include as part of the suggestion, since they indicate the end of the statement. -- ___ Python tracker <rep...@bugs.python.or

[issue17044] Implement PEP 422: Simple class initialisation hook

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Indeed it should! Thanks for pointing that out :) -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.

[issue32206] Run modules with pdb

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I checked the original PR, and I'm pretty sure the reference implementation is going to have the same bug. To keep the NEWS entries clear (since the buggy implementation already shipped in the alpha releases), I've created a new issu

[issue32691] "pdb -m " sets __main__.__package__ incorrectly

2018-01-27 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: For regular modules, the initial implementation of bpo-32206 sets __package__ to "module_name" instead of "module_name.rpartition('.')[0]". This is not correct, and will cause problems for relative imports. (Fr

[issue32206] Run modules with pdb

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset fcf8b4c1022bc2d2f84dcef5d72eabf40a25ea19 by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Update pdb usage to include new module option (GH-5111) https://github.com/python/cpython/

[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: The current oddity where the names will always appear in the reverse of declaration order comes from a C level loop in the frame object's "map_to_dict" helper function that loops in reverse [1]: ... for (j

[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Reviewing the code and the CI test failures on the PR, the trick here is that functools isn't actually *using* functools.reduce, it's just re-exporting it if it's defined. So if you block importing of "_functools" (which the

[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- pull_requests: +5215 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset dd0e087edc8f1e4d2c0913236b1a62a77d9db6d8 by Nick Coghlan (Martin Teichmann) in branch 'master': bpo-30306: release arguments of contextmanager (GH-1500) https://github.com/python/cpython/

[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Ouch, this clearly slipped off my review radar last year - I just picked it up again now while going through all my currently assigned issues before 3.7b1. While I still think the suggested refactoring above would be a good way

[issue29120] Move hash randomisation initialisation out of Python/random.c

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: As part of the startup sequence refactoring, this file has been renamed to Python/bootstrap_hash.c, and _PyRandom_Init/Fini have been renamed to _Py_HashRandomization_Init/Fini. Relevant commit: https://github.com/python/cpython/

[issue27172] Undeprecate inspect.getfullargspec()

2018-01-27 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- assignee: ncoghlan -> ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27172> ___ _

[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Re-reading the code for _set_legacy_print_statement_msg, I noticed that we're not currently taking the "start" parameter into account, and that's the offset the compiler passes in to tell us where on the line it found

[issue26219] implement per-opcode cache in ceval

2018-01-26 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: With the 3.7 beta deadline just around the corner, 3.8 will be the next opportunity to reconsider this idea. -- versions: +Python 3.8 -Python 3.6 ___ Python tracker <rep...@bugs.python.or

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-26 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Eric's current proposal sounds sensible to me, but I'll note that if we deem it necessary, the code that implicitly sets `__hash__ = None` to override object.__hash__ when __eq__ is defined could also set some other marker to make i

[issue27505] Missing documentation for setting module __class__ attribute

2018-01-26 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks for the PRs! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue27505] Missing documentation for setting module __class__ attribute

2018-01-26 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 8f68cb7db37322cfeeb8338e78474e5f25d930c5 by Nick Coghlan (Cheryl Sabella) in branch '3.6': [3.6] bpo-27505: Retrofit module __class__ documentation from 3.7 (GH-5321) https://github.com/python/cpython/

[issue27505] Missing documentation for setting module __class__ attribute

2018-01-26 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 85527cf50a9a4eecaca4022f7c6cb9e0bae1fa5f by Nick Coghlan (Cheryl Sabella) in branch 'master': bpo-27505: Add change notes in module attribute docs (GH-5320) https://github.com/python/cpython/

[issue27505] Missing documentation for setting module __class__ attribute

2018-01-24 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I think the only thing missing for the 3.7 docs now would be a pair of "versionchanged" notes indicating that __class__ has been settable since 3.5, while module level __dir__ and __getattr__ support is new in 3.7

[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: (Reducing priority since "sudo dnf remove uuid-devel" is a straightforward workaround) -- priority: normal -> low ___ Python tracker <rep...@bugs.python.org> <https:

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I'd be fine with that recommendation (since `@dataclass(order=False)` and `@total_ordering` will compose without any problems), but in that case I'd suggest having "order=True" + any of the ordering methods result in an exce

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: For the ordering operators, my only question would be whether or not I can rely on them to act like functools.total_ordering: if I supply __eq__ and one of the ordering operators (e.g. __lt__), will dataclasses make sure the other

[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2018-01-22 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- keywords: +patch pull_requests: +5118 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31568] Configure thinks it finds python3.5 but doesn't

2018-01-22 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- pull_requests: +5119 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31568> ___ _

[issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed"

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I removed the snippet entirely from https://github.com/python/cpython/pull/5201, and while Travis didn't pass, it failed due to test suite failures, not anything environmental. -- nosy: +nc

[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Reverting my previous commit doesn't fix the problem: if both uuid-devel and libuuid-devel are installed, then it reports that the necessary bits to build _uuid weren't found, without even attempting to compile it

[issue32627] Header dependent _uuid build failure on Fedora 27

2018-01-22 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: I'm hitting a build failure relating to the new _uuid module on Fedora 27: == building '_uuid' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -

[issue32590] Proposal: add an "ensure(arg)" builtin for parameter validation

2018-01-22 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I agreed that this idea isn't really baked enough for an RFE yet, so I'm marking this as "postponed" for now. The main requirement for getting it back out of "postponed" state would be having someone that's suffic

[issue29302] add contextlib.AsyncExitStack

2018-01-20 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Explicitly noting some API design decisions from the review of https://github.com/python/cpython/pull/4790: 1. AsyncExitStack will define __aenter__ and __aexit__ but *not* __enter__ and __exit. This makes it unambiguous whic

[issue32028] Syntactically wrong suggestions by the new custom print statement error message

2018-01-19 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks CuriousLearner for the PR and mdraw for the original issue report! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep.

[issue32028] Syntactically wrong suggestions by the new custom print statement error message

2018-01-19 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 4002d5dbf4c058bbf2462f9f5dea057956d1caff by Nick Coghlan (Miss Islington (bot)) in branch '3.6': [3.6] bpo-32028: Fix suggestions for indented print statements (GH-5249) https://github.com/python/cpython/

[issue32028] Syntactically wrong suggestions by the new custom print statement error message

2018-01-19 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset d57f26c753dce61f72b52b96db3a3253d9f2fc3e by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-32028: Fix suggestions for indented print statements (GH-4688) https://github.com/python/cpython/

[issue32551] Zipfile & directory execution in 3.5.4 also adds the parent directory to sys.path

2018-01-19 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks Larry - I've reduced the priority accordingly. While the NEWS entry sounds a bit complicated, the actual fix is nicely self-contained: it's all within Modules/main.c, and relates to how that manipulates sys.argv[0] during s

[issue32590] Proposal: add an "ensure(arg)" builtin for parameter validation

2018-01-17 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: This proposal is an outcome of repeated requests on python-ideas that assert statements be made unconditional, so they can be legitimately used for parameter validation, rather than solely as a form of inline self-test. Rathe

[issue32573] sys.argv documentation should include caveat for embedded environments

2018-01-16 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: There are actually 3 attributes that may be absent when CPython itself isn't managing the C level entry point: sys.argv, sys.warnoptions, and sys._xoptions. I'd be more inclined to make the implementation match the docs though, an

[issue32551] Zipfile & directory execution in 3.5.4 also adds the parent directory to sys.path

2018-01-16 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Good catch Eryk, I misdiagnosed what was going on, since the current directory and the parent directory were the same location in Ned's particular example. I double checked, and we resolve symlinks in path entries *before* perf

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2018-01-16 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Tweaking metadata to make it clear Py3.5 was also updated. -- versions: +Python 3.5 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-16 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I couldn't persuade git to pull the upstream patch in directly, so I just made the same change downstream: https://github.com/python/cpython/pull/5201 -- ___ Python tracker <rep...@bugs.p

[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-16 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- keywords: +patch pull_requests: +5055 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32551] Zipfile & directory execution in 3.5.4 adds the current directory to sys.path

2018-01-15 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I've updated the issue title to reduce the need to have read bpo-29723 first to understand it. I've also filed https://github.com/pantsbuild/pex/issues/440 essentially asking the pex folks to check if they're affected. --

[issue32551] 3.5.4 has a regression that was fixed in 3.6.1rc1

2018-01-15 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: PR submitted for 3.5. Since the problem was in a full release this time (rather than a pre-release the way it was for 3.6), I've reclassified it as a security bug, since it means some previously safe operations (where no user-wr

[issue32551] 3.5.4 has a regression that was fixed in 3.6.1rc1

2018-01-15 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- keywords: +patch pull_requests: +5050 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2018-01-15 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- pull_requests: +5051 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29319> ___ _

[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-15 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Details of the compilation failure: ``` building 'pyexpat' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -DHAVE_EXPAT_CONF

[issue32563] -Werror=declaration-after-statement expat build failure on Python 3.5

2018-01-15 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: A fresh Python 3.5 checkout failed to build the embedded expat XML library for me, due to the configure check that adds "-Werror=declaration-after-statement" to the compiler flags. I'm guessing this was introduced vi

[issue32551] 3.5.4 has a regression that was fixed in 3.6.1rc1

2018-01-14 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Unfortunately, it looks like bpo-29319 was backported to the 3.5 branch, but not the follow-up fix from bpo-29723: https://github.com/python/cpython/commits/3.5/Modules/main.c (The metadata on bpo-29319 indicated that the original

[issue32004] Allow specifying code packing order in audioop adpcm functions

2018-01-10 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Adjusting target versions, as even though the status quo leads to mishandling some input data, the fix is a feature request to make the behaviour configurable, which restricts the change to 3.7+. -- nosy: +ncoghlan ve

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-10 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: While I do think it makes sense to enhance `dis` in this regard, I'm also thinking it might be better to have that automatically fall back to a `python -m inspect module:qualname` style lookup in the event that `os.path.exists(

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 9b99747386b690007027c3be2a5d7cfe3d3634f5 by Nick Coghlan in branch 'master': bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458) https://github.com/python/cpython/commit/9b99747386b690007027c3be2a5d7cfe3d

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: As David noted, we updated all the URL parsing functions to be polymorphic back in 3.2: https://docs.python.org/3/library/urllib.parse.html#parsing-ascii-encoded-bytes We left the quoting functions alone, because they already had the

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks. I've added the dependencies, and also granted you triage permissions on the tracker, so you should be able to edit dependencies yourself in the future. -- dependencies: +Add an option to profile to run library

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I think https://github.com/python/cpython/pull/4458 is ready to go now, but I expect it would benefit from a review before I merge it. If anyone has the time to take a look, it would be much appreciated :) However, I'd also like

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: +1 for creating separate issues and linking them from this one - while the risk of breaking anything seems low, if we do cause a regression, multiple issues and PRs provide better traceability than one giant issue for everything. (I'

[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset e46a8af450210ee5c7f0459ad6beddbc626ae60f by Nick Coghlan (Nathaniel J. Smith) in branch 'master': bpo-30579: Allow TracebackType creation and tb_next mutation from Python (GH-4793) https://github.com/python/cpython/

[issue32206] Run modules with pdb

2018-01-06 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Re-opening for the CLI help updates. -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <rep...@bugs.python.org>

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 9f1e5f1b7f074e026843a5d70834233a95a6bf9d by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Pdb can now run modules (GH-4752) https://github.com/python/cpython/commit/9f1e5f1b7f074e026843a5d70834233a95

[issue32206] Run modules with pdb

2018-01-04 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Linking back to the overall RFE for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325 -- nosy: +ncoghlan ___ Python t

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-04 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Issue 32206 covers doing this for `pdb`. It relies on directly accessing private APIs in the `runpy` module, but we can live with that, since `pdb` is part of the standard library. -- dependencies: +Run modules with pdb, cP

[issue32479] inconsistent ImportError message executing same import statement

2018-01-02 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Since the problem is specific to Python 2.7 and has been resolved in the importlib based import implementation, I'm inclined to close this as "Won't Fix". The only reason I haven't is that if someone really wanted to dig

[issue32145] Wrong ExitStack Callback recipe

2018-01-01 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: As per the comment at https://bugs.python.org/issue32445#msg309356, there's a bug in my suggested changes to `ExitStack.pop_all()`: the right method to call is ExitStack.push(), *not* ExitStack.callback() (the latter adds a wrapper fu

[issue32445] Skip creating redundant wrapper functions in ExitStack.callback

2018-01-01 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Ah, you're right, I wasn't thinking clearly when I filed this - the correct public API method to transfer existing exit stack entries to a new stack would be "ExitStack.push()". I'll make a note of that on th

[issue32463] problems with shutil.py and os.get_terminal_size

2017-12-31 Thread Nick McElwaine
New submission from Nick McElwaine <nmcelwa...@gmail.com>: os.get_terminal_size() fails with () or (0) or (1) shutil.sys fails calling it with (sys.__stdout__.fileno()) because sys.__stdout__ is type None -- components: Windows messages: 309276 nosy: Dhruve, paul.moore, steve

[issue32459] Capsule API usage docs are incompatible with module reloading (etc)

2017-12-30 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: After commenting [1] on the fact that the current datetime module C API [2] is problematic due to its reliance on C level global variables, I discovered that this is actually the outcome of our recommended approach to using ca

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: https://bugs.python.org/issue32459 covers defining a module-reloading-friendly way of using capsules. For this issue, I now think it makes sense to just ignore that problem, and add whatever you need to the existi

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: On 31 December 2017 at 01:34, Paul Ganssle <rep...@bugs.python.org> wrote: > That said, I think it would be really good if we could get a fast path for > timezone creation and access to the UTC singleton into the Python

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- keywords: +patch pull_requests: +4929 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan <ncogh...@gmail.com>: -- assignee: -> ncoghlan ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31975> ___ _

[issue10381] Add timezone support to datetime C API

2017-12-29 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Would it be possible to deprecate (or at least stop enhancing) the current datetime C API and add a new capsule based one instead? We're trying to get extension module authors to *stop* relying on C level globals, since it causes pr

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Another point in favour of the JSR approach is that it should make it easier for tools like coverage.py to continue mapping opcode coverage to line coverage. I also like Serhiy's proposed strategy of separating the initial introd

[issue32145] Wrong ExitStack Callback recipe

2017-12-29 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: I'm not clear on what you mean about allowing arbitrary names for the instance creation function - at that point we're back to subclasses not being able to use the default `pop_all()` implementation at all, and needing to dup

[issue32445] Skip creating redundant wrapper functions in ExitStack.callback

2017-12-29 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: While discussing https://bugs.python.org/issue32145, I noticed that ExitStack.callback *always* adds a wrapper function, even when the `args` and `kwds` parameters are both empty. For plain callbacks that aren't receiving any

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: _PyCoreConfig.ignore_environment was part of the initial PEP 432 implementation that I wrote. It's that due to the design goal that once the refactoring is complete, an embedding application should be able to control *all* the se

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Yep, the requirement for supporting multiple interpreters is just that you either avoid relying on C global state entirely, or else correctly synchronise access to it. Multi-phase initialisation just provides a few nudges in the dir

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: (However, the behaviour Steve is describing suggests that sys.path[0] initialisation may have problems on Windows that the test suite isn't picking up - "-I" should *not* add the script directory to the path, and directory

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: When executing a sys.path entry, you're executing that *entire* entry (whether it's a directory or zipfile). This isn't a bug, and it isn't in conflict with the assurances offered by isolated mode (it would only be a problem if r

[issue24991] Define instance mutability explicitly on type objects?

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Declaring "I intend for instances of this class to be immutable" isn't a fuzzy concept - it's in the same vein as other type hints, like "I intend for this to be a string". The part that's fuzzy is how wel

[issue32145] Wrong ExitStack Callback recipe

2017-12-25 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: Regarding super().__init__(): I added ExitStack to contextlib2 first, so I was thinking in the Py2/3 compatible subset when I wrote the original docs. We can freely change that for the standard library recipes. Regarding the "ho

[issue32002] test_c_locale_coercion fails when the default LC_CTYPE != "C"

2017-12-16 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: New changeset 9c19b020249c451891affd81751947321a1e6957 by Nick Coghlan in branch 'master': bpo-32002: Refactor C locale coercion tests (GH-4369) https://github.com/python/cpython/commit/9c19b020249c451891affd81751947321a

[issue27505] Missing documentation for setting module __class__ attribute

2017-12-09 Thread Nick Coghlan
Nick Coghlan <ncogh...@gmail.com> added the comment: This is still a valid docs issue, although PEP 562's module __getattr__ and __dir__ will provide a simpler alternative for most of the cases that previously required setting the __class__ attribute: https://www.python.org/dev/peps/pe

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-09 Thread Nick Coghlan
New submission from Nick Coghlan <ncogh...@gmail.com>: For documentation of this feature, I'd suggest adding a new subsection after https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access (but at the same level), called "Customizing module attribute access&

<    4   5   6   7   8   9   10   11   12   13   >