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/64abf373444944a240274a9b6d66d1
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:
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 allo
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 informa
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
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 altern
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/is
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
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:
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
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:
> "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
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 the
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
Change by Gregory P. Smith :
--
resolution: -> wont fix
___
Python tracker
<https://bugs.python.org/issue7946>
___
___
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 :
--
priority: normal -> high
___
Python tracker
<https://bugs.python.org/issue42899>
___
___
Python-bugs-list mailing list
Un
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 the
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
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:
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 to
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:
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
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.
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:
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/e1f77695132e814728cda982f11342
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/e1f77695132e814728cda982f11342
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 -> co
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:
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
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/c
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:
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
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:
This bug is valid, that macro and likely others aren't up to best practices.
C macros are a PITA to get right.
--
keywords: +3.9regression
nosy: +gregory.p.smith
stage: -> needs patch
type: -> compile error
versions: +
Change by Gregory P. Smith :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue43181>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
seems likely. reopen if this is still relevant to any modern release.
--
nosy: +gregory.p.smith
resolution: -> out of date
stage: -> resolved
status: open -> closed
title: Support for C++ 11 and/or C++ 14 in python.org installer -> Su
Change by Gregory P. Smith :
--
title: Leak of locks in a subprocess -> Leak of locks from
multiprocessing.Process
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
New changeset fd053fdd39fbdf114b4218ea4309666bafa95788 by Gregory P. Smith in
branch 'master':
bpo-43172: readline now passes its tests when built against libedit (GH-24499)
https://github.com/python/cpython/commit/fd053fdd39fbdf114b4218ea430966
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:
FYI - This was somewhat of an unfortuate API change. I'm coming across code
that relies on ; also being treated as a separator by parse_qs(). That code is
now broken with no easy way around it.
And I'm only seeing things lucky enough to have a
Gregory P. Smith added the comment:
An example code snippet to detect if the API supports the new parameter at
runtime for code that wants to use to use something other than the default '&'.
```
if 'separator' in inspect.signature(urllib.parse.parse_qs).para
Gregory P. Smith added the comment:
I clarified the documentation in the PR and added a regression test.
I chose to explicitly document that tempfile.tempdir may only be str or bytes
and cannot be a path-like object.
We already document that people really should not set it and instead pass
New submission from Gregory P. Smith :
https://github.com/python/cpython/pull/20442/checks?check_run_id=2018900756
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca
(_ssl.c:1122)
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local
issuer
New submission from Gregory P. Smith :
PyOS_setsig currently sets the struct sigaction context.sa_flags = 0 before
calling sigaction.
Other virtual machines such as Golang depend on signals using SA_ONSTACK such
that signal handlers use a specially allocated stack that runtime sets up for
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +23502
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24730
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
type: -> resource usage
___
Python tracker
<https://bugs.python.org/issue43390>
___
___
Python-bugs-list mailing list
Un
Gregory P. Smith added the comment:
How do I get a CI run on a PR to actually pickup this change? clicking rerun
failed.
--
___
Python tracker
<https://bugs.python.org/issue43
Gregory P. Smith added the comment:
yeah i figured it might require a rebase. if anyone has the appropriate git
command to do that to a branch, creating a 2-4 step CLI playbook for people to
apply to pending PR branches would be useful
Gregory P. Smith added the comment:
we may not need that: Closing and reopening the PR worked. I suspect the
github CI "rerun" button was "rerun in the exact same config".
--
___
Python tracker
<https://bug
Gregory P. Smith added the comment:
New changeset 9c7927400cd8f1d283bf7915b6b33fea81b8655d by Eric L in branch
'master':
bpo-40701: tempfile mixes str and bytes in an inconsistent manner (GH-20442)
https://github.com/python/cpython/commit/9c7927400cd8f1d283bf7915b6b33f
Gregory P. Smith added the comment:
New changeset b225d91f0a92d657d9a1b62daa53ab239c8191e3 by Kamil Turek in branch
'master':
bpo-43391: Remove the broken Python 2.4 link from the comment (GH-24736)
https://github.com/python/cpython/commit/b225d91f0a92d657d9a1b62daa53ab
New submission from Gregory P. Smith :
As noted in the comment on
https://github.com/rdiff-backup/rdiff-backup/issues/540#issuecomment-789485896
The Python documentation in https://docs.python.org/3/library/os.path.html
makes an odd claim that bytes cannot represent all file names on Windows
Gregory P. Smith added the comment:
New changeset 02ac6f41e5569ec28d625bb005155903f64cc9ee by Gregory P. Smith in
branch 'master':
bpo-43390: Set SA_ONSTACK in PyOS_setsig (GH-24730)
https://github.com/python/cpython/commit/02ac6f41e5569ec28d625bb0051559
Gregory P. Smith added the comment:
I expect zero fallout from this given the semantics. SA_ONSTACK really appears
to be something that should've been the POSIX default since it was introduced
as a feature in ~BSD4.2 in the early 80s. But it never was.
It'll be good to have i
Gregory P. Smith added the comment:
yep, that'd be a worthwhile improvement. note that the send method in that
code also accepts BytesIO objects so rather than doing our own sequence of
bytes and join we could just buffer in one of
Change by Gregory P. Smith :
--
stage: -> needs patch
___
Python tracker
<https://bugs.python.org/issue43332>
___
___
Python-bugs-list mailing list
Unsubscrib
Gregory P. Smith added the comment:
FYI another common socket idiom for this, specifically added for use in old
HTTP 1.x servers building up responses, is setting and clearing the TCP_CORK
(Linux) or TCP_NOPUSH (FreeBSD, and maybe macos? [buggy?]) socket option before
and after the set of
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +23545
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24780
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue43332>
___
___
Python-bugs-list mailing list
Un
Gregory P. Smith added the comment:
New changeset c25910a135c2245accadb324b40dd6453015e056 by Gregory P. Smith in
branch 'master':
bpo-43332: Buffer proxy connection setup packets before sending. (GH-24780)
https://github.com/python/cpython/commit/c25910a135c2245accadb324b40dd6
Gregory P. Smith added the comment:
I only ported this back to 3.9 as it is a bit late in 3.8's release cycle for a
pure performance fix of an issue that has been around for ages.
Thanks for raising the issue. The main http code already did this, the tunnel
proxy code path clearly h
Gregory P. Smith added the comment:
Riccardo - FWIW I agree, the wrong part of the stack was blamed and a CVE was
wrongly sought for against CPython on this one.
It's sewage under the bridge at this point. The API change has shipped in
several different stable releases and thus is some
New submission from Gregory P. Smith :
https://buildbot.python.org/all/#/builders/727
test_tuples (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of tuples ... ok
test_bt (test.test_gdb.PyBtTests)
Verify that the "py-bt" command works ... FAIL
Stderr:
Python Excepti
Gregory P. Smith added the comment:
Could you please turn that into a Github PR?
--
___
Python tracker
<https://bugs.python.org/issue40701>
___
___
Python-bug
Gregory P. Smith added the comment:
I disagree. Many of these do belong in the stdlib and we don't need a
python-ideas bike shedding 300 message thread about something so trivial.
We've been using these internally at Google for years.
Its on my plate to identify which ones to
Gregory P. Smith added the comment:
Christian - Devin could likely use some help with the build/ifdef plumbing
required for (2) to use CRYPTO_memcmp from Modules/_operator.c when OpenSSL is
available.
--
assignee: -> christian.heimes
___
Pyt
Gregory P. Smith added the comment:
We consider it closer to new feature as it changes existing behavior in a way
that people cannot _depend_ on being present in older Python releases as it'd
only appear in a bugfix release, so most people could never write code
depending on it
Gregory P. Smith added the comment:
I'd feel fine doing that for 3.9 given 3.9.0 is only in beta and this changes
no public APIs. For 3.8 and 3.7 i wouldn't.
Be sure to update the versionchanged in the docs if you choose to do
Gregory P. Smith added the comment:
I expect the best decision to be to get rid of tempfile.tempdir entirely. That
would need be its own issue with a deprecation period involved.
A process global that alters behavior of all calls into a module that don't
explicitly opt-out is a ba
Change by Gregory P. Smith :
--
nosy: -gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue25782>
___
___
Python-bugs-list mailing list
Unsub
Change by Gregory P. Smith :
--
versions: +Python 3.10 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue35823>
___
___
Python-bugs-list mailin
Change by Gregory P. Smith :
--
title: subprocess_fork_exec leaks memory -> subprocess_fork_exec leaks memory
when extra_groups are supplied
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue37193>
___
___
Python-bugs-list m
Gregory P. Smith added the comment:
I suggest waiting to see what I come up with as a proposal for what part(s) of
this makes sense in the stdlib and why. I've closed the PR.
Nothing is going to be added to mock without your agreement.
This issue is not a high priority for me, but le
New submission from Gregory P. Smith :
*** CID 1464693: Null pointer dereferences (REVERSE_INULL)
/Modules/_zoneinfo.c: 1625 in parse_abbr()
1619 ptr++;
1620
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +20181
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21007
___
Python tracker
<https://bugs.python.org/issu
Change by Gregory P. Smith :
--
pull_requests: +20183
pull_request: https://github.com/python/cpython/pull/21009
___
Python tracker
<https://bugs.python.org/issue41
Change by Gregory P. Smith :
--
pull_requests: +20185
pull_request: https://github.com/python/cpython/pull/21011
___
Python tracker
<https://bugs.python.org/issue41
Gregory P. Smith added the comment:
those were the three in the email (20 of 106), i need to figure out how to
login to coverity again to see the rest.
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Gregory P. Smith :
--
components: +Interpreter Core
___
Python tracker
<https://bugs.python.org/issue41059>
___
___
Python-bugs-list mailing list
Unsub
New submission from Gregory P. Smith :
Here's an example:
*** CID 1464688: Control flow issues (DEADCODE)
/Parser/parser.c: 24243 in _tmp_147_rule()
24237 &&
24238 (z = disjunction_rule(p)) // disjunction
24239 )
24240
Change by Gregory P. Smith :
--
pull_requests: +20187
pull_request: https://github.com/python/cpython/pull/21013
___
Python tracker
<https://bugs.python.org/issue41
Change by Gregory P. Smith :
--
nosy: +christian.heimes
___
Python tracker
<https://bugs.python.org/issue41059>
___
___
Python-bugs-list mailing list
Unsub
New submission from Gregory P. Smith :
This type of change might make more sense to integrate into configure.ac and
pyconfig.h.in. (does haiku use autoconf?)
But even if not, lets not scatter haiku ifdef HAIKU references all over the
codebase. Such ifdef's to redefine things shou
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:
The 3.7 PR is up to the release manager to decide on, it probably isn't worth
merging there as this i not security related. thanks for the fix Serhiy!
--
nosy: +gregory.p.smith
___
Python tracker
&
Gregory P. Smith added the comment:
No objections, it would be great to see this finished up and land.
I've encountered a minority of users who are using a wrapped vfork-based C/C++
library for process spawning as fork+exec isn't fast enoug
Change by Gregory P. Smith :
--
nosy: +steve.dower
___
Python tracker
<https://bugs.python.org/issue41151>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
and to echo others: Do not worry about LD_PRELOAD users trying to override
internals. That is not a supported use case. It is always a hack. anyone
using it knows this.
--
___
Python tracker
<ht
Gregory P. Smith added the comment:
Yes this should become part of --with-optimizations when building on a platform
using a compiler that (a) supports it and (b) where it matters.
If this is only relevant on --enable-shared builds (not the default), i'd
assume also make it condition
Gregory P. Smith added the comment:
I probably I wrote these docs (a long time ago). The examples are being used
to demonstrate different uses of the APIs including calling update multiple
times, different algorithms, a binary digest and a hex digest.
They weren't mean to
New submission from Gregory P. Smith :
See https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/ for
inspiration and a reference (possibly a library to use, but if not the
techniques still apply).
Primarily usable when creating the float objects from the string data as is
common
Gregory P. Smith added the comment:
Thanks for the analysis Eryk! I think you are right, changing the default to
match the behavior that people have actually been experiencing on `os.link(src,
dst)` makes sense.
Possible suggestion:
We can go one step further if anyone believes it is
Gregory P. Smith added the comment:
A workaround should be pass bufsize=0.
There might be performance consequences. That depends on your read patterns
and child process.
If this is to be supported and fixed, the selectors used in POpen._communicate
on the POSIX side presumably don
Gregory P. Smith added the comment:
Thanks!
fyi for confirmation incase anyone doubted:
>>> issubclass(ssl.SSLEOFError, OSError)
True
So from a code point of view, anything already catching the error still catches
the error. 100% bugfix.
--
assignee: christi
Gregory P. Smith added the comment:
While this is present in 3.7 (and earlier?), 3.7 is EOL - security fix only
stage. the 3.8 and 3.9 PRs should automerge after CI finishes.
please reopen the issue or ping me on those PRs if they somehow fail to do so.
--
resolution: -> fi
Change by Gregory P. Smith :
--
pull_requests: -21037
___
Python tracker
<https://bugs.python.org/issue41566>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
fwiw, no PEP is needed for things like this. it'd just be an alternative
library implementing the core of the zlib and/or gzip modules behind the scenes.
normally this kind of thing would be done using a check for the availability of
the libra
Change by Gregory P. Smith :
--
assignee: -> gregory.p.smith
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue41586>
___
___
Python-
1401 - 1500 of 3274 matches
Mail list logo