[issue42367] Restore os.makedirs ability to apply mode to all directories created

2021-10-26 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42367>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11477] Incorrect operand precedence when implementing sequences in C

2021-10-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Given that a lot of code is presumably relying on this (see the notes from 
2015)... I wouldn't be surprised if this turns into a wart we document but not 
actually fix. :/

Or a conditional behavior we control via a `from __future__ import 
correct_extension_operator_precedence` on a per file / per Notebook basis.

Ever actually flipping the default sounds difficult without disruption.  We'd 
need input from the community where extensions that rely on it have been 
produced and widely deployed.

--

___
Python tracker 
<https://bugs.python.org/issue11477>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33439] python-config.py should be part of the stdlib

2021-10-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

`Misc/python-config.in` ultimately becomes a Python script that prints things 
to stdout.  It isn't written to be a module as is.  Any work to make it one is 
effectively writing entirely new code to do what it does.

To keep a single source of truth for `python-config` behavior instead of having 
two as we do today (as doko noted in bpo-16235), while still exposing the 
values it provides for use from Python I suggest:

1. Get rid of the `Misc/python-config.in` python code.
2. Use `Misc/python-config.sh.in` exclusively.
3. Enhancing _that_ to be able to generate a tiny data-only 
`sysconfig.configure` module. 
4. Invoke `python-config.sh --generate-sysconfig-bits` during build time to 
generate a `sysconfig/configure.py`.

This should reduce the maintenance burden and is kinder to cross-compiliation 
builds (which we generally are lousy at supporting despite their importance to 
the world, so our bar today is merely "not regressing").


All that said, in what contexts would having anything that python-config 
produces today be available from sysconfig be useful?

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue33439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

i'm considering this fixed based on my testing.  we still lack buildbots using 
out of tree setup.  i'll ponder that.  But this issue need not track that 
infrastructure.

--
assignee:  -> eric.snow
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68 by Dennis Sweeney in 
branch 'main':
bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048)
https://github.com/python/cpython/commit/423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68


--

___
Python tracker 
<https://bugs.python.org/issue30570>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-10-21 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43592>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-10-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 843b890334ca30cf6af27dffe29cecd06b49f7d9 by Gregory P. Smith in 
branch 'main':
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
https://github.com/python/cpython/commit/843b890334ca30cf6af27dffe29cecd06b49f7d9


--

___
Python tracker 
<https://bugs.python.org/issue43592>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31000] Test failure in resource module on some ZFS systems

2021-10-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

It doesn't happen on the zfs ubuntu 20.04 machine i've got.  Figuring out an 
appropriate workaround when refactoring the test for this is best done by 
someone with a system it fails on.  It'd be guesswork otherwise.

--
title: Test failure in resource module on ZFS -> Test failure in resource 
module on some ZFS systems
versions: +Python 3.11 -Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue31000>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-10-21 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +27414
pull_request: https://github.com/python/cpython/pull/29127

___
Python tracker 
<https://bugs.python.org/issue43592>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-10-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

macOS often has an unreasonably low default max number of file descriptors.  
This is easy to raise from user code, it's a soft limit.

https://github.com/python/cpython/pull/29127

is out to try that from regrtest itself.

--
assignee:  -> gregory.p.smith
components: +macOS
nosy: +gregory.p.smith, ronaldoussoren
stage:  -> patch review
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue43592>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31000] Test failure in resource module on ZFS

2021-10-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

this is probably somewhat of an edge case.  filesystems are presumably free to 
have their own concepts of granularity on size limit enforcement.

zfs may become more popular in future ubuntu versions as they're offering it as 
a supported primary whole system filesystem.  but zfs is also highly 
configurable so it likely isn't accurate to just say "zfs" caused this.

that test appears to be setting RLIMIT_FSIZE to 1024 and creating a 1024 byte 
file.  this could be an edge case, either in our understanding (the limit can 
never be reached or the limit can be exactly reached?) or in the filesystem's 
interpretation of that.  my understanding is that it is supposed to be 
inclusive.  RLIMIT_FSIZE 1024 should allow 1024 byte files.

but for such small unrealistic real world values i can easily imagine 
filesystems being creative...  people tend not to expect these limits to be so 
strict.

that test could use refactoring to rely less on strict limits.  that isn't what 
it was aiming to test.

