[issue42238] Deprecate suspicious.py?

2020-11-16 Thread Julien Palard


Change by Julien Palard :


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

___
Python tracker 

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



[issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds

2020-11-16 Thread Ma Lin


New submission from Ma Lin :

MSVC2019 has a new option `/Ob3`, it specifies more aggressive inlining than 
/Ob2:
https://docs.microsoft.com/en-us/cpp/build/reference/ob-inline-function-expansion?view=msvc-160

If use this option in MSVC2017, it will emit a warning:
cl : Command line warning D9002 : ignoring unknown option '/Ob3'

Just apply `Ob3.diff`, get this improvement:
(Python 3.9 branch, No PGO, build.bat -p X64)

+-+--+--+
| Benchmark   | baseline | ob3  |
+=+==+==+
| 2to3| 563 ms   | 552 ms: 1.02x faster (-2%)   |
+-+--+--+
| chameleon   | 16.5 ms  | 16.1 ms: 1.03x faster (-3%)  |
+-+--+--+
| chaos   | 200 ms   | 197 ms: 1.02x faster (-2%)   |
+-+--+--+
| crypto_pyaes| 186 ms   | 184 ms: 1.01x faster (-1%)   |
+-+--+--+
| deltablue   | 13.0 ms  | 12.6 ms: 1.03x faster (-3%)  |
+-+--+--+
| dulwich_log | 94.5 ms  | 93.9 ms: 1.01x faster (-1%)  |
+-+--+--+
| fannkuch| 806 ms   | 761 ms: 1.06x faster (-6%)   |
+-+--+--+
| float   | 211 ms   | 199 ms: 1.06x faster (-6%)   |
+-+--+--+
| genshi_text | 48.3 ms  | 47.7 ms: 1.01x faster (-1%)  |
+-+--+--+
| go  | 446 ms   | 437 ms: 1.02x faster (-2%)   |
+-+--+--+
| hexiom  | 16.6 ms  | 15.9 ms: 1.04x faster (-4%)  |
+-+--+--+
| json_dumps  | 19.9 ms  | 19.3 ms: 1.03x faster (-3%)  |
+-+--+--+
| json_loads  | 45.5 us  | 43.9 us: 1.04x faster (-3%)  |
+-+--+--+
| logging_format  | 21.4 us  | 20.7 us: 1.03x faster (-3%)  |
+-+--+--+
| logging_silent  | 343 ns   | 319 ns: 1.07x faster (-7%)   |
+-+--+--+
| mako| 29.0 ms  | 27.6 ms: 1.05x faster (-5%)  |
+-+--+--+
| meteor_contest  | 168 ms   | 162 ms: 1.04x faster (-3%)   |
+-+--+--+
| nbody   | 256 ms   | 244 ms: 1.05x faster (-5%)   |
+-+--+--+
| nqueens | 168 ms   | 162 ms: 1.04x faster (-4%)   |
+-+--+--+
| pathlib | 175 ms   | 168 ms: 1.04x faster (-4%)   |
+-+--+--+
| pickle  | 17.9 us  | 17.3 us: 1.04x faster (-4%)  |
+-+--+--+
| pickle_dict | 41.0 us  | 33.2 us: 1.24x faster (-19%) |
+-+--+--+
| pickle_list | 6.73 us  | 5.89 us: 1.14x faster (-12%) |
+-+--+--+
| pickle_pure_python  | 829 us   | 793 us: 1.05x faster (-4%)   |
+-+--+--+
| pidigits| 243 ms   | 243 ms: 1.00x faster (-0%)   |
+-+--+--+
| pyflate | 1.21 sec | 1.18 sec: 1.03x faster (-2%) |
+-+--+--+
| raytrace| 947 ms   | 915 ms: 1.03x faster (-3%)   |
+-+--+--+
| regex_compile   | 291 ms   | 284 ms: 1.03x faster (-2%)   |
+-+--+--+
| regex_dna   | 217 ms   | 222 ms: 1.02x slower (+2%)   |
+-+--+--+
| regex_effbot| 3.97 ms  | 4.13 ms: 1.04x slower (+4%)  |
+-+--+--+
| regex_v8| 35.2 ms  | 34.6 ms: 1.02x faster (-2%)  |
+-+--+--+
| richards

[issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds

2020-11-16 Thread Christian Heimes


Christian Heimes  added the comment:

Could you please try again with PGO? All our official builds use PGO.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue13888] test_builtin failure when run after test_tk

2020-11-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It is still reproducible on Linux. I do not get a crash, just test failure and 
some strange output.

==
FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2122, in 
test_input_tty_non_ascii
self.check_input_tty("prompté", b"quux\xe9", "utf-8")
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2103, in 
check_input_tty
lines = self.run_child(child, terminal_input + b"\r\n")
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2021, in 
run_child
return self._run_child(child, terminal_input)
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2078, in 
_run_child
self.fail("got %d lines in pipe but expected 2, child output was:\n%s"
AssertionError: got 0 lines in pipe but expected 2, child output was:
quux

promptXIO:  fatal IO error 25 (Inappropriate ioctl for device) on X server ":0"
  after 35926 requests (35926 known processed) with 40 events remaining.


==
FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.PtyTests)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2126, in 
test_input_tty_non_ascii_unicode_errors
self.check_input_tty("prompté", b"quux\xe9", "ascii")
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2103, in 
check_input_tty
lines = self.run_child(child, terminal_input + b"\r\n")
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2021, in 
run_child
return self._run_child(child, terminal_input)
  File "/home/serhiy/py/cpython/Lib/test/test_builtin.py", line 2078, in 
_run_child
self.fail("got %d lines in pipe but expected 2, child output was:\n%s"
AssertionError: got 0 lines in pipe but expected 2, child output was:
quux

prompt?XIO:  fatal IO error 25 (Inappropriate ioctl for device) on X server ":0"
  after 35926 requests (35926 known processed) with 40 events remaining.


--

--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds

2020-11-16 Thread Ma Lin


Ma Lin  added the comment:

> Could you please try again with PGO?

Please wait.

BTW, this option was advised in another project.
In that project, even enable `\Ob3`, it still slower than GCC 9 build.
If you are interested, see: https://github.com/facebook/zstd/issues/2314

--

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Sorry, but making builtins.callable generic looks wrong to me. It is a 
predicate, not a constructor. If it would be called "iscallable" instead of 
"callable" nobody would propose to make it generic, right? It's just a 
coincidence that the name of this predicate equals to the name of 
typing.Callable and collections.abc.Callable.

builtins.callable was removed in Python 3.0 in favor of instance check for 
collections.Callable. Maybe removing it again (or renaming to iscallable) would 
solve confusion?

--

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Sorry, but making builtins.callable generic looks wrong to me. It is a 
> predicate, not a constructor. If it would be called "iscallable" instead of 
> "callable" nobody would propose to make it generic, right? It's just a 
> coincidence that the name of this predicate equals to the name of 
> typing.Callable and collections.abc.Callable.

I concur with Serhiy on this.

--
nosy: +BTaskaya

___
Python tracker 

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



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

2020-11-16 Thread Gregory P. Smith


New submission from Gregory P. Smith :

os.makedirs used to pass its mode argument on down recursively so that every 
level of directory it created would have the specified permissions.

That was removed in Python 3.7 as https://bugs.python.org/issue19930 as if it 
were a mis-feature.  Maybe it was in one situation, but it was also a desirable 
*feature*.  It wasn't a bug.

We've got 15 year old code depending on that and the only solution for it to 
work on Python 3.7-3.9 is to reimplement recursive directory creation. :(

This feature needs to be brought back.  Rather than flip flop on the API, 
adding an flag to indicate if the permissions should be applied recursively or 
not seems like the best way forward.

The "workaround" documented in the above bug is invalid.  umask cannot be used 
to control the intermediate directory creation permissions as that is a process 
wide global that would impact other threads or signal handlers.  umask also 
cannot be used as umask does not allow setting of special bits such as 
stat.S_ISVTX.

result: Our old os.makedirs() code that tried to set the sticky bit (ISVTX) on 
all directories now fails to set it at all levels.

--
components: Library (Lib)
keywords: 3.7regression
messages: 381082
nosy: gregory.p.smith, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Restore os.makedirs ability to apply mode to all directories created
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue19930] os.makedirs('dir1/dir2', 0) always fails

2020-11-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

This API change was not strictly a bugfix, it removed a feature existing code 
was relying on.

https://bugs.python.org/issue42367 opened to reconcile the two.

--
nosy: +gregory.p.smith

___
Python tracker 

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



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

2020-11-16 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
type: behavior -> enhancement

___
Python tracker 

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



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

2020-11-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

For consistency, pathlib.Path.mkdir should also gain this option.

--

___
Python tracker 

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



[issue42366] Use MSVC2019 and /Ob3 option to compile Windows builds

2020-11-16 Thread Ma Lin


Ma Lin  added the comment:

In PGO build, the improvement is not much.

(3.9 branch, with PGO, build.bat -p X64 --pgo)

+-+--+--+
| Benchmark   | baseline-pgo | ob3-pgo  |
+=+==+==+
| 2to3| 464 ms   | 462 ms: 1.01x faster (-1%)   |
+-+--+--+
| chameleon   | 14.0 ms  | 13.5 ms: 1.03x faster (-3%)  |
+-+--+--+
| crypto_pyaes| 142 ms   | 143 ms: 1.00x slower (+0%)   |
+-+--+--+
| django_template | 65.0 ms  | 65.4 ms: 1.01x slower (+1%)  |
+-+--+--+
| fannkuch| 665 ms   | 650 ms: 1.02x faster (-2%)   |
+-+--+--+
| float   | 166 ms   | 164 ms: 1.01x faster (-1%)   |
+-+--+--+
| genshi_text | 41.4 ms  | 41.0 ms: 1.01x faster (-1%)  |
+-+--+--+
| genshi_xml  | 88.1 ms  | 87.0 ms: 1.01x faster (-1%)  |
+-+--+--+
| go  | 315 ms   | 311 ms: 1.01x faster (-1%)   |
+-+--+--+
| hexiom  | 12.7 ms  | 12.6 ms: 1.01x faster (-1%)  |
+-+--+--+
| json_dumps  | 16.7 ms  | 16.6 ms: 1.01x faster (-1%)  |
+-+--+--+
| json_loads  | 33.5 us  | 32.1 us: 1.04x faster (-4%)  |
+-+--+--+
| logging_simple  | 13.6 us  | 13.3 us: 1.02x faster (-2%)  |
+-+--+--+
| mako| 22.7 ms  | 22.8 ms: 1.01x slower (+1%)  |
+-+--+--+
| meteor_contest  | 136 ms   | 138 ms: 1.01x slower (+1%)   |
+-+--+--+
| nbody   | 189 ms   | 186 ms: 1.02x faster (-2%)   |
+-+--+--+
| nqueens | 135 ms   | 135 ms: 1.01x faster (-1%)   |
+-+--+--+
| pathlib | 157 ms   | 154 ms: 1.02x faster (-2%)   |
+-+--+--+
| pickle  | 16.8 us  | 16.4 us: 1.02x faster (-2%)  |
+-+--+--+
| pickle_dict | 41.3 us  | 40.4 us: 1.02x faster (-2%)  |
+-+--+--+
| pickle_list | 6.34 us  | 6.42 us: 1.01x slower (+1%)  |
+-+--+--+
| pickle_pure_python  | 588 us   | 584 us: 1.01x faster (-1%)   |
+-+--+--+
| pidigits| 242 ms   | 242 ms: 1.00x faster (-0%)   |
+-+--+--+
| pyflate | 905 ms   | 898 ms: 1.01x faster (-1%)   |
+-+--+--+
| python_startup  | 28.0 ms  | 27.9 ms: 1.00x faster (-0%)  |
+-+--+--+
| regex_compile   | 220 ms   | 218 ms: 1.01x faster (-1%)   |
+-+--+--+
| regex_v8| 33.1 ms  | 32.9 ms: 1.01x faster (-1%)  |
+-+--+--+
| richards| 88.9 ms  | 88.3 ms: 1.01x faster (-1%)  |
+-+--+--+
| scimark_fft | 494 ms   | 486 ms: 1.02x faster (-2%)   |
+-+--+--+
| scimark_lu  | 210 ms   | 207 ms: 1.02x faster (-2%)   |
+-+--+--+
| scimark_monte_carlo | 141 ms   | 137 ms: 1.03x faster (-3%)   |
+-+--+--+
| scimark_sor | 263 ms   | 255 ms: 1.03x faster (-3

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

2020-11-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Alternatively we can add an optional argument for the mode of intermediate 
directories.

makedirs(name, mode=0o777, exist_ok=False, intermediate_mode=0o777)

--

___
Python tracker 

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



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

2020-11-16 Thread Christian Heimes


Christian Heimes  added the comment:

+1 for restoring the feature

+0 for Serhiy's proposal iff intermediate_mode defaults to the value of mode:


def makedirs(name, mode=0o777, exist_ok=False, *, intermediate_mode=None):
if intermediate_mode is None:
intermediate_mode = mode

--
nosy: +christian.heimes

___
Python tracker 

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



[issue42368] Make set ordered

2020-11-16 Thread Dan Gheorghe Haiduc


New submission from Dan Gheorghe Haiduc :

Now that dicts are ordered[1], would it by any chance make sense to also order 
sets?

A use case that I ran into is trying to reproducibly get a random.choice from a 
set (after calling random.seed). 

At first I did not need reproducibility, and I just called 
random.choice(list(my_set)). 

Later when I did need it, it was difficult to find out what was wrong. Then I 
realized that sets are unordered, and that order is not dependent on 
random.seed.

It seems there are also some other confused newbies out there.[2][3]

Thank you for the powerful language that is Python!

[1] https://www.python.org/dev/peps/pep-0468
[2] https://stackoverflow.com/q/11929701/235463
[3] https://stackoverflow.com/q/36317520/235463

--
components: Interpreter Core
messages: 381088
nosy: danuker
priority: normal
severity: normal
status: open
title: Make set ordered
type: enhancement

___
Python tracker 

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



[issue42368] Make set ordered

2020-11-16 Thread Dan Gheorghe Haiduc


Dan Gheorghe Haiduc  added the comment:

Oops. The reference number [2] in the previous message should instead be 
https://stackoverflow.com/q/6614447/235463 .

--

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas


New submission from Thomas :

According to https://docs.python.org/3.5/whatsnew/changelog.html#id108 
bpo-14099, reading multiple ZipExtFiles should be thread-safe, but it is not.

I created a small example where two threads try to read files from the same 
ZipFile simultaneously, which crashes with a Bad CRC-32 error. This is 
especially surprising since all files in the ZipFile only contain 0-bytes and 
have the same CRC.

My use case is a ZipFile with 82000 files. Creating multiple ZipFiles from the 
same "physical" zip file is not a satisfactory workaround because it takes 
several seconds each time. Instead, I open it only once and clone it for each 
thread:

with zipfile.ZipFile("/tmp/dummy.zip", "w") as dummy:
pass

def clone_zipfile(z):
z_cloned = zipfile.ZipFile("/tmp/dummy.zip")
z_cloned.NameToInfo = z.NameToInfo
z_cloned.fp = open(z.fp.name, "rb")
return z_cloned

This is a much better solution for my use case than locking. I am using 
multiple threads because I want to finish my task faster, but locking defeats 
that purpose.

However, this cloning is somewhat of a dirty hack and will break when the file 
is not a real file but rather a file-like object.

Unfortunately, I do not have a solution for the general case.

--
files: test.py
messages: 381090
nosy: Thomas
priority: normal
severity: normal
status: open
title: Reading ZipFile not thread-safe
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49601/test.py

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas


Change by Thomas :


--
components: +Library (Lib)
type:  -> crash

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Ma Lin


Change by Ma Lin :


--
nosy: +malin

___
Python tracker 

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



[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-16 Thread Max Desiatov


Change by Max Desiatov :


--
nosy:  -MaxDesiatov

___
Python tracker 

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



[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-16 Thread mattip


mattip  added the comment:

Over at NumPy we are getting reports that some python built for macOSx 11 is 
not accepting wheels with the `macosx_10_9_x86_64` platform tag. Could it be 
related to this issue, another open issue, or some other provider's python? 
xref https://github.com/numpy/numpy/issues/17784

--
nosy: +mattip

___
Python tracker 

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



[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3df5c68487df9d1d20ab0cd06e7942a4f96d40a4 by Victor Stinner in 
branch 'master':
bpo-37205: time.perf_counter() and time.monotonic() are system-wide (GH-23284)
https://github.com/python/cpython/commit/3df5c68487df9d1d20ab0cd06e7942a4f96d40a4


--

___
Python tracker 

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



[issue42368] Make set ordered

2020-11-16 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://mail.python.org/pipermail/python-dev/2019-February/156466.html

--
nosy: +methane, rhettinger, xtreak

___
Python tracker 

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



[issue42309] BUILD: AIX-64-bit segmentation fault using xlc

2020-11-16 Thread Michael Felt


Michael Felt  added the comment:

Added "using xlc" to description.

When I have a system that has 64-bit support for gcc - I'll verify that it 
works, or does not work, for me using gcc.

--
title: BUILD: AIX-64-bit segmentation fault -> BUILD: AIX-64-bit segmentation 
fault using xlc

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread Miro Hrončok

Miro Hrončok  added the comment:

Could the removal of the parser module be documented in 
https://docs.python.org/3.10/whatsnew/3.10.html please?

--
nosy: +hroncok

___
Python tracker 

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



[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread Michael Felt


Michael Felt  added the comment:

I have been experimenting with different hardware and AIX versions.

When building on AIX 5.3 - and the oldest libraries - test_math passes.

When I run the test on POWER8, using either xlc or gcc test_math fails with 
just one element of the test.

When I run the test on POWER6 I get many more errors - that I never had before. 
These are all after OS updates (I was not going to build for AIX 5.3 any more).

An idea I have now - that may explain the sudden change in behavior is if the 
libraries have been optimized to always use the DFP (decimal floating point) 
internally - for what, from the application perspective - is the normal - no HW 
acceleration for FP - interface.

I know there are ways to 'discover' this, but I'll need to write some tests so 
that I can see - if linking to different libraries actuates DFP performance 
counters yes and no.

At this point - this feels like the a potential explanation.

--

___
Python tracker 

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



[issue41100] Support macOS 11 and Apple Silicon Macs

2020-11-16 Thread Ned Deily

Ned Deily  added the comment:

@mattip, it could also be due to https://github.com/pypa/packaging/pull/319. 
I’m away from the keyboard fir the moment and can’t investigate further.

--

___
Python tracker 

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



[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2020-11-16 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22205
pull_request: https://github.com/python/cpython/pull/23314

___
Python tracker 

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



[issue42368] Make set ordered

2020-11-16 Thread Dan Gheorghe Haiduc


Dan Gheorghe Haiduc  added the comment:

rhettinger wrote [1]:

> The existing setobject code has been finely tuned and micro-optimized over 
> the years, giving it excellent performance on workloads we care about.

This worries me also. But I suppose the tuning should make itself visible in 
benchmarks. Does Python have "canonical" benchmarks or  speed tests like 
PyPy[2]?

I am not sure how useful this is, but I made a naive and synthetic 
line_profiler benchmark of a naive implementation of set through a dict (see 
attached file).

It resulted in roughly the following differences:

* Initialization from a 1M-sized list: 41-66% slower
* Inserting an item until doubling size: about the same (perhaps faster, due to 
the size I've chosen not triggering rebuilding of a dict hash table)
* Deletion: 7-11% slower
* Membership test: 2-15% slower

Running them in the opposite order (first dict, then set) gave me the ranges.

I have not considered memory usage (I have not profiled memory before). But I 
suspect this would be larger, since a dict would keep values in addition to 
keys.

Additionally, initializing smaller structures (length = 100) seems to be 
slower; the initialization takes 2x longer (100% slower), but the O(1) 
operations take about the same.

I suspect methane's implementation linked by xtreak is better (but I have not 
tried it).

Profiled with:
kernprof -l set_test.py
python -m line_profiler set_test.py.lprof

[1] https://mail.python.org/pipermail/python-dev/2019-February/156475.html

[2] https://speed.pypy.org/

--
Added file: https://bugs.python.org/file49602/set_test.py

___
Python tracker 

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



[issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit'

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5909a494cd3ba43143b28bd439773ed85a485dfc by Victor Stinner in 
branch 'master':
bpo-42350: Fix Thread._reset_internal_locks() (GH-23268)
https://github.com/python/cpython/commit/5909a494cd3ba43143b28bd439773ed85a485dfc


--

___
Python tracker 

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



[issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit'

2020-11-16 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +22206
pull_request: https://github.com/python/cpython/pull/23315

___
Python tracker 

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



[issue42087] Remove pre-AIX 6.1 dead code paths

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

Michael Felt, David Eldelsohn: are you ok to drop support for AIX 5.3 and older?

--
nosy: +David.Edelsohn, aixto...@gmail.com

___
Python tracker 

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



[issue42370] test_ttk_guionly: test_to() fails on the GitHub Ubuntu job

2020-11-16 Thread STINNER Victor


New submission from STINNER Victor :

Seen on the Ubuntu job on a GitHub PR:
https://github.com/python/cpython/pull/23315/checks?check_run_id=1406797840

==
FAIL: test_to (tkinter.test.test_ttk.test_widgets.SpinboxTest)
--
Traceback (most recent call last):
  File 
"/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", 
line 1175, in test_to
self.assertEqual(self.spin.get(), '5')
AssertionError: '4' != '5'
- 4
+ 5

--
components: Tests, Tkinter
messages: 381101
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_ttk_guionly: test_to() fails on the GitHub Ubuntu job
versions: Python 3.9

___
Python tracker 

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



[issue42371] Missing colon in timezone suffix raises ValueError

2020-11-16 Thread Bengt Lüers

New submission from Bengt Lüers :

I am trying to parse ISO8601-formatted datetime strings with timezones.

This works fine when there is a colon separating the hour and minute digits:

>>> import datetime
>>> datetime.datetime.fromisoformat('2020-11-16T11:00:00+00:00')
>>> datetime.datetime(2020, 11, 16, 11, 0, tzinfo=datetime.timezone.utc)

However this fails when there is no colon between the hour and the minute 
digits:

>>> import datetime
>>> datetime.datetime.fromisoformat('2020-11-16T11:00:00+')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid isoformat string: '2020-11-16T11:00:00+'

This behavior is unexpected, as the ISO8601 standard allows omitting the colon 
in the string and defining the timezone as "±hhmm
":

https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC

As a workaround, I normalized the timezone suffixes before parsing:

>>> if iso8601_string.endswith('+'):
>>> return iso8601_string[:-len('+')] + '+00:00'
>>> if iso8601_string.endswith('+00'):
>>> return iso8601_string[:-len('+00')] + '+00:00'
>>> if iso8601_string.endswith('-'):
>>> return iso8601_string[:-len('-')] + '+00:00'
>>> if iso8601_string.endswith('-00'):
>>> return iso8601_string[:-len('-00')] + '+00:00'

This only works for the UTC timezone. I would be nice to have a more general 
solution which can handle any timezone.

I tested this with CPython 3.8. `.fromisoformat()` was added in 3.7, so earlier 
versions should not be affected by this:

https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat

--
components: Library (Lib)
messages: 381102
nosy: Bengt.Lüers
priority: normal
severity: normal
status: open
title: Missing colon in timezone suffix raises ValueError
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue42371] datetime.fromisoformat(): Omitted colon in timezone suffix raises ValueError

2020-11-16 Thread Bengt Lüers

Change by Bengt Lüers :


--
title: datetime.fromisoformat(): Missing colon in timezone suffix raises 
ValueError -> datetime.fromisoformat(): Omitted colon in timezone suffix raises 
ValueError

___
Python tracker 

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



[issue42371] datetime.fromisoformat(): Missing colon in timezone suffix raises ValueError

2020-11-16 Thread Bengt Lüers

Change by Bengt Lüers :


--
title: Missing colon in timezone suffix raises ValueError -> 
datetime.fromisoformat(): Missing colon in timezone suffix raises ValueError

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

Please also document the removal of the node.h header file. The removal of this 
file broke the build of the two following packages.


mod_wsgi: https://bugzilla.redhat.com/show_bug.cgi?id=1898158

In file included from src/server/mod_wsgi.c:22:
src/server/wsgi_python.h:44:10: fatal error: node.h: No such file or directory
   44 | #include "node.h"
  |  ^~~~
compilation terminated.

kdevelop-python: https://bugzilla.redhat.com/show_bug.cgi?id=1898116


In file included from 
/builddir/build/BUILD/kdev-python-5.6.0/parser/astbuilder.cpp:31:
/builddir/build/BUILD/kdev-python-5.6.0/parser/python_header.h:33:10: fatal 
error: node.h: No such file or directory
   33 | #include "node.h"
  |  ^~~~
compilation terminated.

--

___
Python tracker 

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



[issue42309] BUILD: AIX-64-bit segmentation fault using xlc-v11

2020-11-16 Thread Michael Felt


Michael Felt  added the comment:

For now, I am going to suggest closing this - as a bug in the xlc-v11 compiler 
- and not worth researching.

I am able to build the 3.9 distribution as well as the 3.10 master using the 
xlC-v13-1.3.2 (Try and Buy) version.

Thanks for thinking together!

--
title: BUILD: AIX-64-bit segmentation fault using xlc -> BUILD: AIX-64-bit 
segmentation fault using xlc-v11

___
Python tracker 

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



[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ae6cd7cfdab0599139002c526953d907696d9eef by Victor Stinner in 
branch 'master':
bpo-37205: time.time() cannot fail with fatal error (GH-23314)
https://github.com/python/cpython/commit/ae6cd7cfdab0599139002c526953d907696d9eef


--

___
Python tracker 

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



[issue42087] Remove pre-AIX 6.1 dead code paths

2020-11-16 Thread David Edelsohn


David Edelsohn  added the comment:

I think that it is reasonable to drop support for AIX 5.3.

--

___
Python tracker 

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



[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue, it's now fixed in master. Thanks for the bug report Ken 
Healy.


While Python 3.8 and 3.9 are also affected, I prefer to leave them unchanged to 
avoid bad surprises during a minor update (3.x.y bugfix release). If you 
disagree, please speak up!


The regression was introduced in Python 3.7 by:

commit bdaeb7d237462a629e6c85001317faa85f94a0c6
Author: Victor Stinner 
Date:   Mon Oct 16 08:44:31 2017 -0700

bpo-31773: _PyTime_GetPerfCounter() uses _PyTime_t (GH-3983)

* Rewrite win_perf_counter() to only use integers internally.
* Add _PyTime_MulDiv() which compute "ticks * mul / div"
  in two parts (int part and remaining) to prevent integer overflow.
* Clock frequency is checked at initialization for integer overflow.
* Enhance also pymonotonic() to reduce the precision loss on macOS
  (mach_absolute_time() clock).

This change was related to the implementation of the PEP 564.

If you are curious about this work, I wrote two articles:

* https://vstinner.github.io/python37-pep-564-nanoseconds.html
* https://vstinner.github.io/python37-perf-counter-nanoseconds.html
* https://vstinner.github.io/pytime.html

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

___
Python tracker 

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



[issue42087] Remove pre-AIX 6.1 dead code paths

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c79667ff7921444911e8a5dfa5fba89294915590 by Kevin Adler in branch 
'master':
bpo-42087: Remove support for AIX 5.3 and below (GH-22830)
https://github.com/python/cpython/commit/c79667ff7921444911e8a5dfa5fba89294915590


--

___
Python tracker 

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



[issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit'

2020-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset cf70854f10096446115408b5a94030b30594a459 by Miss Islington (bot) 
in branch '3.9':
bpo-42350: Fix Thread._reset_internal_locks() (GH-23268)
https://github.com/python/cpython/commit/cf70854f10096446115408b5a94030b30594a459


--

___
Python tracker 

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



[issue42087] Remove pre-AIX 6.1 dead code paths

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

David Edelsohn: "I think that it is reasonable to drop support for AIX 5.3."

Good.

Thanks Kevin Adler, I merged your PR.

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

___
Python tracker 

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



[issue42350] Calling os.fork() at Python exit logs: AttributeError: 'NoneType' object has no attribute '_at_fork_reinit'

2020-11-16 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread David Edelsohn


David Edelsohn  added the comment:

I investigated another problem with nextafter() in 2015 and opened an internal 
IBM AIX PMR.  At the time it was not using decimal float code.

The earlier problem was the handling of -0.0.  At the time, the code was 
hand-written assembly language that did not check for IEEE floating point 
corner cases.

--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will submit a PR today

--

___
Python tracker 

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



[issue42372] A crash in do_richcompare

2020-11-16 Thread Alexander Kurakin


New submission from Alexander Kurakin :

Sometimes test.py causes a crash in 3.7.9 (and lower to 2018 year or more) on 
Linux.

See also: https://github.com/pandas-dev/pandas/issues/21968

--
components: Interpreter Core
files: issue.zip
messages: 381113
nosy: kuraga
priority: normal
severity: normal
status: open
title: A crash in do_richcompare
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file49603/issue.zip

___
Python tracker 

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



[issue42178] failed pickle hangs python on exit in CMD.exe only

2020-11-16 Thread Eryk Sun


Change by Eryk Sun :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue42373] PEP 626 does not specify behavior of tracing for keywords.

2020-11-16 Thread Mark Shannon


New submission from Mark Shannon :

PEP 626 doesn't cover which keywords are to be traced if they occur on a line 
by themselves.

Some keywords, like `break`, in Python have behavior associated with them.
Others, like `else` are just syntax and don't do anything.
Currently, it is not clear which keywords get traced and which do not.


I'd like to update the PEP to include the following:

Keywords can be broken down into five groups.
1. Must have an attendant expression ( "if", "while", "for", "await")
   These keywords are not traced, since their expressions are.
2. Have an optional expression and perform non-local control flow ( "return", 
"yield", "raise", "except" )
   These keywords are traced. If on a different line from the expression, they 
will generate additional events.
3. Pure syntax ( "else", "try", "finally" )
   These keywords are not traced.
4. Local control flow ( "break", continue", "pass" )
   These keywords are traced
5. Expressions ( "None", "True", "False" )
   Treated like other expressions


Examples:

1. if (
2.test
3. ):

will generate an event for line 2.


1. return (
2.x
3. ):

will generate an event for line 2, then line 1.

1. try:
2.None
3. finally:
4.pass

Will generate an event for line 2, then line 4.


Note that whatever changes, the invariant remains that if a line is in 
`co_lines()` then it will generate trace events, and if it isn't then it won't.

--
assignee: Mark.Shannon
messages: 381114
nosy: Mark.Shannon, nedbat, pablogsal
priority: normal
severity: normal
status: open
title: PEP 626 does not specify behavior of tracing for keywords.
versions: Python 3.10

___
Python tracker 

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



[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

> The earlier problem was the handling of -0.0.  At the time, the code was 
> hand-written assembly language that did not check for IEEE floating point 
> corner cases.

I'm quite happy that my hand written tests detect bugs in nextafter() 
implementations ;-)

--

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-11-16 Thread Yurii Karabas


Change by Yurii Karabas <1998uri...@gmail.com>:


--
keywords: +patch
nosy: +uriyyo
nosy_count: 3.0 -> 4.0
pull_requests: +22207
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23316

___
Python tracker 

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



[issue13892] distutils handling of windows manifest isn't optimal

2020-11-16 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42373] PEP 626 does not specify behavior of tracing for keywords.

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, could you kindly create a proposed update to the PEP in the form of a PR 
so I can evaluate it and we can iterate directly over the final specification?

--

___
Python tracker 

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



[issue42371] datetime.fromisoformat(): Omitted colon in timezone suffix raises ValueError

2020-11-16 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Steve Dower


Steve Dower  added the comment:

We can backport it, but the latest version always wins. I deliberately designed 
the installer (which has multiple embedded MSIs in it) to make sure this 
worked, so that earlier versions won't overwrite the launcher (anymore).

Besides, this is a purely cosmetic change. PEP 514 describes how to 
programmatically get the list of versions (i.e. without using py.exe at all).

--

___
Python tracker 

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



[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

You may call it cosmetic, but for me it's a matter of usability.

Nevertheless, given how you designed the installer, we can drop the backport.

--

___
Python tracker 

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



[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Guido van Rossum


Change by Guido van Rossum :


--
versions:  -Python 3.8, Python 3.9

___
Python tracker 

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



[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

How can we fix the buildbot? Add #ifdef in mathmodule.c to implement the 
special cases, but only on AIX? Skip the test?

--

___
Python tracker 

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



[issue42370] test_ttk_guionly: test_to() fails on the GitHub Ubuntu job

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

I'm unable to reproduce the failure locally.

--

___
Python tracker 

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



[issue42231] test_zipimport failure

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

The 3 mentionned buildbot workers are back to green, so I close the issue.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. Thanks for the constructive discussion and I hope that more 
and more downstream patches will be merged in Python upstream ;-)

--
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue41741] test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/51 is green for 2 months, I close 
the issue.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

For the signal module, see bpo-41713.

--

___
Python tracker 

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



[issue38261] Tkinter CheckButton default label white in macOS dark mode

2020-11-16 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The same behaviour can be observed with Tk 8.6.10 build on macOS 11.

IMHO the problem is not so much that the default text color changes, but that 
the background color of the window does not change, it stays the same light 
color as in light mode. 

According to the Tk wiki 
 the background 
color should adjust itself automatically.  I don't know if Tkinter does 
something that affects this.

--

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm changing from "crash" to "behavior". We use "crash" for a segfault or 
equivalent. I realize that most people are unlikely to know this, but we 
consider "crash" to be more alarming, so I want to make sure it's correct.

Also: when this happens, is it always for file 127, or does it change on each 
run?

--
nosy: +eric.smith
type: crash -> behavior

___
Python tracker 

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



[issue42371] datetime.fromisoformat(): Omitted colon in timezone suffix raises ValueError

2020-11-16 Thread Paul Ganssle


Paul Ganssle  added the comment:

This is the expected behavior of `.fromisoformat()`. A similar issue is 
https://bugs.python.org/issue35829, which asks for the "Z" suffix to be 
supported.

There is a note about this in the documentation: 
https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat

"Caution This does not support parsing arbitrary ISO 8601 strings - it is only 
intended as the inverse operation of datetime.isoformat(). A more full-featured 
ISO 8601 parser, dateutil.parser.isoparse is available in the third-party 
package dateutil."

At some point we will work out the kinks in offering as full an ISO 8601 
datetime parser as possible, but the ISO 8601 datetime spec is very complicated 
and includes many optional features. We deliberately chose to keep the scope of 
`.fromisoformat()` minimal at first, whereas `dateutil.parser.isoparse` 
attempts to be a full-featured ISO8601 parser.

Changing the version affected to 3.10, since this is a feature request.

--
type: behavior -> enhancement
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue11374] pkgutil.extend_path do not recognize py{c,o} file

2020-11-16 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



[issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX

2020-11-16 Thread Michael Felt


Michael Felt  added the comment:

There seems to be a lot of interaction of OS level and compiler used.

* Waiting for the next bot run to get a different compiler.

+++
AIX 6.1.6 and older libraries - no test errors reported

AIX 7.1.4 and newer libraries - when using the binary built on 6.1.6 (AIX 6.1 
TL6) - no error

AIX 7.1.4, using xlc-v13.1.2 (try and buy version), same AIX level as the bot 
(7.1 TL4 SP8) - no error

Back to the bot: AIX 7.1 TL4 SP8 and gcc-4.7.4 - strange errors. See, e.g., 
https://buildbot.python.org/all/#/builders/302/builds/373/steps/5/logs/stdio 
with additional errors such as:

==
FAIL: testHypotAccuracy (test.test_math.MathTests) (hx='0x1.89d8c423ea0c6p+29', 
hy='0x1.d35dcfe902bc3p+29', x=825956484.4892814, y=980138493.1263355)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_math.py", 
line 867, in testHypotAccuracy
self.assertEqual(hypot(x, y), z)
AssertionError: 1281747081.1271062 != 1281747081.127106

Waiting for bot run 374 - to see if the results change when the compiler 
changes.

I'll try moving the bot to another system - as the system the bot is on is more 
than just the bot. Maybe there are side-effects coming in, unexpectedly, from 
other sources. ** The two systems just mentioned are fresh installs.

--

___
Python tracker 

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



[issue13561] os.listdir documentation should mention surrogateescape

2020-11-16 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was added in another section of this doc. See the second paragraph 
in 
https://docs.python.org/3/library/os.html#file-names-command-line-arguments-and-environment-variables

--
nosy: +iritkatriel

___
Python tracker 

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



[issue42316] Walrus Operator in list index

2020-11-16 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy: +lys.nikolaou
nosy_count: 3.0 -> 4.0
pull_requests: +22208
pull_request: https://github.com/python/cpython/pull/23317

___
Python tracker 

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



[issue42372] A crash in do_richcompare

2020-11-16 Thread Christian Heimes


Christian Heimes  added the comment:

The Pandas bug links to a traceback:

Program received signal SIGSEGV, Segmentation fault.
0x5589b0a0 in PyUnicode_Type ()
(gdb) bt
#0  0x5589b0a0 in PyUnicode_Type ()
#1  0x5567d8b3 in do_richcompare (op=2, w=0x777a4b20, 
v=0x7fffe73b57b0) at 
/tmp/build/80754af9/python_1598874792229/work/Objects/object.c:698
#2  PyObject_RichCompare (v=0x7fffe73b57b0, w=0x777a4b20, op=) at /tmp/build/80754af9/python_1598874792229/work/Objects/object.c:746
#3  0x5567d9c0 in PyObject_RichCompareBool (v=, 
w=, op=) at 
/tmp/build/80754af9/python_1598874792229/work/Objects/object.c:768
#4  0x7fffe90713a7 in 
__pyx_f_6pandas_5_libs_9hashtable_17PyObjectHashTable_get_item () from 
/home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/hashtable.cpython-37m-x86_64-linux-gnu.so
#5  0x7fffe90716ae in 
__pyx_pw_6pandas_5_libs_9hashtable_17PyObjectHashTable_11get_item () from 
/home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/hashtable.cpython-37m-x86_64-linux-gnu.so
#6  0x7fffe849aff4 in __Pyx_PyObject_CallOneArg () from 
/home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#7  0x7fffe84e6740 in __pyx_f_6pandas_5_libs_5index_11IndexEngine_get_loc 
() from 
/home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#8  0x7fffe84e75ce in __pyx_pw_6pandas_5_libs_5index_11IndexEngine_5get_loc 
() from 
/home/sasha/miniconda3/lib/python3.7/site-packages/pandas/_libs/index.cpython-37m-x86_64-linux-gnu.so
#9  0x556b972d in _PyMethodDef_RawFastCallKeywords 
(method=0x7fffe84fd9c0 <__pyx_methods_6pandas_5_libs_5index_IndexEngine>, 
self=0x7fffe734d830, args=0x56158448, nargs=, 
kwnames=)
at /tmp/build/80754af9/python_1598874792229/work/Objects/call.c:647
#10 0x556c07af in _PyMethodDescr_FastCallKeywords 
(descrobj=0x7fffe8530b90, args=0x56158440, nargs=2, kwnames=0x0) at 
/tmp/build/80754af9/python_1598874792229/work/Objects/descrobject.c:288
#11 0x55725c7c in call_function (kwnames=0x0, oparg=2, 
pp_stack=) at 
/tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4593
#12 _PyEval_EvalFrameDefault (f=, throwflag=) at 
/tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3110
#13 0x55668829 in _PyEval_EvalCodeWithName (_co=0x7fffe85038a0, 
globals=, locals=, args=, 
argcount=, kwnames=0x0, kwargs=0x56150f30, kwcount=0, 
kwstep=1, 
defs=0x7fffe85221a8, defcount=2, kwdefs=0x0, closure=0x0, 
name=0x7fffe86303f0, qualname=0x7fffe85055b0) at 
/tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3930
#14 0x556b90a5 in _PyFunction_FastCallKeywords (func=, 
stack=0x56150f20, nargs=2, kwnames=) at 
/tmp/build/80754af9/python_1598874792229/work/Objects/call.c:433
#15 0x55721740 in call_function (kwnames=0x0, oparg=, 
pp_stack=) at 
/tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:4616
#16 _PyEval_EvalFrameDefault (f=, throwflag=) at 
/tmp/build/80754af9/python_1598874792229/work/Python/ceval.c:3110
#17 0x55668829 in _PyEval_EvalCodeWithName (_co=0x7fffe7e13b70, 
globals=, locals=, args=, 
argcount=, kwnames=0x7fffe7e863d8, kwargs=0x7fffe73503e8, 
kwcount=2, kwstep=1,


The problem is probably a bug in Pandas or another C extension. The stacktrace 
does not contain enough information to see the type and value of v and w.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Steve Dower


Steve Dower  added the comment:

It's cosmetic in the sense that it *only* affect usability, and not correctness.

If it had no impact at all, I'd be calling it "pointless" ;)

--

___
Python tracker 

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



[issue1178136] cgitb.py support for frozen images

2020-11-16 Thread Barry Alan Scott


Barry Alan Scott  added the comment:

Ok. I'll add this to my todo list.

--
status: pending -> open

___
Python tracker 

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



[issue1178136] cgitb.py support for frozen images

2020-11-16 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.9 -Python 3.2

___
Python tracker 

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



[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread Lysandros Nikolaou

New submission from Lysandros Nikolaou :

While a walrus is valid withing generator expressions in 3.8, it's not in 3.9 
and onward.

➜  cpython git:(master) ✗ python3.8   
Python 3.8.6 (default, Oct  3 2020, 16:26:47) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> i = 2
>>> a = [1, 2, 3, 4]
>>> (b := i + j for j in a)
 at 0x7f231e78c740>


➜  cpython git:(master) python3.10  
Python 3.10.0a1+ (heads/master:b580ed1, Oct 19 2020, 15:52:12) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> i = 2
>>> a = [1, 2, 3, 4]
>>> (b := i + j for j in a)
  File "", line 1
(b := i + j for j in a)
^
SyntaxError: invalid syntax

This is a regression introduced by the new parser.

--
components: Interpreter Core
keywords: 3.9regression
messages: 381133
nosy: gvanrossum, lys.nikolaou, pablogsal, terry.reedy
priority: normal
severity: normal
status: open
title: Unparenthesized walrus is not allowed in genexps
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue12956] builds fail when installing to --prefix with space in path name

2020-11-16 Thread Irit Katriel


Irit Katriel  added the comment:

LMO, if you are still interested in this issue, could you be more specific 
about where you think this should be documented? If you want to create a patch, 
go for it.

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references

2020-11-16 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22209
pull_request: https://github.com/python/cpython/pull/23318

___
Python tracker 

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



[issue42374] Unparenthesized walrus is not allowed in genexps

2020-11-16 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue12726] explain that locale.getlocale() does not read system's locales

2020-11-16 Thread Irit Katriel


Irit Katriel  added the comment:

I tried "import locale; locale.getlocale()" on macOS and windows (3.10) and 
linux (3.7) and in all cases I got non-None values.  Can we close this as out 
of date?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue24132] Direct sub-classing of pathlib.Path

2020-11-16 Thread Xtrem532


Change by Xtrem532 :


--
nosy: +Xtrem532

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Pablo, have you already started on this? I didn't see your comment earlier and 
I've got a PR ready.

--

___
Python tracker 

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



[issue42375] subprocess DragonFlyBSD build update

2020-11-16 Thread David CARLIER


Change by David CARLIER :


--
components: Extension Modules
nosy: devnexen
priority: normal
pull_requests: 22211
severity: normal
status: open
title: subprocess DragonFlyBSD build update
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Pablo, have you already started on this? I didn't see your comment earlier 
> and I've got a PR ready.

Yeah, but don't worry: submit your PR and I will review it :)

--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +22212
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23321

___
Python tracker 

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



[issue42178] failed pickle hangs python on exit in CMD.exe only

2020-11-16 Thread Eryk Sun


Eryk Sun  added the comment:

Steve or Zach, please review PR 23290, submitted by Teugea Ioan-Teodor. It 
modifies the startup sequence for worker processes by creating the child 
process with a suspended thread and pickling process_obj to a BytesIO instance 
before resuming the thread and writing the pickle data to the pipe. If pickling 
fails, the child process is terminated before the thread is resumed, since 
there's no point in allowing the child to execute. 

This doesn't directly address the issue with interpreter startup that can cause 
Python to hang on a synchronous I/O request, but it does avoid the problem.

Alternatively, when there's a pickling error, the parent could close its end of 
the pipe and wait for the child to exit before propagating the exception, but 
I'd rather skip executing the child completely.

--

___
Python tracker 

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas


Thomas  added the comment:

I have not observed any segfaults yet. Only zipfile.BadZipFile exceptions so 
far.

The exact file at which it crashes is fairly random. It even crashes if all 
threads try to read the same file multiple times.

I think the root cause of the problem is that the reads of zef_file in 
ZipFile.read are not locked properly.

https://github.com/python/cpython/blob/c79667ff7921444911e8a5dfa5fba89294915590/Lib/zipfile.py#L1515

The underlying file object is shared between all ZipExtFiles. Every time a 
thread makes a call to ZipFile.read, a new lock is created in _SharedFile, but 
that lock only protects against multiple threads reading the same ZipExtFile. 
Multiple threads reading different ZipExtFiles with the same underlying file 
object will cause trouble. The locks do nothing in this scenario because they 
are individual to each thread and not shared.

--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset c26d5916d68c47a20dd941f9e89afdaf85b2711e by Lysandros Nikolaou in 
branch 'master':
bpo-40939: Document removal of the old parser in 3.10 whatsnew (GH-23321)
https://github.com/python/cpython/commit/c26d5916d68c47a20dd941f9e89afdaf85b2711e


--

___
Python tracker 

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



[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

Well, it's certainly no bug fix, but just as PEP 585 lets us write list[int] 
instead of typing.List[int], it could be considered useful to be able to write 
callable[[int, int], str] instead of typing.Callable[[int, int], str].

It's easy enough to make it work so that callable(x) returns a bool but 
callable[X, Y] returns a built-in subclass of types.GenericAlias (the built-in 
type).

That said, I don't have data about how popular Callable is compared to other 
types (Sequence/Iterable etc. which will remain in collections.abc). Maybe 
someone can do some grepping of popular projects?

--

___
Python tracker 

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



[issue42372] A crash in do_richcompare

2020-11-16 Thread Alexander Kurakin


Alexander Kurakin  added the comment:

Thanks for reply!

Is it call of NULL? If so, shoudn't do_richcompare check it?

--

___
Python tracker 

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



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2020-11-16 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was fixed in 11599. Any objections to closing this?

--
nosy: +iritkatriel
resolution:  -> duplicate
status: open -> pending
superseder:  -> Useless error message when distutils fails compiling

___
Python tracker 

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



[issue42376] Add helpers to populate modules in C

2020-11-16 Thread Christian Heimes


New submission from Christian Heimes :

It's currently inconvenient and sometimes error-prone to initialize module 
members in C. Even stdlib modules are sometimes missing error checks or have 
reference counting issues in error path. I propose add three helpers to deal 
with common cases:

1) declaration of simple attributes (int, str, bool, float) in an array of 
structs
2) creation and addition of a new type from a type spec
3) creation and addition a new exception object


(1) Simple attribute declaration uses a NULL terminated array of 
PyModuleConst_Def. The internal definition of the type can be hidden by macros. 
Example:

   static PyModuleConst_Def example_constants[] = {
   PyModuleConst_None("none_value"),
   PyModuleConst_Long("integer", 42),
   PyModuleConst_Bool("false_value", 0),
   PyModuleConst_Bool("true_value", 1),
   PyModuleConst_String("somestring", "Hello"),
   PyModuleConst_LongMacro(EXAMPLE_INT),
   PyModuleConst_StringMacro(EXAMPLE_STRING),
   {NULL},
   }

A new function "int PyModule_AddConstants(PyObject *module, PyModuleConst_Def 
*def)" populates the module object with attributes.


(2) Type initialization

The function "PyTypeObject * PyModule_AddNewTypeFromSpec(PyObject *module, 
PyType_Spec *spec, PyObject *base)" is PyType_FromModuleAndSpec() + 
PyModule_AddType(). Additionally to PyType_FromModuleAndSpec() it also handles 
"base" argument with single type instance. The extra feature avoids 
"PyTuple_Pack(1, baseclass)" in the caller. The function adds a strong 
reference to the module object and returns a borrowed reference. The borrowed 
reference is designed module state assignment. 


