Gregory P. Smith added the comment:
+1 agreed. this is the simplest approach to start with.
Code to restrict: os.fork itself and disallowing the use of preexec_fn on
subprocess within subinterpreters.
feel free to ignore preexec_fn in subprocess for the time being if desired, we
already
Gregory P. Smith added the comment:
New changeset 19003841e965bbf56fd06824d6093620c1b66f9e by Gregory P. Smith in
branch 'master':
bpo-6721: Hold logging locks across fork() (GH-4071)
https://github.com/python/cpython/commit/19003841e965bbf56fd06824d60936
Change by Gregory P. Smith :
--
pull_requests: +8723
___
Python tracker
<https://bugs.python.org/issue34658>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Gregory P. Smith :
--
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
versions: -Python 3.6
___
Python tracker
<https://bugs.python.or
Gregory P. Smith added the comment:
Given the FreeBSD default and seeming desirability of vfork for this use case,
is there a good reason using vfork could not be the default behavior on any OS
that supports it?
--
___
Python tracker
<ht
Gregory P. Smith added the comment:
Give all of this, the lesson I'd take away is perhaps that we should just
provide the constant in the os module when available at build time (a configure
check) and let people who find a need to use it on their system check for its
presence and use
Gregory P. Smith added the comment:
Agreed on not exposing it.
It seems obsolete in recent glibc and the older glibc implementations that had
it may have made questionable decisions. :)
Thanks for chiming in Florian, and thanks Pablo for your detailed
investigation
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue34776>
___
___
Python-bugs-list m
Gregory P. Smith added the comment:
fwiw, agreed that this should wait for 3.7.2.
--
___
Python tracker
<https://bugs.python.org/issue34776>
___
___
Python-bug
Change by Gregory P. Smith :
--
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue29988>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Gregory P. Smith :
The following test code segfaults on Python 2.7:
```python
import io
class X(io.RawIOBase):
def readable(self):
return True
def readinto(self, b):
if isinstance(b, memoryview):
print(b.format) # XXX boom, crashes here.
return 0
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
versions: +Python 3.7, Python 3.8 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue15
Gregory P. Smith added the comment:
The problem with a SyntaxWarning is that the wrong people will see it. It gets
in the way of users of applications that happen to be written in Python.
scenarios:
(a) A Python interpreter gets upgraded, and suddenly the _users_ of an
application start
Gregory P. Smith added the comment:
If we were to ship a "chaos" mode in the CPython interpreter itself, I assume
you envision an interpreter flag and/or env var? If it required someone
compiling the interpreter a special way I don't think it would be widely
adopted wi
Gregory P. Smith added the comment:
The intent is to use only enable this during testing / continuous integration.
--
___
Python tracker
<https://bugs.python.org/issue34
Gregory P. Smith added the comment:
New changeset 3b699932e5ac3e76031bbb6d700fbea07492641d by Gregory P. Smith
(Miss Islington (bot)) in branch '3.7':
bpo-6721: Hold logging locks across fork() (GH-4071) (#9291)
https://github.com/python/cpyt
New submission from Gregory P. Smith :
These lines used to exist in Modules/expat/expat_external.h:
/* Namespace external symbols to allow multiple libexpat version to
co-exist. */
#include "pyexpatns.h"
https://github.com/python/cpython/commit/5dc3f23b5fb0b510926012cb3732dae63cd
Gregory P. Smith added the comment:
Not a release blocker as most users probably do not run into this problem, but
the pyexpatns.h mechanics should be restored.
--
assignee: -> gregory.p.smith
components: +Build, Extension Modules
nosy: +benjamin.peterson
stage: -> needs
Gregory P. Smith added the comment:
This appears to not have been shipped in a release yet. It is new in 3.6.7.
cc'ing ned daily to see if he wants to include the fix (the PR is trivial,
coming ASAP).
I don't have a good feel for how this impacts the real world or not.
We notic
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +9290
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Gregory P. Smith added the comment:
New changeset 9d4712bc8f26bf1d7e626b53ab092fe030bcd68d by Gregory P. Smith in
branch 'master':
bpo-35011: Restore use of pyexpatns.h in libexpat (GH-9939)
https://github.com/python/cpython/commit/9d4712bc8f26bf1d7e626b53ab092f
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:
correct, i don't see an obvious problem in the existing code.
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/is
Gregory P. Smith added the comment:
FYI, An example of other fallout from this change - patsy broke and needed this
fix:
https://github.com/pydata/patsy/commit/4f53bbaf58c0bf1a9bed73fc67c7c6d0aa7f4e20#diff-53c70e68c6dfd4fe9b08427792cb2bd6
--
nosy: +gregory.p.smith
Gregory P. Smith added the comment:
some pylint fallout appears to be addressed in
https://github.com/PyCQA/pylint/commit/2698cbe56b44df7974de1c3374db8700296c6fad
--
___
Python tracker
<https://bugs.python.org/issue33
Gregory P. Smith added the comment:
New changeset dfba1f67e7f1381ceb7cec8fbcfa37337620a9b0 by Gregory P. Smith (Tal
Einat) in branch 'master':
bpo-33899: Mention tokenize behavior change in What's New (GH-10073)
https://github.com/python
Change by Gregory P. Smith :
--
nosy: +gregory.p.smith
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue33012>
___
___
Python-bugs-list m
Gregory P. Smith added the comment:
I left comments on the github PRs with reasons why, but PR 6008 seems correct.
PR 10057 would leave us with undefined behavior.
--
___
Python tracker
<https://bugs.python.org/issue33
Gregory P. Smith added the comment:
This is presumably also present in 3.6 and 2.7 so I've tagged those on the
issue, but for this kind of change i'd leave it up to release managers to see
if they want to backport something of this nature that late in those release
cycles.
Obser
New submission from Gregory P. Smith :
The behavior change introduced in 3.6.7 and 3.7.1 via
https://bugs.python.org/issue33899 has further consequences:
```python
>>> tokenize.untokenize(tokenize.generate_tokens(io.StringIO('#').readline))
Traceback (most recent call last)
Gregory P. Smith added the comment:
https://bugs.python.org/issue35107 filed to track further fallout from this API
change.
--
___
Python tracker
<https://bugs.python.org/issue33
Gregory P. Smith added the comment:
Interesting! I have a 3.6.2 sitting around and cannot reproduce that "x=1"
behavior.
I don't know what the behavior _should_ be. It just feels natural that
untokenize should be able to round trip anything tokenize or generate_tokens
New submission from Gregory P. Smith :
An off by one error was introduced to peephole.c by the "off by one error fix"
in https://bugs.python.org/issue28517. Clang's memory sanitizer detects it
(msan).
find_op is ultimately called with h == codelen so it accesses one byte out
Gregory P. Smith added the comment:
the off by one error fix here introduced a new off by one error. PR coming,
follow https://bugs.python.org/issue35193 for that.
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue28
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +9698
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35193>
___
_
Gregory P. Smith added the comment:
New changeset 49fa4a9f1ef387e16596f271414c855339eadf09 by Gregory P. Smith in
branch 'master':
bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418)
https://github.com/python/cpython/commit/49fa4a9f1ef387e16596f271414c85
Change by Gregory P. Smith :
--
pull_requests: +9703
___
Python tracker
<https://bugs.python.org/issue35193>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
New changeset 65e1a1fd311943866361fcb288c0df65dadbe092 by Gregory P. Smith in
branch '3.6':
bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418)
(GH-10422)
https://github.com/python/cpyt
Gregory P. Smith added the comment:
I'm working on getting a memory-sanitizer buildbot setup. I'm so happy it made
finding and debugging this relatively easy.
--
resolution: -> fixed
stage: patch review -> resolved
status
New submission from Gregory P. Smith :
clang's memory sanitizer (-fsanitize=memory) turns up useful problems in code.
I'm working on getting a CPython buildbot running it setup but would like our
build to be cleaner to start with before I run that.
These are the initial fixes re
Change by Gregory P. Smith :
--
keywords: +patch
pull_requests: +9746
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailin
Gregory P. Smith added the comment:
New changeset 1584a0081500d35dc93ff88e5836df35faf3e3e2 by Gregory P. Smith in
branch 'master':
bpo-35214: Initial clang MemorySanitizer support (GH-10479)
https://github.com/python/cpython/commit/1584a0081500d35dc93ff88e5836df
Change by Gregory P. Smith :
--
pull_requests: +9749
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
New changeset 5f4d05d83fde05fed0b6554d0beee4f1c1f1d8f1 by Gregory P. Smith in
branch '3.7':
[3.7] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10492)
https://github.com/python/cpython/commit/5f4d05d83fde05fed0b6554d0beee4
Change by Gregory P. Smith :
--
pull_requests: +9751
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
it still seems relevant, having better docs is always good.
--
___
Python tracker
<https://bugs.python.org/issue25
Gregory P. Smith added the comment:
New changeset 3b5b1c0931cd32253bbf2f3bd74e90ff821e026e by Gregory P. Smith in
branch '3.6':
[3.6] bpo-35214: Initial clang MemorySanitizer support (GH-10479) (GH-10493)
https://github.com/python/cpython/commit/3b5b1c0931cd32253bbf2f3bd74e90
Change by Gregory P. Smith :
--
pull_requests: +9760
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
yeah, i've been surprised how far i was able to get from an oss CPython tree
and pre-built clang 7 binary installation. If you have headers installed for
common libraries like libssl-dev and libreadline-dev you can't produce an
interpreter th
Change by Gregory P. Smith :
--
pull_requests: +9763
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
> Can we prefix MEMORY_SANITIZER with _Py_?
Yes, I wondered if I should do that. not that I expect anyone would ever
define it to mean anything else, but that seems like the right thing to do.
https://github.com/python/cpython/pull/10
Gregory P. Smith added the comment:
New changeset 3015fb8ce4d25603434b9b44bb7effb98a481532 by Gregory P. Smith in
branch 'master':
bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503)
https://github.com/python/cpython/commit/3015fb8ce4d25603434b9b44bb7eff
Change by Gregory P. Smith :
--
pull_requests: +9766
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
New changeset 746b2d35ea47005054ed774fecaed64fab803d7d by Gregory P. Smith in
branch 'master':
bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506)
https://github.com/python/cpython/commit/746b2d35ea47005054ed774fecaed6
Gregory P. Smith added the comment:
Is it an actual problem to compile extension modules with -flto? (I realize as
an extension module there isn't a huge benefit to the concept unless it happens
to have multiple source files or link against a non-shared li
Gregory P. Smith added the comment:
Correct, this issue was filed before we had the new pyc options (which came out
of our September core dev. sprint in 2016 iirc).
I'll just close it, the way forward for people using zip files on modern
CPython interpreters is to explicitly use th
Change by Gregory P. Smith :
--
pull_requests: +9789
___
Python tracker
<https://bugs.python.org/issue35214>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
New changeset b6f4472dc4190e2fd668490d86aeefd2ab0df935 by Gregory P. Smith in
branch '2.7':
[2.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506)
(GH-10538)
https://github.com/python/cpyt
Change by Gregory P. Smith :
--
priority: normal -> release blocker
___
Python tracker
<https://bugs.python.org/issue31354>
___
___
Python-bugs-list mai
Change by Gregory P. Smith :
--
versions: +Python 3.6, Python 3.8
___
Python tracker
<https://bugs.python.org/issue31354>
___
___
Python-bugs-list mailin
Change by Gregory P. Smith :
--
resolution: -> fixed
stage: patch review -> commit review
status: open -> closed
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5
___
Python tracker
<https://bugs.python.or
Change by Gregory P. Smith :
--
versions: +Python 3.8 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue24209>
___
___
Python-bugs-list mailin
Gregory P. Smith added the comment:
I backported the fix to this in the subprocess32 3.2.5rc1 release I made a week
or two ago.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Gregory P. Smith added the comment:
Closing and rejecting based on said discussion.
http://mail.python.org/pipermail/python-dev/2013-June/127143.html
--
nosy: +gregory.p.smith
resolution: -> rejected
status: open -> closed
___
Python tracker
Gregory P. Smith added the comment:
I was merely refactoring for PEP3137, the original version of all that code
prior to 2.7 was in Objects/stringobject.c and long predates me.
--
___
Python tracker
<http://bugs.python.org/issue10
New submission from David P. Kendal:
On python-ideas I proposed the addition of a way to iterate over the graphemes
of a string, either as part of the unicodedata library or as a method on the
built-in str type.
<http://mail.python.org/pipermail/python-ideas/2013-July/021916.html>
I pr
Gregory P. Smith added the comment:
_posixsubprocess already uses the Linux getdent64 syscall when available
(though for different reasons: readdir is not safe in that context).
http://hg.python.org/cpython/file/3f3cbfd52f94/Modules/_posixsubprocess.c#l227
Probing for procfs at configure time
Changes by Gregory P. Smith :
--
nosy: +gregory.p.smith
___
Python tracker
<http://bugs.python.org/issue18408>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gregory P. Smith added the comment:
This patch makes sense to me. I've gone over the code and I cannot spot any
adverse effects. I was wondering in particular if anything would be surprised
to find a non-started thread in _active within the short window where that will
be true but no
Gregory P. Smith added the comment:
The interest is there but nobody is designing or implementing it.
Realistically, make a module sporting the proposed API and put it up on pypi
and after success there: raise the issue on python-ideas.
Read the entire thread here first before designing such
Gregory P. Smith added the comment:
Python already ships with SSL support so the legal ship might have sailed ages
ago if thats what PSF lawyers say. (IANAL)
--
resolution: -> later
status: open -> closed
___
Python tracker
<http://bugs.p
Gregory P. Smith added the comment:
note,
http://docs.scipy.org/doc/scipy/reference/stats.html#statistical-functions is a
very popular module for statistics in Python.
One of the more frequent things I see people include the entire beast of a code
base (scipy and numpy) for is the student
New submission from Gregory P. Smith:
This is a very odd inconsistency in math.log behavior. That said, it is
probably only a single bit imprecision at the end of the float result. Still,
10 == 10L so I'd expect math.log of both to give the same result.
oss/cpython/2.7:LOAS$ ./python
P
Gregory P. Smith added the comment:
We found this while refactoring an API to be more consistent about returning
longs vs ints in specific cases. This resulted in another unittest that was
using math.log for a nicer display of the value by magnitude to fail as the
result was slightly
Gregory P. Smith added the comment:
your patch makes sense to me.
--
___
Python tracker
<http://bugs.python.org/issue18742>
___
___
Python-bugs-list mailin
Gregory P. Smith added the comment:
I don't see a patch attached, but I do not recall any good reason off the top
of my head for preexec_fn to be called as late as it is. Moving it up to be
called before the fd closing loop makes sense as a bug fix.
All bets are off when it comes to
New submission from Gregory P. Smith:
A few times now I've seen people write something that overrides and
re-implements the unittest.TestCase run() method, copying most of the
implementation but adding one feature:
The ability for pdb.post_mortem() to be called after every phase of exec
Gregory P. Smith added the comment:
Thanks! Backported to subprocess32 in
https://code.google.com/p/python-subprocess32/source/detail?r=4ba30d9c64296ea0d2959790ab22d0f1a2678064
--
___
Python tracker
<http://bugs.python.org/issue18
Gregory P. Smith added the comment:
fyi - i am unable to reproduce this when using subprocess32 instead of
subprocess. https://pypi.python.org/pypi/subprocess32
That is what i recommend _anyone_ using Python 2.x use instead.
Regardless if this was reintroduced in 2.7.5 we need to re-fix it
Changes by Gregory P. Smith :
--
assignee: -> gregory.p.smith
nosy: +gregory.p.smith
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.pyt
Gregory P. Smith added the comment:
FYI - use the changes made in http://bugs.python.org/issue12268 as a guide for
how to deal with EINTR properly at the C level. See the _PyIO_trap_eintr()
function for example.
See also _eintr_retry_call() in Lib/subprocess.py.
FWIW, there are times when
Gregory P. Smith added the comment:
I wrote too many words. In short:
time.sleep()'s behavior should remain as it is today given how it is documented
to behave. If you disagree, consider adding an optional interruptable=False
parameter so that both behavior options exist.
ALL IO call
Gregory P. Smith added the comment:
comments added to the review.
I don't think a DeprecationWarning should be raised as that'll infuriate users
of python programs more than developers who can fix code.
--
___
Python trac
Gregory P. Smith added the comment:
That warning is correct, there's a bug in the code. but given this is only a
bug when PyMem_MALLOC returns NULL I do not expect this to be an issue for
anyone who does not already have issues.
Regardless, I'm
Gregory P. Smith added the comment:
already fixed, I just manually returned NULL. :)
I suppose we could change PyErr_NoMemory's definition in 3.3 to return a "void
*" instead of "PyObject *" but I'd rather not. In this case the warning caused
me to examine th
New submission from Gregory P. Smith :
telnetlib uses select.select. This limits it to being able to work when file
descriptors are still below FD_SETSIZE (often 1024) meaning it can't be used in
some large programs today.
It should use poll.
(it is probably easy to fix this an
Gregory P. Smith added the comment:
Your updated patch looks fine to me. I don't see any reason not to commit it
and mention it in the release notes. If it has bugs, they can be discovered
and fixed later by people with actual relevant hardware an interest.
--
Gregory P. Smith added the comment:
I don't have a problem with always compiling them.
Distro packagers should see that the stand alone versions are not distributed
with their package that has a dependency on openssl as they'll just be a waste
of space. But that is up to the dist
Gregory P. Smith added the comment:
regarding the attached patch, rather than changing the test at all, I'd leave
it as is. The test as is will do what we want on the buildbots (warning us if
they failed to compile when in debug mode). I am not concerned about it
testing if they com
New submission from Gregory P. Smith :
Lib/email/*.py are fond of using
EMPTYSTRING = ''
and within the code:
EMPTYSTRING.join(...)
instead of just writing:
''.join(...)
They should just do the latter. It'll avoid a name lookup and look less silly
t
Gregory P. Smith added the comment:
going forward with reinit_locks.diff makes sense.
I've added comments to it in the code review link. It is "Patch Set 3"
--
___
Python tracker
<http://bugs.py
New submission from Gregory P. Smith :
./python Lib/test/test_file.py# passes
./python Lib/test/test_file.py , )
not raised
==
FAIL: testStdin (__main__.PyOtherFileTests
Gregory P. Smith added the comment:
Anyone using a preexec function in subprocess has already declared that they
like deadlocks so that isn't an issue. :)
--
___
Python tracker
<http://bugs.python.org/i
Gregory P. Smith added the comment:
threading locks cannot be used to protect things outside of a single process.
Any code using them to do that is broken.
In your examples you are suggesting a class that wants to do one or more mysql
actions within a destructor and worried that the __del__
Gregory P. Smith added the comment:
We could make any later attempt to acquire or release a lock that was
reinitialized while it was held raise an exception.
Such exception raising behavior should be conditional at lock construction
time; some code (such as logging) never wants to deal with
Gregory P. Smith added the comment:
subprocess has nothing to do with this bug. subprocess is safe as of Python
3.2 (and the subprocess32 backport for 2.x). Its preexec_fn argument is
already documented as an unsafe legacy. If you want to replace subprocess, go
ahead, write something new
New submission from Gregory P. Smith :
==
ERROR: test_exist_ok_existing_directory (__main__.MakedirTests)
--
Traceback (most recent call last):
File "Lib
Changes by Gregory P. Smith :
--
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue14992>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Gregory P. Smith :
--
assignee: -> gregory.p.smith
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.or
Gregory P. Smith added the comment:
What is x32?
--
___
Python tracker
<http://bugs.python.org/issue15000>
___
___
Python-bugs-list mailing list
Unsubscribe:
2501 - 2600 of 3453 matches
Mail list logo