Nick Coghlan added the comment:
https://bugs.python.org/issue37757 separates out the TargetScopeError handling
for conflicts between assignment expressions and comprehension iteration
variables.
--
___
Python tracker
<https://bugs.python.
New submission from Nick Coghlan :
While implementing PEP 572, Emily noted that the check for conflicts between
assignment operators and comprehension iteration variables had not yet been
implemented: https://bugs.python.org/issue35224#msg334331
Damien George came across this discrepancy
Nick Coghlan added the comment:
Did the documentation PR get pushed/merged? Emily mentioned having one in
progress above, but it doesn't appear in the linked PRs.
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/is
Nick Coghlan added the comment:
I went ahead and merged the minimal PR and flagged it for backporting to 3.8 -
it's an obviously beneficial change, that clearly does less work on each pass
through the loop.
Even if you are doing non-strict parsing of a string that consists entire
Nick Coghlan added the comment:
New changeset 8a758f5b99c5fc3fd32edeac049d7d4a4b7cc163 by Nick Coghlan (Marco
Paolini) in branch 'master':
bpo-37587: Make json.loads faster for long strings (GH-14752)
https://github.com/python/cpython/commit/8a758f5b99c5fc3fd32edeac049d7d
New submission from Nick Coghlan :
At the core dev sprints in 2017 (IIRC), Ezio and I were talking about some of
the potential issues with 3.10, and one of them was folks attempting to
manipulate sys.version with string operations rather than using the already
decomposed sys.version info
Nick Coghlan added the comment:
Agreed, raising the exception properly would be the way to go.
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue35
Nick Coghlan added the comment:
Reviewing the thread, we never actually commented on thautwarm's proposal in
https://bugs.python.org/issue12782#msg327875 that aims to strip out any INDENT,
NEWLINE, and DEDENT tokens that appear between the opening "with" keyword and
the s
Nick Coghlan added the comment:
ImportError sounds right to me.
We already raise that just above this for the "no dots at all" case, so also
raising it for the "not enough dots" case makes more sense than leaving them
different.
--
__
Change by Nick Coghlan :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> compile error
___
Python tracker
<https://bugs.python
New submission from Nick Coghlan :
Reviewing some code today, I came across a ConfigParser.set() call that only
specified the section and key, with the value argument missing.
If you look at the ConfigParser.set() docs, this seems like incorrect code, as
those docs indicate that the value
Nick Coghlan added the comment:
In reviewing https://github.com/cython/cython/pull/3009, Jeroen pointed out
that my symbol checking idea wouldn't actually work, since the preprocessor can
only see preprocessor definitions, not compiler symbols. If we're going to rely
on a pr
Nick Coghlan added the comment:
There's also the question of complying with our own deprecation policy, as the
approval to ditch tp_print API compatibility in PEP 590 relied on the fact that
it has been deprecated since Python 3.0.
However, it turns out the associated program
Nick Coghlan added the comment:
I'm happy with the change in https://github.com/python/cpython/pull/13959, but
we need sign-off from Łukasz as release manager on bumping the
Py_VERSION_SERIAL a bit early so Cython can reliably detect that this change
has been reverted without having to
Nick Coghlan added the comment:
It isn't the actively maintained projects that publish wheel files that I'm
worried about fixing - it's the sdist only projects that would otherwise only
need recompilation to work on the new Python version.
With this fixed, and the PyCode_Ne
Nick Coghlan added the comment:
New changeset 08970cb03c61f62f4f69e7769d0075fa66bb86aa by Nick Coghlan (Michael
Felt) in branch 'master':
bpo-36210: update optional extension handling for AIX (GH-12202)
https://github.com/python/cpython/commit/08970cb03c61f62f4f69e7769d0075
Nick Coghlan added the comment:
Perhaps `os._abspath_for_import`? If importlib finds it, then it can handle
making early paths absolute itself, otherwise it will defer doing that until it
has the full external import system bootstrapped. (importlib does try to make
all paths absolute as it
Nick Coghlan added the comment:
(Note: this isn't SC feedback yet, it's individual contributor feedback from me)
As others noted, the reason we treat "Incompatible with Cython generated source
code" distinctly from other C API source compatibility issues is because
C
Nick Coghlan added the comment:
New changeset 3a1d50e7e573efb577714146bed5c03b9c95f466 by Nick Coghlan (Michael
Felt) in branch 'master':
bpo-28009: Fix uuid SkipUnless logic to be based on platform programs capable
of introspection (GH-12777)
https://github.com/python/cpyt
Nick Coghlan added the comment:
The key problem isn't Cython itself, the problem is that Cython generated
libraries can't be rebuilt for 3.8 without regenerating their C files.
I'd be fine with PyCode_NewWithPosArgs (Victor's right that a descriptive
naming convention ha
New submission from Nick Coghlan :
The Porting section of the What's New guide is for changes where the old
behaviour was at best arguably correct, but it's still possible someone was
relying on it behaving exactly the way it used to.
It isn't for us to say "We broke all
Nick Coghlan added the comment:
New changeset 99b5c940d3471e0ed6579771d94e7342d7c733e0 by Nick Coghlan (Dimitri
John Ledkov) in branch '2.7':
[2.7] bpo-34836: fix test_default_ecdh_curve, needs no tlsv1.3. (GH-9626)
https://github.com/python/cpyt
Nick Coghlan added the comment:
Addressing the other part of Chris's initial post: there's also no
`--upgrade-pip` option on `venv` itself.
Instead, there's only an `--upgrade` option that is intended for *Python*
version upgrades, and restructures the internal layout of the
Nick Coghlan added the comment:
(Added packaging, Linux distro, and Windows and macOS installer folks to the cc
list)
Chris and I were discussing this behaviour, and it turns out even I had
forgotten how we had specified this feature in PEP 453: `ensurepip --upgrade`
ensures that an older
Nick Coghlan added the comment:
New changeset e788057a9188ff37e232729815dfda2529079420 by Nick Coghlan in
branch 'master':
bpo-36797: Reduce levels of indirection in outdated distutils docs (#13462)
https://github.com/python/cpython/commit/e788057a9188ff37e232729815dfda
New submission from Nick Coghlan :
(Splitting out a separate performance issue from
https://bugs.python.org/issue36751#msg342683)
There can be two quite different reasons for inspecting a function signature:
* inspecting arbitrary functions to learn as much about them as possible in
order
Nick Coghlan added the comment:
I split https://bugs.python.org/issue37010 out as a separate performance issue
in case anyone is inclined to explore the idea of reversing the relationship
between inspect.signature and inspect.getfullargspec, such that the latter
becomes a fast building
Nick Coghlan added the comment:
This has been merged for 3.8 and 3.7, but not for 2.7, since the docs have
diverged far enough that the automatic backport didn't work:
https://github.com/python/cpython/pull/13087#issuecomment-494402704
Given the proximity to the general end of life o
Nick Coghlan added the comment:
While I do have a second PR open with some additional smaller cleanups, the
first PR removed the outdated information that seemed most problematic.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Change by Nick Coghlan :
--
pull_requests: +13372
___
Python tracker
<https://bugs.python.org/issue36797>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Coghlan added the comment:
Thanks Pablo.
Noting for the record: positional-only arguments aren't new *semantically",
since extension modules have always allowed them, and you've long been able to
emulate them in Python code by accepting "*args".
Prior to the
Nick Coghlan added the comment:
New changeset dae1229729920e3aa2be015453b7f702dff9b375 by Nick Coghlan in
branch 'master':
bpo-36797: Prune more legacy distutils documentation (GH-13092)
https://github.com/python/cpython/commit/dae1229729920e3aa2be015453b7f7
Nick Coghlan added the comment:
Also note #32190 regarding changing the way these APIs are documented, without
introducing any programmatic deprecation warnings.
--
___
Python tracker
<https://bugs.python.org/issue36
Change by Nick Coghlan :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue27172>
___
___
Python-bugs-list mailing list
Unsubscrib
Nick Coghlan added the comment:
And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have
getfullargspec() - it's a Py3 only API).
The undeprecation was because there are a lot of 3rd party projects for whom
the getfullargspec() representation is good enough, a
Change by Nick Coghlan :
--
priority: normal -> release blocker
___
Python tracker
<https://bugs.python.org/issue36751>
___
___
Python-bugs-list mai
Nick Coghlan added the comment:
This PR needs to be reverted - we previously deprecated this API, but then
undeprecated it again in #27172, as the consequence of deprecating it was
projects copying & pasting the getfullargspec() implementation into their own
code, not switchin
Nick Coghlan added the comment:
New changeset 1b4abcf302ff2c8f4d4881294510d48ba5186b53 by Nick Coghlan (Kojo
Idrissa) in branch 'master':
bpo-33071: remove outdated PyPI docs (GH-13087)
https://github.com/python/cpython/commit/1b4abcf302ff2c8f4d4881294510d48ba5186b53
-
Nick Coghlan added the comment:
New changeset 94a64e9cd411a87514b68082c1c437eb3b49dfb9 by Nick Coghlan (Zackery
Spytz) in branch 'master':
bpo-24048: Save the live exception during import.c's remove_module() (GH-13005)
https://github.com/python
Nick Coghlan added the comment:
Another potential issue here is if a thread belonging to another interpreter
attempts to access the interpreter being cleaned up.
--
___
Python tracker
<https://bugs.python.org/issue36
Nick Coghlan added the comment:
Pablo pointed out a problem with this change at the PyCon sprints: the thread
cleanup code doesn't currently distinguish between "Python created daemon
thread" and "thread created by the embedding application".
That's alre
Change by Nick Coghlan :
--
keywords: +patch
pull_requests: +13006
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Nick Coghlan :
Prompted by #33071, I'm going to do a pass through the legacy distutils
documentation deleting outdated information that is better maintained elsewhere.
--
assignee: ncoghlan
messages: 341407
nosy: jaraco, ncoghlan
priority: normal
severity: n
Change by Nick Coghlan :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python
Nick Coghlan added the comment:
New changeset 4d0233ec656bc7e7814e5f6f484e79a50a0daf91 by Nick Coghlan (Miss
Islington (bot)) in branch '3.7':
bpo-30840: Document relative imports (GH-12831) (GH-12938)
https://github.com/python/cpython/commit/4d0233ec656bc7e7814e5f6f484e79
Nick Coghlan added the comment:
New changeset 70bf713617e15fad390ed953e48b3c65d9bc90ec by Nick Coghlan (Joannah
Nanjekye) in branch 'master':
bpo-30840: Document relative imports (#12831)
https://github.com/python/cpython/commit/70bf713617e15fad390ed953e48b3c
New submission from Nick Coghlan :
The test output from test_sys_settrace makes it look like a couple of the async
tracing tests aren't cleaning up after themselves properly:
```
[ncoghlan@localhost cpython]$ ./python -m test test_sys_settrace
Run tests sequentially
0:00:00 load avg: 1.
Change by Nick Coghlan :
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue35998>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nick Coghlan :
--
title: Dropping __main__ from sys.modules clears the REPL namespace -> REPL
doesn't ensure builtins are available when implicitly recreating __main__
___
Python tracker
<https://bugs.python.org
Nick Coghlan added the comment:
The relevant functions:
* PyRun_InteractiveLoopFlags:
https://github.com/python/cpython/blob/e8113f51a8bdf33188ee30a1c038a298329e7bfa/Python/pythonrun.c#L89
* PyRun_InteractiveOneObjectEx:
https://github.com/python/cpython/blob
Nick Coghlan added the comment:
The ``sys`` import gets cleared as well (accidentally omitted from the previous
comment):
```
>>> sys
Traceback (most recent call last):
File "", line 1, in
NameError: name 'sys' is not defined
```
--
_
Nick Coghlan added the comment:
Additional info showing the module getting reset back to the state of a freshly
created module namespace:
```
>>> dir()
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__',
New submission from Nick Coghlan :
While trying to create an example for a pickle bug discussion, I deliberately
dropped `__main__` out of sys.modules, and the REPL session lost all of its
runtime state.
Simplified reproducer:
```
>>> import sys
>>> mod = sy
Nick Coghlan added the comment:
I was going to note that the algorithm Anthony has pursued here is the same one
we already use for the list constructor and list.extend(), but Inada-san
already pointed that out :)
While length_hint is allowed to be somewhat inaccurate, we do expect it to be
Nick Coghlan added the comment:
Retitled the issue using the `--mainpath` spelling, as I wanted to link to it
from the PEP 582 discussion, and that's my current favourite from the various
ideas I've had since first filing the issue.
(I decided I didn't like `--basepath` bec
Nick Coghlan added the comment:
Aye, let's close this for now - swapping streams out has enough other problems
with stale references to the original stream that using reconfigure() to update
the existing stream in place is usually going to be the better option.
--
resol
Nick Coghlan added the comment:
I'm inclined to leave 3.7 alone unless/until we get an actual bug report for
the current behaviour - if an embedder finds that it just straight up doesn't
work for them, then they can either resort to tinkering with the private APIs
(since they wo
Nick Coghlan added the comment:
Piotr: does it always jump out, or does it only jump out if the relevant module
has already been imported?
(The tests for walk_packages are relatively weak and never generate conflicting
names, so it's entirely plausible that there are caching side ef
Nick Coghlan added the comment:
The recommended handling in the article that Serhiy mentions is to strip the
leading zeroes, which the ipaddress module will still do - it's only being made
more tolerant on input. That means it will become usable as a prefilter step
(pass string
Nick Coghlan added the comment:
Oops, this covers more than just modulefinder - reopening until the other
remaining uses of the imp module have been removed.
--
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open
_
Nick Coghlan added the comment:
Fixed for Python 3.8 via the patch for #35936.
--
nosy: +ncoghlan
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.6
___
Python tracke
Nick Coghlan added the comment:
Fixed for Python 3.8 via the patch for #35936. We won't be backporting that
patch as it also migrates modulefinder from the deprecated imp API to the
supported importlib one, and is hence considered overly intrusive for a bug fix
re
Nick Coghlan added the comment:
Fixed for Python 3.8 via the patch for #35936. We won't be backporting that
patch as it also migrates modulefinder from the deprecated imp API to support
importlib one, and is hence considered overly intrusive for a bug fix release.
--
resol
Nick Coghlan added the comment:
New changeset 9d7b2c0909b78800d1376fd696f73824ea680463 by Nick Coghlan (Brandt
Bucher) in branch 'master':
bpo-35936: Updates to modulefinder (GH-11787)
https://github.com/python/cpython/commit/9d7b2c0909b78800d1376fd696f738
Nick Coghlan added the comment:
Thanks Brandt!
I'll also go back and close #17396, #35376, and #25160
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Nick Coghlan added the comment:
Thanks for the technical clarification Lars, and for the docs update C.A.M.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Nick Coghlan added the comment:
New changeset 89a894403cfa880d7f9d1d67070f61456d14cbde by Nick Coghlan (CAM
Gerlach) in branch 'master':
bpo-30661: Improve docs for tarfile pax change and effect on shutil (GH-12635)
https://github.com/python/cpyt
Nick Coghlan added the comment:
I've merged the change for Python 3.8 (thanks Joel!).
I'm not sure whether to classify it as an enhancement or as an interoperability
bug fix, though, so I've put the status to pending and added Ned to the nosy
list to get his thoughts as th
Nick Coghlan added the comment:
New changeset e653d4d8e820a7a004ad399530af0135b45db27a by Nick Coghlan (Joel
Croteau) in branch 'master':
bpo-36384: Remove check for leading zeroes in IPv4 addresses (GH-12577)
https://github.com/python/cpython/commit/e653d4d8e820a7a004ad399530af01
Nick Coghlan added the comment:
I think Caleb's "sample_before_and_after" idea hints that this may be an idea
that could benefit from the ExitStack treatment where contextlib provides a
building block that handles the interaction with the context management
machinery, with th
Nick Coghlan added the comment:
Thanks for sorting this out, Victor!
--
resolution: -> fixed
___
Python tracker
<https://bugs.python.org/issue36236>
___
_
Nick Coghlan added the comment:
If I recall correctly, it's the generator destructor that handles throwing in
``GeneratorExit`` to get the generator to terminate. So this code can resurrect
a generator as it's being collected by the GC:
def resurrecting(resurrected):
Nick Coghlan added the comment:
Victor Stinner added a great many regression tests in this area for Python 3.7+
--
___
Python tracker
<https://bugs.python.org/issue16
Nick Coghlan added the comment:
Aye, I agree that changing the default resolves the feature request here. I've
recategorised this as a documentation issue, as the initial PR only changed the
`tarfile` documentation, so the impact on `shutil` isn't obvious.
So the changes need
Nick Coghlan added the comment:
I think test_embed would be the right home for this, as there's an existing
test case there for subinterpreter lifecycles and repeated init/finalize
cycles:
https://github.com/python/cpython/blob/ddbb978e1065dde21d1662386b26ded359f4b16e/Programs/_testem
Nick Coghlan added the comment:
This is not a bug - to enable function level optimisations, the compiler must
be able to see all local variable names at compile time.
In Python 2.x the exec statement implementation included special code to allow
even function local variables to be rebound
Nick Coghlan added the comment:
Omitting it from sys.path in that case makes sense to me, but I'm not sure what
sys.argv[0] should be set to.
--
___
Python tracker
<https://bugs.python.org/is
Nick Coghlan added the comment:
I've merged Yasser's PR (thank you!), but in the review discussion for that, we
noticed something else: the `total_seconds()` documentation mentions the
floating point dynamic resolution problem, but doesn't mention using `//` or
`divmod()`
Nick Coghlan added the comment:
New changeset f40b4a0b6277b2779b9ded3736325489f2af93e4 by Nick Coghlan (Yasser
A) in branch 'master':
bpo-36138: Clarify docs about converting datetime.timedelta to scalars.
(GH-12137)
https://github.com/python/cpyt
Nick Coghlan added the comment:
Just noting that https://bugs.python.org/issue14803 is probably our most
comprehensive discussion of the coverage use case for arbitrary pre-__main__
code execution.
Steve also made a comment above about potentially turning encodings into a
namespace package
Nick Coghlan added the comment:
Victor and I were discussing the appropriate behaviour for the "What do we do
if _Py_PreInitialize() hasn't been called?" case, and Victor pointed out that
the potential for mojibake provides a solid rationale for going back to the
Pytho
Nick Coghlan added the comment:
I went ahead and merged Lysandros's new FAQ entry (Thank you Lysandros!), as
having some level of documentation for this notation is markedly better than
the previous "none at all", and the PR added cross-references from the builtins
and insp
Nick Coghlan added the comment:
New changeset 1aeeaeb79efa4de41f97b58547e23c2965ecabc5 by Nick Coghlan
(Lysandros Nikolaou) in branch 'master':
bpo-21314: Add a FAQ entry about positional only parameters (GH-10641)
https://github.com/python/cpyt
Change by Nick Coghlan :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
___
Python tracker
<https://bugs.python
Nick Coghlan added the comment:
Just noting that PEP 499 covers adding modules executed with `-m` to
`sys.modules` under their real name in addition to `__main__`.
--
___
Python tracker
<https://bugs.python.org/issue19
New submission from Nick Coghlan :
https://docs.python.org/3/c-api/init.html#c.Py_EndInterpreter states that
"Py_FinalizeEx() will destroy all sub-interpreters that haven’t been explicitly
destroyed at that point."
As discussed in https://github.com/hexchat/hexchat/issues/2237,
Nick Coghlan added the comment:
They weren't *intended* to change it, and didn't in the original implementation
of the PEP, but they do in the as-shipped Python 3.7 implementation, and I
abandoned my attempts to revert to the as-designed behaviour as impractical
given the other ch
Nick Coghlan added the comment:
PEP 432 tweaked: https://github.com/python/peps/pull/904/files
--
___
Python tracker
<https://bugs.python.org/issue36
Nick Coghlan added the comment:
Agreed - I think the biggest thing we learned from the pre-implementation in
Python 3.7 is that the "Let's move as much config as we can to Python C API
data types" fell down in a couple of areas:
1. The embedding application is likely to spe
Change by Nick Coghlan :
--
stage: -> needs patch
type: -> enhancement
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue36124>
___
__
Nick Coghlan added the comment:
Oh, cool (both the fact the issue here is only with building cffi itself, and
that cffi creates extension modules that build with PY_LIMITED_API).
I've filed https://bugs.python.org/issue36124 to follow up on the
PyInterpreter_GetDict API
New submission from Nick Coghlan :
(New issue derived from https://bugs.python.org/issue35886#msg336501 )
cffi needs a generally available way to get access to a caching dict for the
currently active subinterpreter. Currently, they do that by storing it as an
attribute in the builtins
Nick Coghlan added the comment:
As a note in favour of the "Allow package nesting to be encoded in names, not
just directories" approach, we actually have a similar problem affecting
builtin modules: they're currently limited to top-level modules, with no way
for the module t
Nick Coghlan added the comment:
Yep, I completely understand (and agree with) the desire to eliminate the code
injection exploit that was introduced decades ago by using exec() to run lines
starting with "import " (i.e. "import sys; ").
I just don't want to lose
Nick Coghlan added the comment:
(On closer inspection, that's actually be the same breakage as already
mentioned above)
However, what I'm not clear on is how this would affect projects that had
*already* generated their cffi code, and include that in their sdist. Are all
those sd
Nick Coghlan added the comment:
Next incompatibility: https://github.com/python-hyper/brotlipy/issues/147
(which indirectly broke httpbin)
--
___
Python tracker
<https://bugs.python.org/issue35
Nick Coghlan added the comment:
I think the only reason I didn't mention this discrepancy in my doc updates is
because I wasn't aware there *was* a discrepancy.
The weird syntax was then just an incorrect amalgamation of "optional argument"
notation with an improperly
Nick Coghlan added the comment:
The revised behaviour now makes the error messages consistent with each other:
>>> class TooManyArgs():
... def __new__(cls):
... super().__new__(cls, 1)
...
>>> TooManyArgs()
Traceback (most recent call last):
File &quo
Nick Coghlan added the comment:
New changeset 5105483acb3aca318304bed056dcfd7e188fe4b5 by Nick Coghlan (Sanyam
Khurana) in branch 'master':
bpo-31506: Clarify error messages for object.__new__ and object.__init__
(GH-11641)
https://github.com/python/cpyt
Nick Coghlan added the comment:
Paolo: it still won't be completely clear, since there's still the subtle issue
that __new__ is a static method rather than a class method, so the correct
calls up to the base class are respectively:
super(Singleton, cls).__new__(cls) # Static m
201 - 300 of 6301 matches
Mail list logo