--
nosy: +gregory.p.smith
status: pending -> open

___
Python tracker 
<https://bugs.python.org/issue31000>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2021-10-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

workaround: don't run make as root.  run configure & make in a user account and 
only run your final make install as root after that.  (sudo make install or 
whatnot)

2to3 and lib2to3 are deprecated so this won't be getting fixed (though it's 
more of a Makefile issue)

--
nosy: +gregory.p.smith
resolution:  -> wont fix
stage:  -> resolved
status: pending -> closed

___
Python tracker 
<https://bugs.python.org/issue15317>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36313] error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

2021-10-20 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Source installation sets incorrect permissions for 
Grammar3.2.3.final.0.pickle

___
Python tracker 
<https://bugs.python.org/issue36313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42092] test_host_resolution_bad_address does not always fail as expected

2021-10-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Rule #1 for home users:  Never use your ISPs DNS.  Always configure a reputable 
one in your router.  If you can't control your router, configure your computer 
to ignore the router's DNS.

Classic best in breed non-ISP servers exist: 8.8.8.8 (google), 9.9.9.9 (quad9), 
1.1.1.1 (cloudflare?), etc.

ISPs often monetize DNS in nefarious ways.  If they control the router they can 
even decide to have it subvert those settings as DNS is unencrypted UDP so it 
can be redirected/intercepted/modified.  Avoiding that requires using DoH or 
DoT (DNS over HTTPS/TLS) but configuring that is way beyond what I'm capable of 
quipping in a box this small. :)

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue42092>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-10-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +27331
pull_request: https://github.com/python/cpython/pull/29064

___
Python tracker 
<https://bugs.python.org/issue40360>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45493] str() and repr() of enum different in Python 3.11 from Python <= 3.10

2021-10-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

We just need https://github.com/python/cpython/pull/27010 to be done on main to 
roll it back.

str and repr changes are quite painful to foist upon users existing code and 
tests.

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue45493>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21736] Add __file__ attribute to frozen modules

2021-10-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

That appears to have caused https://bugs.python.org/issue45506

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue21736>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

git bisect on Linux yielded this culprit change:


```
79cf20e48d0b5d69d9fac2a0204b5ac2c366066a is the first bad commit
commit 79cf20e48d0b5d69d9fac2a0204b5ac2c366066a
Author: Eric Snow 
Date:   Thu Oct 14 15:32:18 2021 -0600

bpo-21736: Set __file__ on frozen stdlib modules. (gh-28656)
```

...
Running a git bisect ritual on macOS wasn't helpful, test_importlib out of tree 
too often simply hangs there (going much further back).  Apparently more than 
one possible issue at play here.  Lets let this issue be for the Linux one.

--

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45020] Freeze all modules imported during startup.

2021-10-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

could changes related to this be the cause of 
https://bugs.python.org/issue45506 ?

out of tree builds in main usually cannot pass key tests today.  they often 
hang or blow up with strange exceptions.

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue45020>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-18 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +eric.snow

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

further down in the tracebacks in that situation:

```
  File "/Users/greg/oss/python/upstream/Lib/importlib/_bootstrap.py", line 887, 
in _fix_up_module
assert module.__file__ == __file__, (module.__file__, __file__)
^^^
AssertionError: ('/Users/greg/oss/python/upstream/Lib/zipimport.py', 
'/Users/greg/oss/python/b-u/../upstream/Lib/zipimport.py')
```

--

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

for easy pasting:

git clone https://github.com/python/cpython.git upstream && \
mkdir b-u && cd b-u && \
../upstream/configure --with-pydebug && make -j3 && \
./python -m test.regrtest test_importlib

[change python to python.exe for macos, adjust -j as appropriate]

(if I can figure out git bisect command i'll start one before going to bed...)

(oh hey, i've got macOS producing the same error as Linux now somehow)

--

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-18 Thread Gregory P. Smith


New submission from Gregory P. Smith :

The behavior is odd, I don't really know how to characterize it other than 
something serious has gone wrong.  Memory corruption thus differing failures 
perhaps?  it seems like maybe a race condition?

on the main branch (i cannot reproduce this on 3.10 thankfully):

1) git checkout https://github.com/python/cpython.git upstream
2) mkdir b-u && cd b-u
3) ../upstream/configure --with-pydebug && make -j3 && ./python -m 
test.regrtest test_importlib