(3) exception creation

The function "PyObject* PyModule_AddNewException(PyObject *module, const char 
*name, const char *doc, PyObject *base, PyObject *dict)" creates a new 
exception, calculates the attribute name for the qualified exception name, and 
adds the exception to the module. It's PyErr_NewExceptionWithDoc() + 
PyModule_AddObjectRef().


Note about (1): I first proposed to add PyModuleDef.m_constants, however we 
cannot extend the struct easily becaues it conflicts with stable ABI. Petr 
mentioned that he has plans to deal with the issue. Also see discussion 
https://discuss.python.org/t/define-module-constants-in-pymoduledef/5749

--
assignee: christian.heimes
components: C API
messages: 381144
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Add helpers to populate modules in C
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue13240] sysconfig gives misleading results for USE_COMPUTED_GOTOS

2020-11-16 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue42376] Add helpers to populate modules in C

2020-11-16 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +22213
pull_request: https://github.com/python/cpython/pull/23286

___
Python tracker 

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



[issue42335] Python Crashes Exception code 0xc0000374 ntdll.dll

2020-11-16 Thread Charles Staton


Charles Staton  added the comment:

I'm closing this. I have done a lot of research that seems to point to the way 
I'm handling threads as the cause, not Python itself.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42377] allow typing.cast with TYPE_CHECKING

