Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +23288
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24499
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
examining the behaviors being tested, it seems there are differences in 0 and 1
based indexing behaviors between libreadline and libedit.
libedit frankly seems more consistent. but the Python readline module docs
document the 0 and 1 based quirks as part
Gregory P. Smith added the comment:
https://github.com/python/buildmaster-config/pull/229 tracks my buildbot config
update
--
___
Python tracker
<https://bugs.python.org/issue43
Gregory P. Smith added the comment:
That seems like a good idea to prevent regressions if anyone knows how to do
that.
For python.org/dev/'s buildbot fleet, the configuration of what configure and
make flags happens via
https://github.com/python/buildmaster-config/tree/master/master/custom
Gregory P. Smith added the comment:
Motivation: I want to add --with-readline=edit to the configure flags of one of
my buildbot configs via an edit to
https://github.com/python/buildmaster-config/tree/master/master/custom
--
___
Python tracker
New submission from Gregory P. Smith :
https://bugs.python.org/issue13501 added configure --with-readline=edit support
so that the readline module can build and link against libedit on any platform
instead of only using libreadline.
Building Python that way on Debian Linux and running
Gregory P. Smith added the comment:
I'm closing this as I believe everything we need done is done at this point.
Open new issues if there are remaining libedit vs libreadline things to take
care of.
Thanks everyone!
--
resolution: -> fixed
stage: patch review -> commit
Gregory P. Smith added the comment:
New changeset e1f77695132e814728cda982f11342a2e3c7272c by Roland Hieber in
branch 'master':
bpo-13501: allow choosing between readline and libedit (GH-24189)
https://github.com/python/cpython/commit/e1f77695132e814728cda982f11342a2e3c7272c
Gregory P. Smith added the comment:
New changeset e1f77695132e814728cda982f11342a2e3c7272c by Roland Hieber in
branch 'master':
bpo-13501: allow choosing between readline and libedit (GH-24189)
https://github.com/python/cpython/commit/e1f77695132e814728cda982f11342a2e3c7272c
Gregory P. Smith added the comment:
That bash produces a nicer error message is because bash happens to implement
its own special logic to try and figure out why an exec failed with an error
other than ENOEXEC. The OS kernel & libc do not give it that information,
there is no such e
Gregory P. Smith added the comment:
I'm pretty sure this is fixed for 3.8+.
whether or not it should be considered a bugfix and backported to 3.7.x is
probably too late at this point in release lifecycles anyways.
thanks for raising this and the fixing PR!
--
nosy: +gregory.p.smith
Gregory P. Smith added the comment:
Have you tried this on a more recent Python? works for me on 3.7.8 on macos.
Python 3.7.8 (v3.7.8:4b47a5b6ba, Jun 27 2020, 04:47:50)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "lice
Change by Gregory P. Smith :
--
title: pthread_exit & PyThread_exit_thread are harmful -> pthread_exit &
PyThread_exit_thread from PyEval_RestoreThread etc. are harmful
___
Python tracker
<https://bugs.python.
Gregory P. Smith added the comment:
C-APIs such as `PyEval_RestoreThreads()` are insufficient for the task they are
asked to do. They return void, yet have a failure mode.
They call pthread_exit() on failure today.
Instead, they need to return an error to the calling application
New submission from Gregory P. Smith :
## BACKGROUND
`PyThread_exit_thread()` calls `pthread_exit(`) and is in turn called from a
variety of APIs as documented in the C-API doc update from
https://bugs.python.org/issue36427.
The `pthread_exit()` call was originally introduced as a way
Gregory P. Smith added the comment:
Agreed, using a dict or set hash table lookup is more appropriate for such an
algorithm.
Also agreed: comparing python integers (30-bit digit bignums internally) cannot
be faster than comparing a binary bytes object
Gregory P. Smith added the comment:
If the body of a conditional does nothing, it seems fine to optimize the
condition out to me. But I see code from a low level compiled language
perspective where that is clearly what would happen. In reality, who ever
meaningfully writes code where
Change by Gregory P. Smith :
--
priority: normal -> high
___
Python tracker
<https://bugs.python.org/issue42899>
___
___
Python-bugs-list mailing list
Un
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue42899>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Gregory P. Smith :
--
resolution: -> wont fix
___
Python tracker
<https://bugs.python.org/issue7946>
___
___
Python-bugs-list mailing list
Un
Gregory P. Smith added the comment:
Felt and understood.
The plethora of things to do between (v)fork+exec really makes me wish for a
"little" eBPF interpreter rather than needing so much specific plumbing. But
that'd have the same problem as preexec_fn: in absence of
Gregory P. Smith added the comment:
Thanks for the golang SysProcAttr reference. The internals of _posixsubprocess
have already becoming unwieldy with the abundance of args. Such a
struct/object would also fit in well there and avoid excessive C stack use.
(as izbyshev noted during
Gregory P. Smith added the comment:
> "using Python is more portable than relying on a shell."
Not in environments I use. :) There isn't an installed python interpreter that
can be executed when deploying Python as an embedded interpreter such as anyone
using pyoxidizer or s
Gregory P. Smith added the comment:
Note that vfork() support has been merged for 3.10 via bpo-35823, so
posix_spawn() is less of a performance carrot than it used to be on Linux.
vfork() exists macOS, that code could likely be enabled there after some
investigation+testing.
Regardless
Gregory P. Smith added the comment:
Doing the code inspection of existing preexec_fn= users within our codebase at
work is revealing. But those seem to be the bulk of uses.
I expect this deprecation to take a while. Ex: if we mark it as
PendingDeprecationWarning in 3.10, I'd still wait
Change by Gregory P. Smith :
--
pull_requests: +22786
pull_request: https://github.com/python/cpython/pull/23936
___
Python tracker
<https://bugs.python.org/issue38
Gregory P. Smith added the comment:
signal.signal use case:
Calls to signal.signal(x, y) to sometimes to set a non SIG_DFL behavior on a
signal. SIGINT -> SIG_IGN for example.
I see a lot of legacy looking code calling signal.signal in prexec_fn that
appears to set SIG_DFL for the sign
Gregory P. Smith added the comment:
I'm also seeing a lot of os.setpgrp() calls, though those are more likely able
to use start_new_session to do setsid() as a dropin replacement.
--
___
Python tracker
<https://bugs.python.org/issue38
Gregory P. Smith added the comment:
Another preexec_fn use to consider:
resource.setrlimit(resource.RLIMIT_CORE, (XXX, XXX))
Using an intermediate shell script wrapper that changes the rlimit and exec's
the actual process is also an alternative
Gregory P. Smith added the comment:
https://bugs.python.org/issue42736 filed to track adding Linux prctl() support.
--
___
Python tracker
<https://bugs.python.org/issue38
New submission from Gregory P. Smith :
Another use of `subprocess preexec_fn=` that I've come across has been to call
Linux's `prctl` in the child process before the `exec`.
`_libc.prctl(_PR_SET_PDEATHSIG, value)` for example.
Adding a linux_prctl_calls= parameter listing information about
Gregory P. Smith added the comment:
PR up to add setpgid support. From what I've come across, some setpgid() users
can use setsid() already available via start_new_session= instead. But rather
than getting into the differences between those, making both available makes
sense to allow
Gregory P. Smith added the comment:
Meta issue behind this one: The input= behavior on check_output is yet another
unfortunate wart in the subprocess collection of APIs.
PR to the main branch is in, 3.9 and 3.8 will automerge after CI runs.
--
resolution: -> fixed
stage: pa
Gregory P. Smith added the comment:
New changeset 64abf373444944a240274a9b6d66d1cb01ecfcdd by Gregory P. Smith in
branch 'master':
bpo-42388: Fix subprocess.check_output input=None when text=True (GH-23467)
https://github.com/python/cpython/commit/64abf373444944a240274a9b6d66d1cb01ecfcdd
Change by Gregory P. Smith :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue38435>
___
___
Python-bugs-list mailin
Gregory P. Smith added the comment:
New changeset 8badadec53cbf9dc049c5b54198c5689481e3f3f by Gregory P. Smith in
branch 'master':
bpo-42727: Fix the NEWS entry .rst (GH-23932)
https://github.com/python/cpython/commit/8badadec53cbf9dc049c5b54198c5689481e3f3f
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
nosy_count: 2.0 -> 3.0
pull_requests: +22782
pull_request: https://github.com/python/cpython/pull/23932
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +22780
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/23930
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
arguably run() with check=True could've turned the OSError into a
CalledProcessError [can't do that now, someone surely depends on it]. So if
both are supplied, perhaps it does that instead of returning a CompletedProcess
with .oserror set?
the API
Gregory P. Smith added the comment:
We could also be thinking too low level here. We don't have to re-use
returncode for this or do it on POpen itself. This could be done at the
`run()` API level and CompletedProcess could be given state indicating success
or failure of the exec itself
Gregory P. Smith added the comment:
I suggest just adding a couple options to getstatusoutput instead of wrangling
new to-catch-or-not-to-catch APIs if code like your test_posix example is what
you want to replace.
--
___
Python tracker
<ht
Gregory P. Smith added the comment:
The shell was isolating the user from the exec error by always existing and
turning the exec error into a status return.
>>> subprocess.run('foo', shell=True)
/bin/sh: line 1: foo: command not found
CompletedProcess(args='foo', retur
Gregory P. Smith added the comment:
New changeset fdb9efce6ac211f973088eef508740c3fa2bd182 by vabr-g in branch
'master':
bpo-41877: Check for misspelled speccing arguments (GH-23737)
https://github.com/python/cpython/commit/fdb9efce6ac211f973088eef508740c3fa2bd182
Change by Gregory P. Smith :
--
resolution: out of date -> fixed
stage: patch review -> commit review
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
New changeset 42c9f0fd0a5e67d4ae0022bfd7370cb9725a5b01 by Gregory P. Smith in
branch 'master':
bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)
https://github.com/python/cpython/commit/42c9f0fd0a5e67d4ae0022bfd7370cb9725a5b01
Gregory P. Smith added the comment:
While I said i didn't care... and don't really want to... I found a reason to
at least not omit pep-570 positional only arg parsing support give things like
yapf still use it rather than forking their own copy. PR testing.
--
assignee
Change by Gregory P. Smith :
--
pull_requests: +22615
pull_request: https://github.com/python/cpython/pull/23759
___
Python tracker
<https://bugs.python.org/issue36
Gregory P. Smith added the comment:
The Linux kernel code is not sufficiently easy to follow to understand if it
has this issue or if it pre-creates the dirent structures for all fds at
opendir time for /proc/self/fd or if it is iterating through the list of fds in
sorted order so an older
Gregory P. Smith added the comment:
New changeset 8d4f57dbd10846ffb4881b6509a511be0ab3b913 by pxinwr in branch
'master':
bpo-31904: fix test_doctest.py failures for VxWorks (GH-23419)
https://github.com/python/cpython/commit/8d4f57dbd10846ffb4881b6509a511be0ab3b913
--
nosy
Gregory P. Smith added the comment:
I agree with Victor. When code launches a process with subprocess APIs, it is
expected that the subprocess module manages the process.
Calling os.waitpid directly instead of using subprocess's APIs breaks that
expectation.
Also, WNOWAIT and waitid
Gregory P. Smith added the comment:
thanks Renato!
--
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
New changeset 86684319d3dad8e1a7b0559727a48e0bc50afb01 by Renato Cunha in
branch 'master':
bpo-42406: Fix whichmodule() with multiprocessing (GH-23403)
https://github.com/python/cpython/commit/86684319d3dad8e1a7b0559727a48e0bc50afb01
Gregory P. Smith added the comment:
gross / nice find :)
--
assignee: -> gregory.p.smith
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
FWIW, while i'm never a fan of doctests, this would also help reduce the impact
of other golden value tests where different platforms capitalize their error
messages or not.
--
nosy: +gregory.p.smith
versions: +Python 3.10 -Python 3.3
Gregory P. Smith added the comment:
Given that pickle is documented as:
"""
Warning The pickle module is not secure. Only unpickle data you trust.
It is possible to construct malicious pickle data which will execute arbitrary
code during unpickling.
"""
htt
Gregory P. Smith added the comment:
Thanks for the suggestion though ThatXliner. It is good for us to keep these
things in mind for future API designs. That __bool__ exists and could be
meaningful in some contexts is often overlooked.
--
resolution: -> rejected
st
Gregory P. Smith added the comment:
My concern with this as an API change is if anyone is returning or passing a
CompletedProcess instance around it may well be used in a context where None is
a potential value. Existing code in that situation would ordinarily be doing a
bare `if cp:` test
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue42468>
___
___
Python-bugs-list mailing list
Un
Change by Gregory P. Smith :
--
components: +Library (Lib)
___
Python tracker
<https://bugs.python.org/issue42443>
___
___
Python-bugs-list mailing list
Unsub
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue42443>
___
___
Python-bugs-list mailing list
Un
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue42388>
___
___
Python-bugs-list mailing list
Un
Gregory P. Smith added the comment:
It was a mere oversight that this didn't handle text= the same as
universal_newlines=. I made a PR to keep their behavior consistent and match
the documentation.
--
___
Python tracker
<https://bugs.python.
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +22357
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23467
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
I expect several phases here:
(1) add a .dedent() method to str (and bytes?) - behaviors to consider
mirroring are textwrap.dedent() and inspect.cleandoc(). Given their utility
and similarities, it makes sense to offer both behaviors; behavior could
Gregory P. Smith added the comment:
(assigning to me as I want to help remi.lapeyre's .dedent() method PR move
forward)
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue36906>
___
___
Python-bugs-list mailin
Gregory P. Smith added the comment:
Thanks for the patch!
PRs are in or on their way in for 3.10 and 3.9.
The 3.8 auto-backport failed, if anyone wants it on a future 3.8.x please
follow up with a manual cherry pick to make a PR for the 3.8 branch.
--
resolution: -> fixed
st
Gregory P. Smith added the comment:
New changeset 01a202ab6b0ded546e47073db6498262086c52e9 by Filipe LaĆns in
branch 'master':
bpo-40550: Fix time-of-check/time-of-action issue in
subprocess.Popen.send_signal. (GH-20010)
https://github.com/python/cpython/commit
Change by Gregory P. Smith :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
I expect your overall logic is sound in the PR. But this is a public API
change, and while we've typically exempted lib2to3 from needing to concern
itself about deprecations and API changes by leaving it undocumented and
explicitly promising not to care
Gregory P. Smith added the comment:
New changeset 31729366e2bc09632e78f3896dbce0ae64914f28 by Devin Jeanpierre in
branch 'master':
bpo-40791: Make compare_digest more constant-time. (GH-20444)
https://github.com/python/cpython/commit/31729366e2bc09632e78f3896dbce0ae64914f28
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
nosy: +gregory.p.smith
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
For consistency, pathlib.Path.mkdir should also gain this option.
--
___
Python tracker
<https://bugs.python.org/issue42
Change by Gregory P. Smith :
--
type: behavior -> enhancement
___
Python tracker
<https://bugs.python.org/issue42367>
___
___
Python-bugs-list mailing list
Un
Gregory P. Smith added the comment:
This API change was not strictly a bugfix, it removed a feature existing code
was relying on.
https://bugs.python.org/issue42367 opened to reconcile the two.
--
nosy: +gregory.p.smith
___
Python tracker
<ht
New submission from Gregory P. Smith :
os.makedirs used to pass its mode argument on down recursively so that every
level of directory it created would have the specified permissions.
That was removed in Python 3.7 as https://bugs.python.org/issue19930 as if it
were a mis-feature. Maybe
Gregory P. Smith added the comment:
My point is that re.match is a common bug when people really want re.search.
re.prefixmatch makes it explicit and non-confusing and thus unlikely to be used
wrong or misunderstood when read or reviewed.
The term "match" when talking abo
New submission from Gregory P. Smith :
A well known anti-pattern in Python is use of re.match when you meant to use
re.search.
re.fullmatch was added in 3.4 via https://bugs.python.org/issue16203 for
similar reasons.
re.prefixmatch would be similar: we want the re.match behavior, but want
Gregory P. Smith added the comment:
working as intended, they aren't classes.
--
resolution: -> rejected
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
Not a big deal if we don't, I just found it odd so I figured I'd pose the
question. That it's been in three releases and only just now come up is
pretty telling that isn't critical.
The code in question was trying to identify public functions in a module
New submission from Gregory P. Smith :
Python 3.7-3.10a1:
```
>>> List.__name__
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.8/typing.py", line 760, in __getattr__
raise AttributeError(attr)
AttributeError: __name__
>
Gregory P. Smith added the comment:
This bug was introduced into the Python 3.6.8 "bugfix" release.
https://github.com/python/cpython/pull/23231 will fix it if anyone needs that
on modern 3.6.
--
nosy: +gregory.p.smith
versions: +
Gregory P. Smith added the comment:
my bad :)
--
resolution: -> not a bug
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
I suspect so. If any modern supported python 3.x version runs into an issue
like this I think opening a fresh bugreport is good.
Closing as not reproducable / obsolete.
--
resolution: -> out of date
stage: test needed -> resolved
status
Gregory P. Smith added the comment:
Thanks for the patch! I'm leaving this open as dealing with the other aspect:
* Wrong attribute names around asserts: autospect/auto_spec -> autospec,
set_spec -> spec_set
is still a possibility. (given you also found a number of those in our
co
Gregory P. Smith added the comment:
New changeset 4662fa9bfe4a849fe87bfb321d8ef0956c89a772 by vabr-g in branch
'master':
bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165)
https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772
Change by Gregory P. Smith :
--
versions: +Python 3.10 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue24651>
___
___
Python-bugs-list mailin
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue24651>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue41877>
___
___
Python-bugs-list mailing list
Un
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue41877>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
at a glance, it looks like the PR needs updating.
--
___
Python tracker
<https://bugs.python.org/issue13501>
___
___
Pytho
Change by Gregory P. Smith :
--
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
New changeset d3b4e068077dd26927ae7485bd0303e09d962c02 by Alexey Izbyshev in
branch 'master':
bpo-42146: Unify cleanup in subprocess_fork_exec() (GH-22970)
https://github.com/python/cpython/commit/d3b4e068077dd26927ae7485bd0303e09d962c02
New submission from Gregory P. Smith :
The opcodes generated for the closure defining a class body looks like they
might be suboptimal. It seems stuck using the generic LOAD_NAME and STORE_NAME
opcodes rather than the LOAD_GLOBAL and STORE_FAST and friends as one would
expect and as happens
Gregory P. Smith added the comment:
The first four bytes of the file do not identify a zip file. A zip file is
identified by the end of file central directory. Which you then must read
entries of to determine where the start of the archive may be... often not at
position zero
Gregory P. Smith added the comment:
ZipFile.open() is not the code for opening a zip file. :)
That's the code for opening a file embedded within an already constructed
mode='r' archive as done the ZipFile.__init__() constructor. By the time
you've gotten to the open() method, you've loaded
Gregory P. Smith added the comment:
New changeset c0590c0033e86f98cdf5f2ca6898656f98ab4053 by Alexey Izbyshev in
branch 'master':
bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid overflow
(GH-22966)
https://github.com/python/cpython/commit
Gregory P. Smith added the comment:
Performance improvement measured on a 1.4Ghz quad aarch64 A57 (nvidia jetson
nano):
#define VFORK_USABLE 1
test_subprocess: 36.5 seconds
#undef VFORK_USABLE
test_subprocess: 45 seconds
Nice. I really didn't expect a 20% speedup on its testsuite alone
Gregory P. Smith added the comment:
Nice links. LOL, yes, musl source was going to be my next stop if the larger
libc sources proved impossible for a mere mortal to reason about. :)
regarding macOS, agreed. If someone needs vfork() to work there, I believe it
could be made to.
Options
Gregory P. Smith added the comment:
New changeset be3c3a0e468237430ad7d19a33c60d306199a7f2 by Gregory P. Smith in
branch 'master':
bpo-35823: Allow setsid() after vfork() on Linux. (GH-22945)
https://github.com/python/cpython/commit/be3c3a0e468237430ad7d19a33c60d306199a7f2
501 - 600 of 3245 matches
Mail list logo