- sometimes it hangs forever.
- sometimes it crashes with a long list of error messages coming out of 
regrtest itself.  The crashes appear to happen in a child process so regrtest 
can continue and run other tests if you tell it to run more.  Sometimes it'll 
be an error about "import _frozenimport_lib as bootstrap" failing with 
sys.modules containing None. (Linux does that for me)  On macOS when it doesn't 
hang, I get a blowup from test_importlib/test_threaded_import.py.

I've reproduced this on Linux and macOS.  macOS alternates between a traceback 
blowup and hang with an occasional pass.  On Linux it is quite consistently a 
huge chain of stacktraces.

Linux:

```
0:00:00 load avg: 2.48 Run tests sequentially
0:00:00 load avg: 2.48 [1/1] test_importlib
Failed to import test module: test.test_importlib.builtin.test_finder
Traceback (most recent call last):
  File "/home/greg/oss/python/cpython/gpshead/Lib/importlib/__init__.py", line 
16, in 
import _frozen_importlib as _bootstrap
^^
ModuleNotFoundError: import of _frozen_importlib halted; None in sys.modules

During handling of the above exception, another exception occurred:

...  tons more  ...
```

Our buildbot fleet is not bloody looking.  Which is why I tried it on two 
different systems and OSes before reporting.  When I do a ./configure and run 
everything within the source tree it does not fail.  This is only for proper 
out-of-tree builds (which are what I always use - as should everybody).

Do our buildbots only do in-tree builds?

--
components: Build
messages: 404159
nosy: gregory.p.smith
priority: high
severity: normal
stage: needs patch
status: open
title: Out of source tree builds failing on main - test_importlib others 
unreliable
type: behavior
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45506>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-17 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +27291
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29017

___
Python tracker 
<https://bugs.python.org/issue30570>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-17 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Python metaprogramming allows type-like things to be bases, not just things 
that pass PyType_Check().  so being that strict isn't going to work.

The other classic way to prevent this is to track what you're recursing on to 
avoid a loop.  i.e. Keeping a set of PyObjects that have been seen and not 
recursing if the value is in that.

--

___
Python tracker 
<https://bugs.python.org/issue30570>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-17 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue30570>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-10-17 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

This is a stack overflow in Objects/abstract.c because we infinitely recurse 
within abstract_issubclass().

We should probably do some validity checking on the bases tuple that 
abstract_get_bases returns (ideally within abstract_get_bases?).  The tuple 
must contain types.

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue30570>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39423] Process finished with exit code -1073741819 (0xC0000005) when trying to access data from a pickled file

2021-10-17 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

As your problem involves numpy and PyQt, both of which are very complicated 
third party extension module code, chances are there is a bug within those that 
is leading to memory corruption.

--
nosy: +gregory.p.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue39423>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-16 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
priority: normal -> high
versions: +Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45494>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I confirmed that 3.9 does NOT seem to have the problem:

Python 3.9.5 (default, May 19 2021, 11:32:47) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = r'''
... "\
... "(1for c in I,\
... \ '''
>>> import ast
>>> ast.literal_eval(x)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.9/ast.py", line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
  File "", line 3
"\
  ^
SyntaxError: Generator expression must be parenthesized

--
nosy: +gregory.p.smith
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue45494>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45353] sys.modules: dictionary changed size during iteration

2021-10-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

While arguably unnecessary as it is documented as a dictionary and this is a 
normal Python dict behavior, it is a global dict and it can be modified at 
times that are unintuitive to users of all experience levels.  A note in the 
documentation makes sense.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45353] sys.modules: dictionary changed size during iteration

2021-10-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 3d1ca867ed0e3ae343166806f8ddd9739e568ab4 by Gregory P. Smith in 
branch 'main':
bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)
https://github.com/python/cpython/commit/3d1ca867ed0e3ae343166806f8ddd9739e568ab4


--

___
Python tracker 
<https://bugs.python.org/issue45353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45353] sys.modules: dictionary changed size during iteration

2021-10-09 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +27154
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28842

___
Python tracker 
<https://bugs.python.org/issue45353>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45408] [fuzzer] Weird input with continuation and newlines causes null deref in parser