2020-11-16 Thread Daniel Pinyol


Change by Daniel Pinyol :


--
nosy: dpinol
priority: normal
severity: normal
status: open
title: allow typing.cast with TYPE_CHECKING
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue42378] logging reopens file with same mode, possibly truncating

2020-11-16 Thread Ed Catmur


New submission from Ed Catmur :

If a logging.FileHandler is configured with mode='w', or if logging.basicConfig 
is called with filemode='w' (as suggested by the Basic Logging Tutorial 
https://docs.python.org/3/howto/logging.html#logging-basic-tutorial)
and if some code logs during shutdown, after logging has closed its handlers 
(asyncio is prone to do this, e.g.),
then logging.FileHandler._open will reopen the log file with the same mode as 
it was originally opened with, potentially truncating it and losing valuable 
information:

import atexit
atexit.register(lambda: logging.info("so long"))
import logging
logging.basicConfig(filename='test.log', filemode='w', level=logging.INFO)
logging.info("super important stuff")

$ python truncate.py
$ cat test.log
INFO:root:so long

I have a hunch that the fix to issue 26789 will potentially make things worse, 
as previously at least there was a chance that logging had been fully unloaded 
so that the call to open would fail.

https://stackoverflow.com/questions/39838616/why-is-python-logging-framework-losing-messages

--
components: Library (Lib)
messages: 381146
nosy: ecatmur2
priority: normal
severity: normal
status: open
title: logging reopens file with same mode, possibly truncating
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue42377] allow typing.cast with TYPE_CHECKING

2020-11-16 Thread Daniel Pinyol

New submission from Daniel Pinyol :

Executing the following code we get this error on the "cast" call
NameError: name 'A' is not defined


```
from __future__ import annotations
from typing import TYPE_CHECKING, Optional, cast
if TYPE_CHECKING:
   class A:
 pass

def f(a: A):
   pass


f(cast(A, "anything"))
```

It would be nice that you could use "cast" to force casts when the symbol is 
only available during TYPE_CHECKING. According to the "cast" specs, cast only 
works during type checking, but not during runtime. Hence, I think would be 
desirable that this code was legal. thanks

This returns the value unchanged. To the type checker this signals that the 
return value has the designated type, but at runtime we intentionally don’t 
check anything (we want this to be as fast as possible).

--

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-11-16 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue11604] Have type(n,b,d) check for type(b[i]) is module

2020-11-16 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +newcomer friendly
versions: +Python 3.10, Python 3.9 -Python 3.3

___
Python tracker 

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



  1   2   >