Nick Coghlan added the comment:
PEP 648 has been posted with a proposal to migrate sitecustomize.py,
usersitecustomize.py and arbitrary code execution in pth files to a directory
based `__sitecustomize__` structure: https://www.python.org/dev/peps/pep-0648
New submission from Nick Coghlan :
When using the logging module for long running services, there's one limitation
of the predefined logging levels that I semi-regularly run into: the only
entirely reliable log level for reporting that a WARNING state has been cleared
is itself WA
Nick Gaya added the comment:
As described above, the issue is in the textual description, not the code
snippet. I have opened a GitHub PR with a fix.
--
resolution: out of date ->
status: closed -> open
___
Python tracker
Change by Nick Gaya :
--
pull_requests: +22427
pull_request: https://github.com/python/cpython/pull/23548
___
Python tracker
<https://bugs.python.org/issue41
Nick Crews added the comment:
I re-did this at https://github.com/python/cpython/pull/23424, let me know what
you think. This is my first PR here, so I may have pooched something.
--
___
Python tracker
<https://bugs.python.org/issue15
Change by Nick Crews :
--
nosy: +NickCrews
nosy_count: 5.0 -> 6.0
pull_requests: +22316
pull_request: https://github.com/python/cpython/pull/23424
___
Python tracker
<https://bugs.python.org/issu
Change by Nick Coghlan :
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue42260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nick Coghlan :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42282>
___
___
Python-bugs-list
Nick Coghlan added the comment:
Since this was only a performance issue, I'm not planning to backport it to
earlier releases.
--
stage: patch review -> resolved
___
Python tracker
<https://bugs.python.org
Nick Coghlan added the comment:
New changeset 8805a4dad201473599416b2c265802b8885f69b8 by Nick Coghlan in
branch 'master':
bpo-42282: Fold constants inside named expressions (GH-23190)
https://github.com/python/cpython/commit/8805a4dad201473599416b2c265802
Change by Nick Coghlan :
--
keywords: +patch
pull_requests: +22093
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/23190
___
Python tracker
<https://bugs.python.org/issu
Change by Nick Coghlan :
--
assignee: -> ncoghlan
___
Python tracker
<https://bugs.python.org/issue42282>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Nick Coghlan :
While working on the PEP 642 reference implementation I removed the "default:"
case from the switch statement in astfold_expr as part of making sure the new
SkippedBinding node was being handled everywhere it needed to be.
This change pick
Nick Coghlan added the comment:
I *think* the lnotab one is the compiler failing to detect that the pointer has
been updated to point inside the body of a Python object, but I'm also not 100%
sure that it's a false alarm.
--
nosy:
Nick Coghlan added the comment:
Closing the old one as partially fixed, and linking here as a superseder makes
sense to me, so I went ahead and did that.
--
___
Python tracker
<https://bugs.python.org/issue42
Nick Coghlan added the comment:
Issue #42186 now covers the request to have a way to tell unittest to leave the
warnings filter alone even if it's set programmatically rather than by
modifying ``sys.warnoptions``.
(Changing version to 3.7 to indicate when the interaction with `-bb
Change by Nick Coghlan :
--
superseder: -> unittest overrides more serious warnings filter added before
unittest.main()
___
Python tracker
<https://bugs.python.org/issu
Nick Gaya added the comment:
@msg358296:
> IMO, it seems rather counter-intuitive to have to specify
> `concurrent.futures.TimeoutError` when using a timeout for the future
> returned by `run_coroutine_threadsafe()`.
I think that's expected, given that the func
New submission from Nick Gaya :
The documentation for the `async for` statement incorrectly states that "An
asynchronous iterable is able to call asynchronous code in its iter
implementation". Actually, this behavior was deprecated in Python 3.6 and
removed in Python 3.7. As of
New submission from Nick Henderson :
In both Python 3.8.3 and 3.9.0b3, using zipfile.Path to write a file in a
context manager results in an attempt to write to the zip file after it is
closed.
In Python 3.9.0b3:
import io
from zipfile import ZipFile, Path
def make_zip():
""
Nick Coghlan added the comment:
Removing issue assignment, as I'm no longer actively investigating this.
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.python.org
Nick Coghlan added the comment:
Removing issue assignment, as I'm not actively investigating this.
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.python.org
Nick Coghlan added the comment:
Added 3.8 back in to the target versions. However, if the automatic backport
doesn't work for that branch, I'll probably skip it rather than fixing any
conflicts.
--
versions: +Python 3.8
___
Python track
Nick Coghlan added the comment:
Adjusted target versions, as I never previously got around to merging this PR.
--
versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue34
Nick Coghlan added the comment:
Removing the issue assignment, as I'm not actively working on this (although I
still think it's a reasonable idea).
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.pytho
Nick Coghlan added the comment:
Removing the issue assignment, as I'm not actively working on this (although I
still think it's a reasonable idea).
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.pytho
Nick Coghlan added the comment:
Belatedly removing the issue assignment here, as I'm not actively working on
this.
I've also marked this as an easy newcomer friendly task, as all that's involved
is taking the `test_ast.py` changes from
https://bugs.pytho
Nick Coghlan added the comment:
Belatedly clearing the issue assignment here - while I do still sometimes
ponder this problem, I haven't been actively working on it since the 2017 core
sprint where Greg & I made our last serious attempt at trying to improve the
situation.
Mar
Nick Coghlan added the comment:
Belatedly marking this as resolved.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by J. Nick Koston :
--
nosy: +bdraco
___
Python tracker
<https://bugs.python.org/issue36098>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Canfield added the comment:
I'm having trouble with the .ReceivedTime breaking the program when I compile
the .py script to an .exe using auto-py-to-exe.
Here's where the error occurs underneath this try: statement
try:
received_year = str(email.Receive
Nick Coghlan added the comment:
I'm seeing this as well when attempting to run an optimised Python 3.8 build on
an old Debian 9 system (with the curses and socket extension modules).
For example:
cpython/Modules/socketmodule.c: In function ‘PyInit__socket’:
cpython/Modules/socketmod
Nick Coghlan added the comment:
While it's still not entirely accurate, I've tweaked the title on the issue to
refer to the arbitrary code execution behavior.
Getting "Make pth file sys.path modifications easier to debug" in there as well
wo
Change by Nick Coghlan :
--
title: Deprecate and remove pth files -> Deprecate and remove code execution in
pth files
___
Python tracker
<https://bugs.python.org/issu
Nick Guenther added the comment:
Thank you for taking the time to consider my points! Yes, I think you
understood exactly what I was getting at.
I slept on it and thought about what I'd posted the day after and realized most
of the points you raise, especially that serialized next()
New submission from Nick Guenther :
multiprocessing.Pool.imap() is supposed to be a lazy version of map. But it's
not: it submits work to its workers eagerly. As a consequence, in a pipeline,
all the work from earlier steps is queued, performed, and finished first,
before starting
Nick Coghlan added the comment:
The test cases for locale coercion *not* triggering still assume that
bpo-19977, using surrogateescape on the standard streams in the POSIX locale,
has been implemented (since that was implemented in Python 3.5).
Hence the various test cases complaining that
New submission from Nick Coghlan :
Two of my colleagues missed the "The arguments shown above are merely the most
common ones, ..." caveat on the subprocess.run documentation, and assumed that
Python 3.5 only supported the "cwd" option in the low level Popen API, and no
Nick Coghlan added the comment:
Issue 10535 says they should already be on by default in unittest.
I seem to recall checking that was still true when implementing the default
warning filter changes in 3.7.
--
___
Python tracker
<ht
Nick Coghlan added the comment:
Petr's point that any subclass state should be managed in the subclass cleanup
functions is a good one, so I withdraw my concern:
* custom module subclasses should clean up like any other class instance
* the module slots are then only needed if the m
Nick Coghlan added the comment:
Tweaked title to be "hide" rather "lose" (all the info is theoretically still
there in various places, it's just hidden by the default traceback printing
machinery, and hard to extract from the exception tree).
Issue #18861 is th
Nick Coghlan added the comment:
The one thing in the PR that makes me slightly wary is the point Vedran raised:
in the old AST _Unparser code, the fact that index tuples containing slices
should be printed without parentheses was encapsulated in the ExtSlice node
type, but with Index and
Nick Coghlan added the comment:
One of the intended use cases for Py_mod_create is to return instances of
ModuleType subclasses rather than straight ModuleType instances. And those are
definitely legal to define:
>>> import __main__
>>> class MyModule(type(__main__)
Nick Moore added the comment:
It's kind of funny that there's already consideration of this in
_strptime._strptime(), which returns a tuple used by
datetime.datetime.strptime() to construct the new datetime.
Search for `leap_year_fix`.
I think the concern though is if we changed t
Nick Moore added the comment:
Not disagreeing with you that "%b %d" timestamps with no "%Y" are excerable,
but they're fairly common in the *nix world unfortunately.
People need to parse them, and the simple and obvious way to do this breaks
every four years.
I
Nick Moore added the comment:
I suspect this is going to come up about this time of every leap year :-/
The workaround is prepending "%Y " to the pattern and eg: "2020 " to the date
string, but that's not very nice.
Would adding a kwarg "default_year"
Nick Coghlan added the comment:
As Petr notes, as long as all subinterpreters share the GIL, and share str
instances, then the existing _Py_IDENTIFIER mechanism will work fine for both
single phase and multi-phase initialisation.
However, that constraint also goes the other way: as long as
Nick Coghlan added the comment:
In the subinterpreter context: perhaps it would make sense to move *all*
Py_IDENTIFIER declarations to file scope?
That would make it much clearer which of our extension modules actually have
hidden state for caching purposes.
If we did that though, we
Nick Coghlan added the comment:
My apologies, my comment above was based on an outdated understanding of how
the identifier structs get initialised (it's the usage that initialises them,
not the declaration).
That means this is a useful refactoring to help identify blockers to
Nick Coghlan added the comment:
We can't make this change, as it means the statics get initialised before the
Python interpreter has been initialised, and won't be reinitialised if the
interpreter is destroyed and recreated.
--
nosy: +ncoghlan
resolution: -> rejected
Nick Coghlan added the comment:
New changeset e1e80002e28e1055f399a20918c49d50d093709e by Joannah Nanjekye in
branch 'master':
bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)
https://github.com/python/cpython/commit/e1e80002e28e1055f399a20918c49d
Change by Nick Coghlan :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39465>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Nick Coghlan :
Both https://github.com/python/cpython/pull/18066 (collections module) and
https://github.com/python/cpython/pull/18032 (asyncio module) ran into the
problem where porting them to multi-phase initialisation involves replacing
their usage of the
Nick Coghlan added the comment:
New changeset 1e420f849d0c094098543d2c27d35eaec69b2784 by Nick Coghlan in
branch 'master':
bpo-35134: Migrate frameobject.h contents to cpython/frameobject.h (GH-18052)
https://github.com/python/cpython/commit/1e420f849d0c094098543d2c27d35e
Change by Nick Coghlan :
--
pull_requests: +17475
pull_request: https://github.com/python/cpython/pull/18052
___
Python tracker
<https://bugs.python.org/issue35
Change by Nick Coghlan :
--
pull_requests: +17447
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18052
___
Python tracker
<https://bugs.python.org/issu
Change by Nick Coghlan :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
type: behavior -> enhancement
versions: -Python 3.8
___
Python tracker
<https://bugs.python
Nick Coghlan added the comment:
New changeset 1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d by Nick Coghlan (Géry
Ogam) in branch 'master':
bpo-39048: Look up __aenter__ before __aexit__ in async with (GH-17609)
https://github.com/python/cpython/commit/1d1b97ae643dd8b22d87785ed7bd25
Nick Coghlan added the comment:
Aye, adding "floor" to the existing footnote would be the minimal fix. I'm just
wondering whether it's also worth stating that this means that positive
integers saturate at zero, while negative int
Nick Coghlan added the comment:
Changed target version as per Petr's comment (PEP 573 is close to being
accepted for 3.9 - it just needs some editing to improve clarity in the PEP
itself, rather than needing any changes to the technical proposal)
--
versions: +Python 3.9 -Pytho
New submission from Nick Coghlan :
While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security
annex, I found a description of operand coercion that was based on the legacy
coercion model described at https://docs.python.org/2.5/ref/coercion-rules.html
That's
New submission from Nick Coghlan :
While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security
annex, I noticed that
https://docs.python.org/3.7/library/stdtypes.html#bitwise-operations-on-integer-types
doesn't explicitly state that *floor* division is used for r
Change by Nick Coghlan :
--
pull_requests: -17306
___
Python tracker
<https://bugs.python.org/issue37194>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nick Coghlan added the comment:
Thinking about that idea further, I don't think that change would help much,
since the relevant operations should already be checking for thread termination
when they attempt to reacquire the GIL.
That means what we're missing is:
1. When daem
Nick Coghlan added the comment:
Perhaps we need a threading.throw() API, similar to the one we have for
generators and coroutines?
If we had that, then Py_FinalizeEx() could gain a few new features:
* throw SystemExit into all daemon threads and then give them a chance to
terminate before
Nick Coghlan added the comment:
With the sys.argv[0] change reverted, I think this overall issue is fixed now -
code objects will get absolute paths, while sys.argv[0] will continue to
reflect how __main__ was identified.
--
priority: -> normal
resolution: -> fixed
stage:
Nick Coghlan added the comment:
New changeset 226e6e7d4326cf91ef37e13528eb1f62de1bb832 by Nick Coghlan (Géry
Ogam) in branch 'master':
bpo-39037: Fix lookup order of magic methods in with statement documentation
(GH-17608)
https://github.com/python/cpyt
New submission from Nick Coghlan :
The Py_NewInterpreter docs only cover the behaviour of extension modules that
use single-phase initialization:
https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreter
Multi-phase initialization allows each subinterpreter to get its own copy of
Nick Coghlan added the comment:
Right, that's why I don't think the other "*SetItem*" operations should get a
Sphinx note - just a sentence, as was already done for PySequence_SetItem.
If it weren't for PyList_SetItem being different, none of the others would need
Change by Nick Coghlan :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
stage: -> needs patch
type: -> enhancement
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
New submission from Nick Coghlan :
The documentation for PyList_SetItem is explicit that it steals a reference to
the passed in value, and drops the reference for any existing entry:
https://docs.python.org/3.3/c-api/list.html?highlight=m#PyList_SetItem
The documentation for PyDict_SetItem
Nick Coghlan added the comment:
New changeset 79f02fee1a542c440fd906fd54154c73fc0f8235 by Nick Coghlan (Xtreak)
in branch 'master':
bpo-39033: Fix NameError in zipimport during hash validation (GH-17588)
https://github.com/python/cpython/commit/79f02fee1a542c440fd906fd54154c
Nick Coghlan added the comment:
Thanks for your patience Michael!
I made some cosmetic changes to the error handling logic that you may want to
include in the PyPA patches. (I'd intended to make it so that a malformed build
date resulted in the "Unknown" "9898" buil
Nick Coghlan added the comment:
New changeset 39afa2d3147e4b05a1161cc90dbf09b95072c2bb by Nick Coghlan (Michael
Felt) in branch 'master':
bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)
https://github.com/python/cpython/commit/39afa2d3147e4b05a1161cc90dbf09
Nick Coghlan added the comment:
There's a reason multiprocessing in spawn mode jumps through the hoops that it
does: it's the only way to get __main__ pickling to work when you're not
forking the entire process.
You also don't want to naively re-run __main__ in the sub
Nick Coghlan added the comment:
Leaving the relationship between pickle and __name__ alone wasn't an oversight,
as folks already rely on that to gracefully transition from single-file modules
to multi-file packages without breaking pickle compatibility in either
direction. The trick
Nick Coghlan added the comment:
It's a matter of historical timing: PEP 343 was written before
try/except/finally was allowed, when try/finally and try/except were still
distinct statements.
However, PEP 341 was *also* accepted and implemented for Python 2.5, allowing
for the moder
Nick Coghlan added the comment:
There's a compatibility problem with changing the AIX distutils platform prefix
from aix to AIX: any existing code that does
"distutils.get_platform().startswith('aix')" will break. (There isn't any code
in the standard library
Nick Coghlan added the comment:
Removing 3.9 from the target versions, as similar to other platform tag
improvements, emulation on older release versions will be the domain of
cross-version libraries, rather than changing the standard library in a
maintenance.
--
versions: -Python
Nick Coghlan added the comment:
For folks that aren't aware, Michael and I have been discussing the AIX package
tagging problem via email since his initial distutils-sig posts about it.
It's genuinely murky as fixing the AIX problem doesn't *technically* require
any PEP 425
Nick Coghlan added the comment:
[Belatedly updating this issue with the current status as of March]
Cameron's implementation generally looks good, but there are couple of
compatibility/migration questions that we need to consider, as spelled out in
the PEP update that added me as
Nick Coghlan added the comment:
This change isn't in Python 3.8 though, it's only in Python 3.9 (the PR merge
date is after the beta 1 branch date).
Unless it was backported in a Python 3.8 PR that didn't link back to this issue
or the origina
Nick Coghlan added the comment:
After writing my previous comment, I double-checked the code, and
cached_propery is actually one of the cases where a simple "self.attrname =
'age3'" *will* do the right thing, as cached_property never checks the class
information.
Th
Nick Coghlan added the comment:
Regarding the "attrname" property idea: unfortunately, that won't work, as
`__set_name__` doesn't just provide the attribute name, it also provides a
reference to the class itself.
cached_property needs both pieces of information, not jus
Nick Coghlan added the comment:
Another interesting question this raises is whether type.__setattr__ should be
checking for values that have `__set_name__` methods defined and calling those
methods automatically.
Unfortunately, I think the answer to that is "If we'd thought of
Nick Coghlan added the comment:
I think that's a valid point regarding sys.argv[0] - it's the import system and
code introspection that wants(/needs) absolute paths, whereas sys.argv[0] gets
used in situations (e.g. usage messages) where we should retain whatever the OS
gave us,
Nick Coghlan added the comment:
Yes, this is a design flaw in the Python 2 import system - it derives
`__package__` from `__name__` the first time it needs the information and
`__package__` isn't already set.
The problem was fixed for the Python 3 series by way of PEP 451, which
Nick Coghlan added the comment:
The benefit offered by the parent local scoping was that it made assignment
expressions usable as a straightforward way to implement comprehension-based
accumulators where you actually do want access to the final value after the
comprehension completes (for
Nick Coghlan added the comment:
(Removed the patch keyword, as the linked PR was for an old change that didn't
cover the remaining test issues)
--
___
Python tracker
<https://bugs.python.org/is
Nick Coghlan added the comment:
There are a couple of cases that the C locale coercion tests skip because I
don't (or didn't) know what they *should* do:
*
https://github.com/python/cpython/blob/24dc2f8c56697f9ee51a4887cf0814b6600c1815/Lib/test/test_c_locale_coercion.py#L262
Nick Timkovich added the comment:
The `[arg [arg ...]]` feels a bit more formal to me, and I might prefer it in
the example shown where the arg name is fairly short. That said, `man mv` shows
something like:
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv
Nick Coghlan added the comment:
Agreed. I've also added PEP 587 to the issue title to make the connection to
that PEP more obvious.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
title: PEP 432: Redesign the interpreter startup seque
Nick Coghlan added the comment:
Just noting for the record that the reason a new warning wasn't needed here is
because there is already a general "No compatibility guarantees" warning for
the entire test package: https://docs.python.org/3/library/test.html
Thanks for gettin
Change by Nick Coghlan :
--
keywords: +patch
pull_requests: +16084
stage: commit review -> patch review
pull_request: https://github.com/python/cpython/pull/16496
___
Python tracker
<https://bugs.python.org/issu
Nick Coghlan added the comment:
(I'm currently working a PR for this that Victor can review)
--
assignee: -> ncoghlan
___
Python tracker
<https://bugs.python.org
New submission from Nick Coghlan :
(Nosy list is RM, PEP 587 BDFL-Delegate, PEP 587 author)
Filing as a release blocker, given that I don't think we should ship rc1 until
consensus has been reached on the last minute changes to the PEP 587
configuration API.
Thread at
Nick Coghlan added the comment:
The hidden _config_version field wasn't in the accepted PEP.
Both it and struct_size should be removed, as we don't support updating an
embedded Python runtime to a new X.Y.0 release without rebuilding the embedding
application.
--
nosy:
Nick Coghlan added the comment:
Thanks for the PR, Ram, and the initial review, Serhiy.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bug
Nick Coghlan added the comment:
New changeset 9c2682efc69568e1b42a0c1759489d6f2e3b30ea by Nick Coghlan (Ram
Rachum) in branch 'master':
bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439)
https://github.com/python/cpython/commit/9c2682efc69568e1b42a0c1759489d
Nick Coghlan added the comment:
It's also not unique to with statements - it applies to all finally clauses.
The longstanding workaround when deterministic cleanup is absolutely critical
has been to run the "real" application in a subthread, and devote the main
threa
101 - 200 of 6508 matches
Mail list logo