2021-10-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Marking release blocker as a crash is bad for a function that is documented as 
safe for use on untrusted input so long as it isn't large enough to overflow 
the stack.

https://docs.python.org/3/library/ast.html#ast.literal_eval

--
priority: normal -> release blocker

___
Python tracker 
<https://bugs.python.org/issue45408>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45408] [fuzzer] Weird input with continuation and newlines causes null deref in parser

2021-10-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

(unable to reproduce on 3.9)

--
nosy: +gregory.p.smith
versions:  -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45408>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45408] [fuzzer] Weird input with continuation and newlines causes null deref in parser

2021-10-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45408>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-10-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I left some comments on the PR.  We can at least make it detect musl libc and 
improve its default behavior there.

FWIW CPython's recursionlimit and the C stack have long been a thorn in the 
side of many things.

Even when Python's thread_pthread.h is changed to set a better default when 
running under musl libc, there are still plenty of ways to run into problems.  
ex: Extension modules can create threads on their own that then call back into 
CPython.  So can C/C++ code that embeds a Python interpreter.  Those choose 
their own stack sizes.  When they choose low values, surprising crashes ensue 
for people working on the Python side...

As a feature (beyond just this issue): It'd be ideal to actually be able to 
introspect the C stack space remaining and issue a RecursionError whenever it 
falls below a threshold.  Rather than just blindly using a runtime adjustable 
number that any Python code can tweak to allow crashes via 
`sys.setrecursionlimit()`.  Other languages like Golang use a dynamic stack and 
allocate more on SIGSEGV.

[meta/off-topic: Why does anyone use small thread stack sizes? This is often 
done to save virtual address space in applications that expect to have 
thousands of threads. It matters a lot less on 64-bit address space. But there 
are reasons...]

--
assignee:  -> gregory.p.smith
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6

___
Python tracker 
<https://bugs.python.org/issue32307>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-10-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue32307>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38435] Start the deprecation cycle for subprocess preexec_fn

2021-10-01 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Another use case someone had for preexec_fn popped up today:

 prctl(PR_SET_PDEATHSIG, SIGTERM)

--

___
Python tracker 
<https://bugs.python.org/issue38435>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

**If** we add a callback API for this, I agree with vstinner's 
https://bugs.python.org/issue42969#msg402558 commentary on the other callback 
APIs.  We can do this one similarly and keep it simple. - Why? It's the initial 
simplicity that provides those running into this problem a way to solve their 
problem today.  Without getting hung up on the details of the new default 
behavior.

**That said** the only conclusion I'm coming to for what the safest behavior of 
Python is in this situation is to hang the threads, effectively as PR 28525 is 
proposing.

So even if we added the callback API, I'd expect code using Python with C++ 
where these issues might ever crop up to always register a thread hanging 
callback.  Which really suggests it is the good default.  So do we even need 
the callback?

...But lets put the default behavior choice aside for a moment, there's 
something valuable regardless...

There are **New C APIs to enhance PyGILState_Ensure** proposed in PR 28525 to 
do with GIL acquisition from threads.  These appear useful as is.  They provide 
a way for threads to discover that they will never be able to get the GIL and 
re-enter the Python interpreter.  Rather than today's unexpected behavior of 
PyGILState_Ensure mercilessly terminating their thread, or given a Callback API 
whatever effect such a Callback API would have.  That allows code to be written 
with pre-problem-detection that avoids entering this point of no return state.  
That is good for everyone.  **We should add those "GIL-curious" APIs no matter 
what.**  This bit could become its own PR separate from the other parts.

If we cannot agree that blocking a non-main daemon-or-C/C++ thread forever that 
is guaranteed to not acquire the GIL because the Python interpreter is going 
away is the right default behavior instead of blindly killing it under the 
unsupportable assumption that it has nothing to clean up: We can proceed with 
such a callback API. I'm having a hard time imagining any other behavior that 
makes sense, so I'd expect lots of Python extension interface code to start 
carrying a copy of an implementation of a hang callback and sporting a 
Py_SetThreadExitCallback(xxx) call in their module Init function. (especially 
if pybind11 finds needs to generate this as boilerplate)

I think the pthread_exit() call added in issue1856's 
https://hg.python.org/cpython/rev/c892b0321d23 were well intentioned, but not 
aware of the full unsupportable ramifications of that API call. That the 
attempt at releasing a backport of the pthread_exit call to 2.7.8 broke an 
application (that was admittedly doing something unwise) and had to be reverted 
as 2.7.9 was a sign for us to revisit this in 3.x releases as well.  Which 
we're finally doing here.

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue42969>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

A PR adding a `Py_SetThreadExitCallback(func)` API guaranteeing the callback is 
called before `pthread_exit()` would allow anyone wanting to deal with their 
deadlocks to register `abort()` or `while(1) pause();` as their exit callback.  
I'd be okay with that.  Anyone care to make a PR for that?

What should it do when SetThreadExitCallback has already been called?  Is that 
an error?  Are the callbacks chained?  In which order?  If someone passes 
nullptr does that undo it (please no!).  It is process global state that many 
things could wind up having an opinion on each with their own reason to require 
theirs to be the only one.  I vote for returning an error if a callback has 
already been set.  And not allowing unsetting a callback.

What we'd do internally at work is always guarantee our codebase's early 
application startup code (because we have such a thing) calls that to setup 
whichever exit callback we deem appropriate for everyone instead of today's 
default deadlock potential.

On pausing... agreed, it doesn't feel _comfortable_.  To me when faced with a 
known potential deadlock situation the only comfortable thing is to abort() as 
a process dying is always more useful than process hanging (or worse, partially 
hanging).

Sleeping on the problem, I don't really understand how `while(1) pause();` is 
significantly different than `pthread_exit()` when it comes to deadlocks, as it 
seems like an instantly terminated thread having state that needs cleanup 
should lead to a similar outcome as a thread with stuff needing cleanup that is 
now stuck in an infinite pause loop.  Neither of them is going to cleanup 
whatever (presumably a lock they hold) that leads something else to deadlock?  
I guess the difference is that the thread stack  memory is at least not 
released back for potential reuse while other threads and pointers could still 
be referring to it when pausing as opposed to a pthread_exit?

--

___
Python tracker 
<https://bugs.python.org/issue42969>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I believe jbms is right that pausing the threads is the only right thing to do 
when they see tstate_must_exit.  The PR is likely correct.

--
versions: +Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue42969>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45021] concurrent.futures race condition

2021-09-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I expect the unittest for this might causes hangs on some platforms in the 
future as it mixes fork and threads which is a posix-nono.  If so, we should 
just disable it on all but specific known-to-pass build configs as a future PR.

3.9 and 3.10 PRs will automerge.

--
assignee:  -> gregory.p.smith
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45021>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45021] concurrent.futures race condition

2021-09-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 0bfa1106acfcddc03590e1f5d6789dbad3affe70 by nullptr in branch 
'main':
bpo-45021: Fix a hang in forked children (GH-28007)
https://github.com/python/cpython/commit/0bfa1106acfcddc03590e1f5d6789dbad3affe70


--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue45021>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og: Cannot access memory at address 0xfffffedc

2021-09-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

although it looks like the 3.10 failure you linked to ran after that.  so... 
the upgrade may not explain things.

--

___
Python tracker 
<https://bugs.python.org/issue40746>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og: Cannot access memory at address 0xfffffedc

2021-09-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fwiw I updated my arm raspbian buildbot from raspbian Buster to raspbian 
Bullseye in the last few days.  That could also explain the difference.  More 
recent toolchain versions.

--

___
Python tracker 
<https://bugs.python.org/issue40746>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset b668cdfa09e9bdfcfddaadd23dbd455d5f667383 by junyixie in branch 
'main':
bpo-45196: prevent unittest crash on address sanitizer builds (GH-28331)
https://github.com/python/cpython/commit/b668cdfa09e9bdfcfddaadd23dbd455d5f667383


--

___
Python tracker 
<https://bugs.python.org/issue45196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-09-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

FWIW I don't remember the context that led me to just file the issue this year. 
 The most serious frequent instances of this I remember happening were all many 
years ago when a less capable software distribution mechanism was in use.

A scenario where I would imagine it today aside from things like what Irit 
mentioned with the developer workflow:

People using an OS distro's Python interpreter (and even OS distro supplied 
Python packages instead of pip in a virtualenv) in order to run their own 
potentially long running code.

The OS distro does not know about their running processes as they haven't 
created OS packages with startup/restart/shutdown and dependency relationships 
expressed.  So the OS updating Python packages does not trigger a restart of 
their software after updating a dependency out from underneath it.

I know this happens, but I don't know how often it actually bites anyone.  And 
there are workarounds if deemed serious (tie in with the OS package management).

I personally wouldn't prioritize work on this issue unless it fits in naturally 
with other work going on to plumb the information through.  Or without an 
ability to demonstrate a compelling frequently encountered user-confusion 
scenario.  It's a "nice to have" more than a "need".

--

___
Python tracker 
<https://bugs.python.org/issue44091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I think we just forgot to make the change in time.  3.11 is fine.  We're not 
_maintaining_ lib2to3 or describing it as fit for any modern purpose 
regardless.  It's just code that'll sit around in the back of the 3.10 stdlib 
but not be able to parse the new syntax in 3.10.

--

___
Python tracker 
<https://bugs.python.org/issue40360>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38435] Start the deprecation cycle for subprocess preexec_fn

2021-08-28 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

A worthwhile general suggestion on a new path forward for the mess of things 
between (v)fork+exec from Victor is over in 
https://bugs.python.org/issue42736#msg383869

TL;DR creating a subprocess.Preexec() recording object with specific interfaces 
for things that can be done, an instance of which gets passed in and the 
recorded actions are done as appropriate.

--
versions: +Python 3.11 -Python 3.10

___
Python tracker 
<https://bugs.python.org/issue38435>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2021-08-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 245f1f260577a005fd631144b4377febef0b47ed by Gregory P. Smith in 
branch 'main':
bpo-41818: ++ termios versionadded markers. (GH-27987)
https://github.com/python/cpython/commit/245f1f260577a005fd631144b4377febef0b47ed


--

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2021-08-26 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +26434
pull_request: https://github.com/python/cpython/pull/27987

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2021-08-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset ae224bb566301d3602e9b090e37c1dcf5a48c914 by Soumendra Ganguly in 
branch 'main':
bpo-41818: Add termios.tcgetwinsize(), termios.tcsetwinsize(). (GH-23686)
https://github.com/python/cpython/commit/ae224bb566301d3602e9b090e37c1dcf5a48c914


--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue41818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44690] Adopt binacii.a2b_base64's strict mode in base64.b64decode

2021-08-23 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44690>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44690] Adopt binacii.a2b_base64's strict mode in base64.b64decode

2021-08-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset fa6304a5225787054067bb56089632146d288b20 by Idan Moral in branch 
'main':
bpo-44690: Adopt binacii.a2b_base64's strict mode in base64.b64decode (GH-27272)
https://github.com/python/cpython/commit/fa6304a5225787054067bb56089632146d288b20


--

___
Python tracker 
<https://bugs.python.org/issue44690>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44690] Adopt binacii.a2b_base64's strict mode in base64.b64decode

2021-08-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I'm not worried about the regex vs binascii C implementation performance at all.

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44690>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44173] Stored (uncompressed) ZipExtFile in zipfile can be seekable at lower cost

2021-08-18 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44173>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
versions:  -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44935>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44935] Solaris: enable posix_spawn in subprocess

2021-08-17 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset b1930bf75f276cd7ca08c4455298128d89adf7d1 by Jakub Kulík in branch 
'main':
bpo-44935: enable posix_spawn() on Solaris (GH-27795)
https://github.com/python/cpython/commit/b1930bf75f276cd7ca08c4455298128d89adf7d1


--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44935>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36050] Why does http.client.HTTPResponse._safe_read use MAXAMOUNT

2021-07-28 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution: fixed -> 
stage: resolved -> needs patch

___
Python tracker 
<https://bugs.python.org/issue36050>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 6564656495d456a1bcc1aaa06abfc696209f37b2 by Jakub Kulík in branch 
'main':
bpo-43219: skip Solaris in the test as well (GH-27257)
https://github.com/python/cpython/commit/6564656495d456a1bcc1aaa06abfc696209f37b2


--

___
Python tracker 
<https://bugs.python.org/issue43219>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode

2021-07-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 366fcbac18e3adc41e3901580dbedb6a91e41a10 by Idan Moral in branch 
'main':
bpo-44678: Separate error message for discontinuous padding in 
binascii.a2b_base64 strict mode (GH-27249)
https://github.com/python/cpython/commit/366fcbac18e3adc41e3901580dbedb6a91e41a10


--

___
Python tracker 
<https://bugs.python.org/issue44678>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43086] Excess data in not handled properly in binascii.a2b_base64()

2021-07-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I've merged Idan's PR adding a strict_mode parameter to a2b_base64.  It 
defaults to False for backwards compatibility.

>From a security perspective, it'd be _ideal_ if this were True.  But I expect 
>doing that would break a bunch of existing code and tests that has been 
>relying on some of the former leniency behaviors so I recommended the 
>conservative approach of the old-behavior default.  It'd be a good thing to 
>change it to True, but disruptive.  We need motivating reason to do that.

As it is a new feature due to the new parameter, this is for 3.11.

Workaround for Pythons without this: do a validity check before calling 
a2b_base64.  I suspect a regex could be constructed for that if you're careful. 
 If you come up with one, please share it here.

--
components: +Extension Modules
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
versions: +Python 3.11 -Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43086>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43086] Excess data in not handled properly in binascii.a2b_base64()

2021-07-18 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 35b98e38b6edd63153fc8e092f94cb20725dacc1 by Idan Moral in branch 
'main':
bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)
https://github.com/python/cpython/commit/35b98e38b6edd63153fc8e092f94cb20725dacc1


--

___
Python tracker 
<https://bugs.python.org/issue43086>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks Mark, that's a good real world experience example from the IPython side.

--

___
Python tracker 
<https://bugs.python.org/issue44603>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-13 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
stage:  -> patch review
type: behavior -> enhancement

___
Python tracker 
<https://bugs.python.org/issue44603>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Agreed with Paul, this is a good idea UX wise for interactive interpreters.  
IPython proved that well over a decade ago.  Thanks for the historical links!

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44603>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44630] Assertion failure in csv module

2021-07-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks!

Things like this both internal to CPython and in CPython API misuse in all 
sorts of third party extension modules are why i think we as a project really 
should to encourage more CI systems to have -UNDEBUG builds of CPython 
available and in use by default when people request Python...

To answer anyone's "why no news entry?" questions... This only shows up in 
-UNDEBUG (and thus pydebug) builds of CPython.  Which basically nobody uses.

We, Google, keep C assertions enabled by undefining NDEBUG in our default 
non-release builds that everything by default runs tests against as a way to 
help improve code quality.

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44630>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44630] Assertion failure in csv module

2021-07-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 0093876328afa330224c9d887c18dee0b3117852 by T. Wouters in branch 
'main':
bpo-44630: Fix assertion errors in csv module (GH-27127)
https://github.com/python/cpython/commit/0093876328afa330224c9d887c18dee0b3117852


--

___
Python tracker 
<https://bugs.python.org/issue44630>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-10 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43219>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 248173cc0483a9ad9261353302f1234cf9eb2ebe by andrei kulakov in 
branch 'main':
bpo-43219: shutil.copyfile, raise a less confusing exception instead of 
IsADirectoryError (GH-27049)
https://github.com/python/cpython/commit/248173cc0483a9ad9261353302f1234cf9eb2ebe


--

___
Python tracker 
<https://bugs.python.org/issue43219>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-08 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue43219>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks Ian!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset fed2fc4443235fa9669b73817827fd6da88e3417 by Ian Henriksen in 
branch 'main':
bpo-43895: Remove an unnecessary cache of shared object handles (GH-25487)
https://github.com/python/cpython/commit/fed2fc4443235fa9669b73817827fd6da88e3417


--

___
Python tracker 
<https://bugs.python.org/issue43895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44145] hmac.update is not releasing the GIL when openssl's hmac is used

2021-07-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44145>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43895] Unnecessary Cache of Shared Object Handles

2021-07-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith, twouters
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue43895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-07-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset a9a69bb3ea1e6cf54513717212aaeae0d61b24ee by Ma Lin in branch 
'main':
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer 
(GH-26143)
https://github.com/python/cpython/commit/a9a69bb3ea1e6cf54513717212aaeae0d61b24ee


--

___
Python tracker 
<https://bugs.python.org/issue41486>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13788] os.closerange optimization

2021-07-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Code needed in a modern patch:

1) Use the system call if compile time configure detected it may be available.  
(if we just use syscall() rather than a libc wrapper, a configure check may not 
be necessary, but various #ifdefs likely are)
2) If (1) produces an error saying it isn't available at runtime (ie: running 
on a kernel that doesn't support it, regardless of where we were built), fall 
back to another approach (3)
3) if iterating over /proc/$pid/fd works at runtime, use that; else (4)
4) the existing brute force code.

--
stage:  -> needs patch
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue13788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36991] zipfile: AttributeError on extract

2021-06-26 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 
<https://bugs.python.org/issue36991>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Good catch.  We don't have buildbots statically linking the modules in these 
days, that'd be useful to prevent things like this from happening.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44458>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset cf739332bd039cd2303b58663a804f784883820d by Miss Islington (bot) 
in branch '3.10':
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) 
(GH-26844)
https://github.com/python/cpython/commit/cf739332bd039cd2303b58663a804f784883820d


--

___
Python tracker 
<https://bugs.python.org/issue44458>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-22 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 92c2e91580521ba5c85aa3205a0211df5b48689b by Russell Keith-Magee 
in branch 'main':
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808)
https://github.com/python/cpython/commit/92c2e91580521ba5c85aa3205a0211df5b48689b


--
message_count: 1.0 -> 2.0
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +25425
pull_request: https://github.com/python/cpython/pull/26844

___
Python tracker 
<https://bugs.python.org/issue44458>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44458] Duplicate symbol _BUFFER_BLOCK_SIZE when statically linking multiple modules

2021-06-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44458>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44107] HTTPServer can't close http client completely

2021-06-16 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution: later -> not a bug
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44107>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2021-06-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.11 -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40120>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44334] Use bytearray in urllib.unquote_to_bytes

2021-06-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44334>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44334] Use bytearray in urllib.unquote_to_bytes

2021-06-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fwiw this sort of thing may be reasonable to backport to 3.9 as it is more than 
just a performance enhancement but also a resource consumption bug and should 
result in no behavior change.

"""
In case of form contain very large data ( in my case the string to parse was 
about 600 byte )
Old code use list of bytes during parsing consumes a lot of memory
New code will use bytearry , which use less memory
""" - text from the original PR

--
nosy: +gregory.p.smith

___
Python tracker 
<https://bugs.python.org/issue44334>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43776>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 5a8ddcc4524dca3880d7fc2818814ffae1cfb8a2 by Gregory P. Smith in 
branch '3.9':
[3.9] bpo-43776: Remove list call from args in Popen repr (GH-25338) (GH-26510)
https://github.com/python/cpython/commit/5a8ddcc4524dca3880d7fc2818814ffae1cfb8a2


--

___
Python tracker 
<https://bugs.python.org/issue43776>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43776] Popen with shell=True yield mangled repr output

2021-06-02 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +25106
pull_request: https://github.com/python/cpython/pull/26510

___
Python tracker 
<https://bugs.python.org/issue43776>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc by Gregory P. Smith in 
branch 'main':
bpo-44022: Improve the regression test. (GH-26503)
https://github.com/python/cpython/commit/e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc


--

___
Python tracker 
<https://bugs.python.org/issue44022>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Great catch!  The new PR should address that.

--

___
Python tracker 
<https://bugs.python.org/issue44022>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +25099
pull_request: https://github.com/python/cpython/pull/26503

___
Python tracker 
<https://bugs.python.org/issue44022>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-06-01 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43882>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-26 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7 by Ken Jin in branch 
'main':
bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357)
https://github.com/python/cpython/commit/d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7


--

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37439] Add random.binomialvariate()

2021-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

A presumed optimal version of this is already available in numpy.

https://numpy.org/doc/stable/reference/random/generated/numpy.random.Generator.binomial.html

https://github.com/numpy/numpy/blob/2232a473f8713f532c8164c8cf616f7bd05f54a7/numpy/random/_generator.pyx#L2805

--
nosy: +gregory.p.smith
versions: +Python 3.11 -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue37439>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: remove the deprecated 'loop' parameter asyncio API -> [document removal 
of] the deprecated 'loop' parameter asyncio API in 3.10

___
Python tracker 
<https://bugs.python.org/issue42392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >