[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-10-04 Thread miss-islington


miss-islington  added the comment:


New changeset 7c2a040a10654d67ff543a55858ba2d7a9f7eea8 by John Belmonte in 
branch '3.9':
[3.9] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) 
(GH-28731)
https://github.com/python/cpython/commit/7c2a040a10654d67ff543a55858ba2d7a9f7eea8


--

___
Python tracker 

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



[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-10-04 Thread miss-islington


miss-islington  added the comment:


New changeset 872b1e537e96d0dc4ff37c738031940b5d271366 by John Belmonte in 
branch '3.10':
[3.10] bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) 
(GH-28730)
https://github.com/python/cpython/commit/872b1e537e96d0dc4ff37c738031940b5d271366


--
nosy: +miss-islington

___
Python tracker 

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



[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Xavier Morel


Xavier Morel  added the comment:

> True is a boolean so ~True should return False according to me.

That's be a BC break for no reason: if you want to invert a boolean you can 
just `not` it.

> True is not the same as 1

For historical reasons, in Python it is:

>>> bool.mro()
[, , ]
>>> True == 1
True
>>> False == 0
True

So when you call ~True, you're calling `int.__invert__(True)`, which behaves as 
what it is: the bitwise inverse of a two's-complement signed integer.

--
nosy: +xmorel

___
Python tracker 

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



[issue45163] Haiku build fix

2021-10-04 Thread Ned Deily


Change by Ned Deily :


--
nosy: +pablogsal

___
Python tracker 

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



[issue45163] Haiku build fix

2021-10-04 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR. However, it did introduce a breakage in certain builds due 
to unconditionally adding a check for libnetwork. For example, on older 
releases of macOS there is no libnetwork but building on newer systems it 
creates a dynamic load reference to a spurious and unrelated libnetworking 
library which causes multi-version binaries built on newer releases, like those 
of the python.org macOS installers, to fail to load on older systems. PR 28729 
adds a Haiku-only guard around the added configure check.

--
components: +Build
priority: normal -> release blocker
resolution: fixed -> 
stage: resolved -> commit review
status: closed -> open

___
Python tracker 

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



[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-10-04 Thread John Belmonte


Change by John Belmonte :


--
pull_requests: +27079
pull_request: https://github.com/python/cpython/pull/28731

___
Python tracker 

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



[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-10-04 Thread John Belmonte


Change by John Belmonte :


--
pull_requests: +27078
pull_request: https://github.com/python/cpython/pull/28730

___
Python tracker 

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



[issue45163] Haiku build fix

2021-10-04 Thread Ned Deily


Change by Ned Deily :


--
nosy: +ned.deily
nosy_count: 2.0 -> 3.0
pull_requests: +27077
pull_request: https://github.com/python/cpython/pull/28729

___
Python tracker 

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



[issue27637] int.to_bytes(-1, ...) should automatically choose required count of bytes

2021-10-04 Thread Lorenz Panny


Lorenz Panny  added the comment:

I would like to express my support for making length=None to automatically use 
the minimal possible length. It's true that this will rarely be needed in 
production-grade serialization code, but this functionality is worth its weight 
in gold for quickly written proof-of-concept code or when using Python as a 
"pocket calculator" in an interactive shell.

I'm sure I've personally typed the expression (n.bit_length()+7)//8 
approximately a million times while quickly trying something. It'd be nice if 
Python could just do this simple computation for me instead. The code changes 
required are minimal and there shouldn't be any performance impact.

In fact, in my opinion this should even be the default behaviour, but 3.11 just 
made length=1 the default (see #45155) and changing this now would cause an 
(albeit very mild) API incompatibility.

--
nosy: +lorenz_

___
Python tracker 

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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-10-04 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
nosy: +Dennis Sweeney
nosy_count: 8.0 -> 9.0
pull_requests: +27076
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/28727

___
Python tracker 

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



[issue45369] Remove LibreSSL support

2021-10-04 Thread ramikg


New submission from ramikg :

Python 3.10 drops support for LibreSSL (as per PEP 644), but there are still a 
few workarounds & mentions of LibreSSL in the source code.

The related PR cleans the code of any LibreSSL workarounds or mentions.

--
assignee: christian.heimes
components: SSL
messages: 403193
nosy: christian.heimes, ramikg
priority: normal
severity: normal
status: open
title: Remove LibreSSL support
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue45369] Remove LibreSSL support

2021-10-04 Thread ramikg


Change by ramikg :


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

___
Python tracker 

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



[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Narendra Madurkar


Narendra Madurkar  added the comment:

True is a boolean so ~True should return False according to me.
True is not the same as 1

--

___
Python tracker 

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



[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

What were you expecting?

I think those are correct. See:
>>> ~1
-2
>>> ~0
-1

--
nosy: +eric.smith

___
Python tracker 

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



[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-04 Thread Narendra Madurkar


New submission from Narendra Madurkar :

~(True) returns -2
~(False) returns -1

--
messages: 403190
nosy: nmadurkar
priority: normal
severity: normal
status: open
title: ~(True) and ~(False) gives incorrect result

___
Python tracker 

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



[issue45366] dataclass init=False field with default works but default_factory does not

2021-10-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue45367] Specialize BINARY_MULTIPLY

2021-10-04 Thread Dennis Sweeney


Change by Dennis Sweeney :


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

___
Python tracker 

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



[issue45367] Specialize BINARY_MULTIPLY

2021-10-04 Thread Dennis Sweeney


New submission from Dennis Sweeney :

I'm having trouble setting up a rigorous benchmark (Windows doesn't want to 
install greenlet for pyperformance), but just running a couple of individual 
files, I got this:

Mean +- std dev: [nbody_main] 208 ms +- 2 ms -> [nbody_specialized] 180 ms +- 2 
ms: 1.16x faster
Benchmark hidden because not significant (1): pidigits
Mean +- std dev: [chaos_main] 127 ms +- 2 ms -> [chaos_specialized] 120 ms +- 1 
ms: 1.06x faster
Mean +- std dev: [spectral_norm_main] 190 ms +- 10 ms -> 
[spectral_norm_specialized] 175 ms +- 1 ms: 1.09x faster
Mean +- std dev: [raytrace_main] 588 ms +- 48 ms -> [raytrace_specialized] 540 
ms +- 4 ms: 1.09x faster

Hopefully those are accurate.

--
components: Interpreter Core
messages: 403189
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Specialize BINARY_MULTIPLY
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-04 Thread Ian Fisher


Ian Fisher  added the comment:

Unfortunately fixing this will have to be considered a backwards-incompatible 
change, since Python doesn't allow naive and aware datetime objects to be 
compared, so if sqlite3 starts returning aware datetimes, existing code might 
break.

Alternatively, perhaps this could be fixed in conjunction with changing 
sqlite3's API to allow per-database converters and adapters. Then, the old 
global TIMESTAMP converter could be retained for compatibility with existing 
code, and new code could opt-in to a per-database TIMESTAMP converter with the 
correct behavior.

--
title: Default TIMESTAMP converter in sqlite3 ignores time zone -> Default 
TIMESTAMP converter in sqlite3 ignores UTC offset

___
Python tracker 

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



[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-04 Thread Erick


Erick  added the comment:

It also occurs to me that even if `concurrent.futures` adopted an alternative 
Thread class, it would still be preferable to allow for composition in the 
manner that was originally proposed.

--

___
Python tracker 

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



[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-04 Thread Erick


Erick  added the comment:

> What are examples of your some_important_context()? Is it important to call 
> some code before destroying the thread?

To be honest, pulled a context manager example out of thin air to illustrate 
the point. But sure, I want to allocate a resource before the thread runs, and 
release it when the work is done.

> The problem with allowing the user to specify the Thread subclass is that in 
> general using Thread is an implementation detail. ThreadPoolExecutor could be 
> implemented using the low-level _thread module instead. Or in future it can 
> need to create a special Thread subclass, and user-specified Thread subclass 
> can be not compatible with it. 

This is surprising to hear, since I imagine that there are many potential users 
of this library that are evolving from direct wrangling of Thread objects, 
where custom Thread subclasses are commonplace. This was certainly the scenario 
that prompted me to post.

Ultimately it's up to the maintainers what direction the library will go. Are 
there specific plans to adopt an alternative implementation that is orthogonal 
to `threading.Thread`? Or are there reasons to think that it is likely? I would 
submit that maintaining smooth interoperability between this library and the 
`threading` library would be a welcome constraint, absent specific drivers to 
the contrary.

--

___
Python tracker 

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



[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-04 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Replacing the timestamp converter with datetime.datetime.fromisoformat sounds 
good to me.

--

___
Python tracker 

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



[issue45358] Bogus cookie generated after invalid cookie attribute is input

2021-10-04 Thread greob


Change by greob :


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

___
Python tracker 

___
___
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 

___
___
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 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-10-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution: wont fix -> fixed

___
Python tracker 

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



[issue45366] dataclass init=False field with default works but default_factory does not

2021-10-04 Thread simple_coder878


simple_coder878  added the comment:

Also wanted to add that I did try another variation of the first example where 
I set the default_factory field's init value to False and I got the same error.

from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
m: str = field(default='hi')
k: list = field(init=False, default_factory=list)

def test(self):
print(f'm is {self.m} ')
print(f'k is {self.k}')

if __name__ == '__main__':
myobject = TestObject()
myobject.test()

Also produces 

Traceback (most recent call last):
  File "H:\unit_test\tests_dataclass.py", line 81, in 
myobject.test()
  File "H:\unit_test\tests_dataclass.py", line 76, in test
print(f'k is {self.k}')
AttributeError: 'TestObject' object has no attribute 'k'
m is hi

--

___
Python tracker 

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



[issue45366] dataclass init=False field with default works but default_factory does not

2021-10-04 Thread simple_coder878


New submission from simple_coder878 :

Simple example
from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
m: str = field(default='hi')
k: list = field(default_factory=list)

def test(self):
print(f'm is {self.m} ')
print(f'k is {self.k}')

if __name__ == '__main__':
myobject = TestObject()
myobject.test()


Produces:

Traceback (most recent call last):
  File "H:\unit_test\tests_dataclass.py", line 81, in 
myobject.test()
  File "H:\unit_test\tests_dataclass.py", line 76, in test
print(f'k is {self.k}')
AttributeError: 'TestObject' object has no attribute 'k'
m is hi 

So m is initialized to hi but k just disappears

But wait there's more!

If i do 

from dataclasses import dataclass, field

@dataclass(init=False)
class TestObject(object):
m: str = field(default='hi')
k: list = field(default_factory=list)

def test(self):
print(f'm is {self.m} ')
print(f'k is {self.k}')


@dataclass
class InheritedTestObject(TestObject):

def __post_init__(self):
super().__init__()
print(f'Inherited m is {self.m} ')
print(f'Inherited k is {self.k}')
print(f'Inherited g is {self.k}')


if __name__ == '__main__':
myobject = InheritedTestObject()
myobject.test()

It produces:

Inherited m is hi 
Inherited k is []
Inherited g is []
m is hi 
k is []

Process finished with exit code 0

NO ERRORS!

It seems like a bug to me, but what is the expected behavior in this case? I 
would expect the first case to not error out and should have an empty list.

I've only tested this on Python 3.9 so far.

--
components: ctypes
messages: 403182
nosy: simple_coder878
priority: normal
severity: normal
status: open
title: dataclass init=False field with default works but default_factory does 
not
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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-04 Thread wim glenn


Change by wim glenn :


--
nosy: +wim.glenn

___
Python tracker 

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



[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-04 Thread Isuru Fernando


Change by Isuru Fernando :


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

___
Python tracker 

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



[issue45365] concurrent.futures.Future should be suitable for use outside of executors

2021-10-04 Thread Xavier Morel


New submission from Xavier Morel :

concurrent.futures.Future currently has the note:

> Future instances are created by Executor.submit() and should not be created 
> directly except for testing.

That seems like a shame as futures are useful concurrency construct and having 
to rebuild them "by hand" seems like a waste.

What are the issues which prevent safely using futures outside of executors, 
and is there a way they could be fixed / lifted?

--
components: Library (Lib)
messages: 403181
nosy: xmorel
priority: normal
severity: normal
status: open
title: concurrent.futures.Future should be suitable for use outside of executors
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



[issue45246] the sorted() documentation should refer to operator

2021-10-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset 2e4d66d2e71d36de394e0e7a4e60ed7b6a539933 by Pablo Galindo (Ɓukasz 
Langa) in branch '3.10':
[3.10] bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) 
(GH-28502)
https://github.com/python/cpython/commit/2e4d66d2e71d36de394e0e7a4e60ed7b6a539933


--
nosy: +pablogsal

___
Python tracker 

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



[issue45121] Calling super().__init__ in subclasses of typing.Protocol raises RecursionError

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset db762a9b21a8af6f2ee94a6e49144dd1a1a62333 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45121: Fix RecursionError when calling Protocol.__init__ from a subclass' 
__init__ (GH-28206) (GH-28232)
https://github.com/python/cpython/commit/db762a9b21a8af6f2ee94a6e49144dd1a1a62333


--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7128864885340e0d75ddfe32887257e245d9c1f7 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-4356: Mention the new key arguments for the bisect module APIs in the 3.10 
What's new (GH-28339) (GH-28340)
https://github.com/python/cpython/commit/7128864885340e0d75ddfe32887257e245d9c1f7


--

___
Python tracker 

___
___
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-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e0b61b28641bdd20cfeff6d9878f1318b711ca19 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/e0b61b28641bdd20cfeff6d9878f1318b711ca19


--
nosy: +pablogsal

___
Python tracker 

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



[issue23864] doc: issubclass without registration only works for "one-trick pony" collections ABCs.

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 9d8a64a7ccebb288094d4e9da66f30d2ada9a973 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the 
collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpython/commit/9d8a64a7ccebb288094d4e9da66f30d2ada9a973


--
nosy: +pablogsal

___
Python tracker 

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



[issue44964] Semantics of PyCode_Addr2Line() changed

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 490a7427dce1cba55a9fbdbccd092e4c8ffae05f by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-44964: Correct the note about the f_lasti field (GH-28208) (GH-28276)
https://github.com/python/cpython/commit/490a7427dce1cba55a9fbdbccd092e4c8ffae05f


--

___
Python tracker 

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



[issue45067] Failed to build _curses on CentOS 7

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset dfccba47339722ff082a05a190593be9e443cb0e by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45067 - Verify the version of ncurses for extended color support feature 
usage. (GH-28260)
https://github.com/python/cpython/commit/dfccba47339722ff082a05a190593be9e443cb0e


--
nosy: +pablogsal

___
Python tracker 

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



[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2c47b8080b030ad9cdae96a02fa1e533806eb22a by Pablo Galindo (Pablo 
Galindo Salgado) in branch '3.10':
bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28707)
https://github.com/python/cpython/commit/2c47b8080b030ad9cdae96a02fa1e533806eb22a


--

___
Python tracker 

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



[issue38623] Python documentation should mention how to find site-packages

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cdfbe581bae1b33d4eb135597cd27b0f3782e97e by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28536)
https://github.com/python/cpython/commit/cdfbe581bae1b33d4eb135597cd27b0f3782e97e


--
nosy: +pablogsal

___
Python tracker 

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



[issue45277] typo in codecs documentation

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0b568530ecb6ccc696771acf8018ec6fff1a0a5f by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/0b568530ecb6ccc696771acf8018ec6fff1a0a5f


--
nosy: +pablogsal

___
Python tracker 

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



[issue45346] Some "truthy" crept in

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 49fac92173d2c6cc3bd42a2355824e13272a3a7d by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45346: Keep docs consistent regarding true and false values (GH-28697) 
(GH-28698)
https://github.com/python/cpython/commit/49fac92173d2c6cc3bd42a2355824e13272a3a7d


--
nosy: +pablogsal

___
Python tracker 

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



[issue45198] __set_name__ documentation not clear about its usage with non-descriptor classes

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset aac54ef2b30eb27f6756bbf0cdb8be2e64f2cce0 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45198: __set_name__ documentation not clear about its usage with 
non-descriptor classes (GH-28439)
https://github.com/python/cpython/commit/aac54ef2b30eb27f6756bbf0cdb8be2e64f2cce0


--
nosy: +pablogsal

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e1eb03d15fa543ea7e3275b213fdb2c649b5968e by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28505)
https://github.com/python/cpython/commit/e1eb03d15fa543ea7e3275b213fdb2c649b5968e


--
nosy: +pablogsal

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6fc66d6b9d39fa7a5a8692062d54b5a6a1aa0283 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45089: Improve sqlite3 trace callback docs (GH-28238) (GH-28371)
https://github.com/python/cpython/commit/6fc66d6b9d39fa7a5a8692062d54b5a6a1aa0283


--
nosy: +pablogsal

___
Python tracker 

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



[issue43914] Highlight invalid ranges in SyntaxErrors

2021-10-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset 0eb57c3be47e45b10124428ab45827467cd2d58e by Pablo Galindo (Ɓukasz 
Langa) in branch '3.10':
[3.10] bpo-43914: What's New 3.10: add new SyntaxError attributes (GH-28558) 
(GH-28562)
https://github.com/python/cpython/commit/0eb57c3be47e45b10124428ab45827467cd2d58e

New changeset 3397e3192ccc95ff7076f735930d2f4c60fbc278 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator 
expression in function calls (GH-28576)
https://github.com/python/cpython/commit/3397e3192ccc95ff7076f735930d2f4c60fbc278


--

___
Python tracker 

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



[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bc4c705869d4a24fc137a81df913869aa51d60d2 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45310: Fix parrallel shared memory tests (GH-28661)
https://github.com/python/cpython/commit/bc4c705869d4a24fc137a81df913869aa51d60d2


--
nosy: +pablogsal

___
Python tracker 

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



[issue45217] ConfigParser does not accept "No value" reversely to the doc

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c4e9ef1f1d3bb7aca09f3ac6691a78d1341d7fcb by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45217: adds note that `allow_no_value` in `configparser` is optional 
(GH-28396) (GH-28418)
https://github.com/python/cpython/commit/c4e9ef1f1d3bb7aca09f3ac6691a78d1341d7fcb


--
nosy: +pablogsal

___
Python tracker 

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



[issue45118] regrtest no longer lists "re-run tests" in the second summary

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6ae97bbf4e6540a8287c47d098cfe703260b5fa2 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45118: Fix regrtest second summary for re-run tests (GH-28183) (GH-28214)
https://github.com/python/cpython/commit/6ae97bbf4e6540a8287c47d098cfe703260b5fa2


--
nosy: +pablogsal

___
Python tracker 

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



[issue41203] Replace references to OS X in documentation with macOS

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset db3ac483271c1c21432dea97de8ae5df5b9d by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)
https://github.com/python/cpython/commit/db3ac483271c1c21432dea97de8ae5df5b9d


--
nosy: +pablogsal

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 1e2058214fffcb3919e0e127145106ade40a0420 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45249: Ensure the traceback module prints correctly syntax errors with 
ranges (GH-28575)
https://github.com/python/cpython/commit/1e2058214fffcb3919e0e127145106ade40a0420


--

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e0b61b28641bdd20cfeff6d9878f1318b711ca19 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in 
shutil.copyfile() (GH-28421) (GH-28508)
https://github.com/python/cpython/commit/e0b61b28641bdd20cfeff6d9878f1318b711ca19


--

___
Python tracker 

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



[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 01be51833db23414b5dc766f9c92953d838d82c3 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-44860: Update test_sysconfig for posix_user platlib (GH-28235) (GH-28251)
https://github.com/python/cpython/commit/01be51833db23414b5dc766f9c92953d838d82c3


--

___
Python tracker 

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



[issue45307] Removal of _PyImport_FindExtensionObject() in 3.10 limits custom extension module loaders

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2ca4ab8031107f9e474e2ce26561ab9ad51faf9c by Pablo Galindo (Serhiy 
Storchaka) in branch '3.10':
[3.10] bpo-45307: Restore private C API function 
_PyImport_FindExtensionObject() (GH-28594)
https://github.com/python/cpython/commit/2ca4ab8031107f9e474e2ce26561ab9ad51faf9c


--

___
Python tracker 

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



[issue30951] Documentation error in inspect module

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7d652c1b7a56524fec42f65d9be28c17888075ab by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28543)
https://github.com/python/cpython/commit/7d652c1b7a56524fec42f65d9be28c17888075ab


--
nosy: +pablogsal

___
Python tracker 

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



[issue45291] Some instructions in the "Using Python on Unix platforms" document do no work on CentOS 7

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 63c4d42e6ea68104561c853b065c004b200eba68 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45291: Explicitly set --libdir=lib when configure OpenSSL (GH-28566) 
(GH-28616)
https://github.com/python/cpython/commit/63c4d42e6ea68104561c853b065c004b200eba68


--
nosy: +pablogsal

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 78184fa6b0e6129203673e425718e08f5edb6e2e by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-43760: Document PyThreadState.use_tracing removal (GH-28527) (GH-28529)
https://github.com/python/cpython/commit/78184fa6b0e6129203673e425718e08f5edb6e2e


--

___
Python tracker 

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



[issue45128] test_multiprocessing_fork fails if run sequentially after test_genericalias and test_logging

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 76611038bc3d2aa643dce45448f5c7044dd4fd06 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45128: fixes `test_multiprocessing_fork` mysterious crash (GH-28387)
https://github.com/python/cpython/commit/76611038bc3d2aa643dce45448f5c7044dd4fd06


--

___
Python tracker 

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



[issue45341] Update "Python Package Index" in Docs

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 18bf0c10ec7b98e6e1514dc08e5bb7228840316e by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45341: Replace 'Packaging' with 'Package' in "Python P... Index" (GH-28687)
https://github.com/python/cpython/commit/18bf0c10ec7b98e6e1514dc08e5bb7228840316e


--
nosy: +pablogsal

___
Python tracker 

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



[issue45024] Cannot extend collections ABCs with protocol

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 9d8a64a7ccebb288094d4e9da66f30d2ada9a973 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45024 and bpo-23864: Document how interface testing works with the 
collections ABCs (GH-28218) (GH-28266)
https://github.com/python/cpython/commit/9d8a64a7ccebb288094d4e9da66f30d2ada9a973


--
nosy: +pablogsal

___
Python tracker 

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



[issue44640] Fix punctuation in isinstance() error message

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 39c4fe5e2b2ae5ac45c380b0a83e86bac3d7129c by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-44640: Improve punctuation consistency in isinstance/issubclass error 
messages (GH-27144) (GH-28436)
https://github.com/python/cpython/commit/39c4fe5e2b2ae5ac45c380b0a83e86bac3d7129c


--

___
Python tracker 

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



[issue42038] Tracemalloc's format() doc contradictory

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 84d56ec4bc0cb44629ba898a30eece48546828d2 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-42038: fix description of returned list of lines (GH-27529) (GH-28428)
https://github.com/python/cpython/commit/84d56ec4bc0cb44629ba898a30eece48546828d2


--
nosy: +pablogsal

___
Python tracker 

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



[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f025ea23210173b42303360aca05132e4ffdfed3 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-30637: Improve the docs of ast.parse regarding differences with compile() 
(GH-28459)
https://github.com/python/cpython/commit/f025ea23210173b42303360aca05132e4ffdfed3


--

___
Python tracker 

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



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform 
dependent (GH-28264) (GH-28277)
https://github.com/python/cpython/commit/b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f


--
nosy: +pablogsal

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7f2d049cce6dc749a589424d4fb62ffca0b85b32 by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
https://github.com/python/cpython/commit/7f2d049cce6dc749a589424d4fb62ffca0b85b32

New changeset d08e4a8c55ae3bd06c2e871265911ee88429b6bb by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45193: News for IDLE PR_28343 (GH-28348)
https://github.com/python/cpython/commit/d08e4a8c55ae3bd06c2e871265911ee88429b6bb


--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-04 Thread Eryk Sun


Eryk Sun  added the comment:

> This will be the change to make "special" filenames only be 
> special when used on their own, and not as part of a path

For some reason, Windows 11 still reserves case-insensitive "nul" in qualified 
paths, but none of the other DOS device names. Thankfully it's just "nul", and 
not "nul.txt", since they changed it to never reserve a name with an extension. 
So "./nul" -> "\\.\nul", but "./nul.txt" resolve to the filename in the current 
directory.

For cases such as "./con" vs "con", this is another example in favor of 
changing ntpath.normpath() and pathlib.Path to preserve an initial leading dot 
component. Other cases include alternate data streams on single-letter 
filenames (e.g. accessing "C:stream" as "./C:stream") and executable paths that 
should explicitly refer to the current directory (e.g. "./spam.exe").

--
nosy: +eryksun

___
Python tracker 

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



[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You can call __enter__ in the initializer. Seems there is no easy way to call 
__exit__ at shutting down the thread, perhaps something like per-thread atexit 
could help. As an example, you can save the context manager in thread locals 
and manually repeatedly submit a function that calls __exit__ and blocks the 
thread on some Barrier before calling ThreadPoolExecutor.shutdown(). It is 
complicated, so we may add some helpers to support context managers.

What are examples of your some_important_context()? Is it important to call 
some code before destroying the thread?

The problem with allowing the user to specify the Thread subclass is that in 
general using Thread is an implementation detail. ThreadPoolExecutor could be 
implemented using the low-level _thread module instead. Or in future it can 
need to create a special Thread subclass, and user-specified Thread subclass 
can be not compatible with it. It is safer to limit ways in which the user can 
affect execution. The initializer parameter was added to address cases similar 
to your.

Note also that ThreadPoolExecutor and ProcessPoolExecutor have almost identical 
interface. If we add some feature in ThreadPoolExecutor we will have a pressure 
to add the same feature in ProcessPoolExecutor to solve similar problems.

--

___
Python tracker 

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



[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-04 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm not against additional tutorial for typing. But the standard library manual 
is supposed to be a complete reference. There is enough variation between 
different generic types (e.g. are the parameters covariant?) that ought to be 
documented. I don't want to create a "typing ghetto" where all typing 
information is collected as if it wasn't really part of the language.

--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-10-04 Thread Steve Dower


Steve Dower  added the comment:

This will be the change to make "special" filenames only be special when used 
on their own, and not as part of a path (e.g. you shouldn't have any trouble 
with "aux" or "com" filenames either). I had expected it to roll out sooner, 
but I guess Windows 11 is when it arrives.

We'll have to go through our regression tests that rely on this behaviour. 
Happily, I don't think we merged any major "fixes" for the old behaviour (I've 
been discouraging them, but haven't been able to say that the fix was coming :( 
).

--

___
Python tracker 

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



[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-04 Thread Erick


Erick  added the comment:

> Can you apply some custom logic by specifying the initializer?

Not sure that I follow; how would I use a context manager with the initializer?

Of course this is just one example. In the `threading` docs, the second 
sentence in the description of the `Thread.run` method 
(https://docs.python.org/3/library/threading.html#threading.Thread.run) is:

> You may override this method in a subclass. 

But one cannot use a subclass of `Thread` with `ThreadPoolExecutor` without the 
gymnastics indicated earlier. That's the real issue here, I think.

--

___
Python tracker 

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



[issue45364] Add more documentation for ModuleSpec.loader_state.

2021-10-04 Thread Eric Snow


New submission from Eric Snow :

Currently ModuleSpec.loader_state is documented briefly once in the importlib 
docs. [1]  It should have more explanation, e.g. about when/why it should be 
used.  It should also be mentioned meaningfully in the MetapathFinder [2] and 
Loader [3] docs, as well as in the language reference [4].

Also see https://github.com/python/cpython/pull/28633#discussion_r720865971.

Note that ModuleSpec (and loader_state) were added in 3.4, so this 
documentation-only change would be helpful all the way back.  At the least we 
should update the docs back to 3.9, the current bug-fix release.


[1] 
https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.loader_state
[2] 
https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder
[3] https://docs.python.org/3/library/importlib.html#importlib.abc.Loader
[4] https://docs.python.org/3/reference/import.html#loaders or 
https://docs.python.org/3/reference/import.html#module-spec

--
assignee: docs@python
components: Documentation
messages: 403141
nosy: barry, brett.cannon, docs@python, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add more documentation for ModuleSpec.loader_state.
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-10-04 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +27070
pull_request: https://github.com/python/cpython/pull/28723

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Mark Shannon


Mark Shannon  added the comment:

127 and 48 aren't instructions.
>>> opcode.stack_effect(48)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid opcode or oparg

So the output from dis seems correct.


>If not, how would it deal with co_code being modified?

The co_code attribute is immutable and read only. It cannot be modified.

Specialized instructions and super instructions are private to the interpreter.
If they are visible to Python code (not counting ctypes hacks), then that is a 
bug.

--

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Ken Jin


Ken Jin  added the comment:

> Will this change be reflected in co_code?
No. As per PEP 659: 

"Once any instruction in a code object has executed a few times, that code 
object will be "quickened" by allocating a new array for the bytecode that can 
be modified at runtime, and is not constrained as the code.co_code object is."

Example:

x = lambda a: len(a)
print(x.__code__.co_code)

#quickened
for _ in range(10):
 x('')

print(x.__code__.co_code)

There should be no change.

> If not, how would it deal with co_code being modified?
Disclaimer: I am not a contributor to such libraries, so my knowledge in this 
area is limited.

co_code is readonly and the bytes object it points is also immutable. So I'd 
imagine that they'd have to create a brand new code object, in which case it 
shouldn't matter. But if there is some way to modify co_code in-place using 
ctypes: I don't know. Sorry! The best way to find out is to test those 
libraries with 3.11 and see if such functionality breaks, then file a bug 
report here please. Thank you.

--

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1670d590fa6b817e0d3f091ea12aee9ae744875a by Serhiy Storchaka in 
branch '3.10':
[3.10] bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720). (GH-28721)
https://github.com/python/cpython/commit/1670d590fa6b817e0d3f091ea12aee9ae744875a


--

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


Martmists  added the comment:

> Specialized instructions are a hidden implementation detail, and instead the 
> normal generic instruction will appear.

Will this change be reflected in co_code? If yes, then I'm aware of cases where 
this may be used by bytecode modification libraries. If not, how would it deal 
with co_code being modified?

> Sorry, I don't quite understand what you mean here. The superinstructions do 
> not use different bytecode format: ie they take only one oparg.
I see, so it'll just replace the first of the two ops to streamline the process 
rather than replacing the second one with a dummy instruction

--

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Ken Jin


Ken Jin  added the comment:

Thanks Martmists for the bug report, I'll try to address some of your concerns:

> The reason for this seems to be the lack of definition in `opcode.py` aside 
> from being mentioned in _specialized_instructions.

If I understood Mark's intentions in PEP 659 correctly, when you call dis.dis 
on any normally generated code object, specialized instructions will never show 
up. Specialized instructions are a hidden implementation detail, and instead 
the normal generic instruction will appear. So there isn't really a need to 
support it (any Python hand-crafted specialized instruction will likely 
segfault anyways).

> Additionally, it seems dis._unpack_opargs is not yet prepared to support 
> opcodes like LOAD_FAST__LOAD_FAST which take two arguments

Sorry, I don't quite understand what you mean here. The superinstructions do 
not use different bytecode format: ie they take only one oparg. 
LOAD_FAST__LOAD_FAST works by reading the *next* instruction's oparg. So:

LOAD_FAST   0
LOAD_FAST   1
LOAD_CONST  0

Becomes:

LOAD_FAST__LOAD_FAST 0
LOAD_FAST1
LOAD_CONST   0

LOAD_FAST__LOAD_FAST will increment program counter inline [1] to read the 
oparg of the instruction after it without going through eval loop, then on 
dispatch it will effectively "skip" the next instruction and go straight to 
LOAD_CONST. The speedup comes from skipping eval-loop and dispatch overhead of 
one instruction. The bytecode format is unchanged.

[1] 
https://github.com/python/cpython/blob/07cf10bafc8f6e1fcc82c10d97d3452325fc7c04/Python/ceval.c#L1755

I hope this helps you.

--

___
Python tracker 

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



[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-04 Thread Ken Jin


Ken Jin  added the comment:

> I think those should go with the individual types as well

The list[] and dict[] stdtypes are in a different document from 
collections.abc.*. While this helps logical separation, I feel like it'd be 
tougher searching for type information compared to our current 
aggregate-everything-in-typing approach.

Where type hints for types should belong has been a hot subject for some time. 
This was discussed at the typing summit, and also by the docs WG.

- Docs WG: https://github.com/python/docs-community/issues/8
- Downstream typing possible tutorial: 
https://github.com/python/typing/issues/891
- Downstream typing's docs: https://github.com/python/typing/tree/master/docs

The general consensus it seems is to separate complex information from the 
CPython docs. I like this approach because type hints have zero meaning to 
CPython, so placing them in docs meant for runtime behavior feels strange.

OTOH, external docs won't be able to keep up with the subtleties of multiple 
different versions of typing in CPython. So *some* information should be kept 
in CPython docs.

I think for now, a link in collections.abc pointing to typing would suffice. In 
the future when Python 3.9 becomes an "old" version and PEP 585 notation is 
commonplace, we should copy them over like Guido suggested (and if Raymond is 
OK with collections.abc docs including that sort of information). Guido or 
Raymond may have other plans though ;-).

--

___
Python tracker 

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



[issue45363] Use instruction offsets in co_lnotab

2021-10-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-04 Thread STINNER Victor


STINNER Victor  added the comment:

Maybe unit tests can be written on python-config.sh and python-config.py 
commands.

--
nosy: +vstinner

___
Python tracker 

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



[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-04 Thread xloem


xloem <0xl...@gmail.com> added the comment:

Thanks for your time.

Just a note that this is likely a docs issue if nothing else.  I may never have 
opened this issue if the missing functions were listed in the inspect module 
documentation.

--

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +Mark.Shannon, kj

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset b5499784ec0aa24c8f0d91f2317cc53b7743ada9 by Serhiy Storchaka in 
branch '3.10':
[3.10] bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of 
the code unit (GH-28711). (GH-28718)
https://github.com/python/cpython/commit/b5499784ec0aa24c8f0d91f2317cc53b7743ada9


--

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +27068
pull_request: https://github.com/python/cpython/pull/28721

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 252b7bcb236dc261f3af1275bc90f9a303d9648f by Serhiy Storchaka in 
branch 'main':
bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720)
https://github.com/python/cpython/commit/252b7bcb236dc261f3af1275bc90f9a303d9648f


--

___
Python tracker 

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



[issue45363] Use instruction offsets in co_lnotab

2021-10-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It was a part of the original patch for issue27129.

As well as in jumping instructions we can use instruction offsets instead of 
bytes offset in co_lnotab. It increases the range of offsets which can be 
encoded with a single byte, and therefore reduce the size of co_lnotab and its 
decoding time. It will allow to simplify the code if we use instruction offsets 
everywhere.

--
components: Interpreter Core
messages: 403130
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use instruction offsets in co_lnotab
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue28206] signal.Signals not documented

2021-10-04 Thread Julien Palard


Julien Palard  added the comment:


New changeset 9be930f9b169fb3d92693670ae069df902709b83 by Bibo-Joshi in branch 
'main':
bpo-28206: Document signals Handlers, Sigmasks and Signals enums (GH-28628)
https://github.com/python/cpython/commit/9be930f9b169fb3d92693670ae069df902709b83


--
nosy: +mdk

___
Python tracker 

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



[issue45360] xml.etree.ElementTree: add feature in write to create directories also like mkdir -p

2021-10-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

open() does not create parent directories either. And no any function in the 
stdlib which creates a file does it. It would be rather error-prone if they do, 
because you can create a file at wrong place.

So just create a directory if you need to, and let the code to raise an 
exception to report your errors.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


Martmists  added the comment:

Another thing I found to be quite odd is JUMP_ABSOLUTE_QUICK, which is set as 
40, but as it's derived from JUMP_ABSOLUTE it still requires an argument. This 
makes HAVE_ARGUMENT useless as there's an op that doesn't follow the convention.

--

___
Python tracker 

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



[issue45362] dis does not work with the new optimized ops

2021-10-04 Thread Martmists


New submission from Martmists :

Python 3.11.0a0 (heads/main:e6d1aa1, Oct  4 2021, 10:33:36) [GCC 11.1.0] on 
linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dis
>>> c = bytes([127, 1, 0, 2])  # LOAD_FAST__LOAD_FAST (1, 2)
>>> dis.dis(c)
  0 <127>1
  2 <0>
>>> c = bytes([48, 0, 161, 0])  # LOAD_GLOBAL_BUILTIN (0) CALL_FUNCTION (0)
>>> dis.dis(c)
  0 <48>
  2 CALL_METHOD  0

---

The reason for this seems to be the lack of definition in `opcode.py` aside 
from being mentioned in _specialized_instructions. Additionally, it seems 
dis._unpack_opargs is not yet prepared to support opcodes like 
LOAD_FAST__LOAD_FAST which take two arguments.

While I don't expect this to be a first priority in this big change, it's 
important to not forget it.

--
components: Library (Lib)
messages: 403126
nosy: martmists
priority: normal
severity: normal
status: open
title: dis does not work with the new optimized ops
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-04 Thread Florian Obersteiner


Change by Florian Obersteiner :


--
nosy: +MrFuppes

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +27067
pull_request: https://github.com/python/cpython/pull/28720

___
Python tracker 

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



[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)

2021-10-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Since that time, I wrote a lot of time

I wrote a lot of *code* :-)

--

___
Python tracker 

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



[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)

2021-10-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Presumably if we change these two to be consistent, this issue will go away. 
> I am not entirely sure if anyone is relying on a particular rounding behavior 
> for one or both of these, and I'm not sure which one is the right one to 
> harmonize on.

We already changed datetime rounding once in Python 3.4.4, see bpo-23517.

commit 511491ade0bb77febb176bc75f049797f0c71ed0
Author: Victor Stinner 
Date:   Fri Sep 18 14:42:05 2015 +0200

Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties 
going
to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards
zero (ROUND_DOWN). It's important that these methods use the same rounding
mode than datetime.timedelta to keep the property:

   (datetime(1970,1,1) + timedelta(seconds=t)) == 
datetime.utcfromtimestamp(t)

It also the rounding mode used by round(float) for example.

Add more unit tests on the rounding mode in test_datetime.

Since that time, I wrote a lot of time in Python/pytime.c to handle various 
rounding methods, and handle various time formats. See 
Include/cpython/pytime.h, I added documentation at the top recently ;-)

https://github.com/python/cpython/blob/main/Include/cpython/pytime.h

The _datetime module doesn't use _PyTime_t type but time_t to support the 
time_t full range (larger than _PyTime_t with 64-bit time_t).

I wrote an article about rounding timestamps:
https://vstinner.github.io/pytime.html

It seems like not all issues have been fixed yet :-)

--

___
Python tracker 

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



[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +27066
pull_request: https://github.com/python/cpython/pull/28718

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue41197] Async magic methods in contextlib.closing

2021-10-04 Thread Nathaniel Smith


Change by Nathaniel Smith :


--
resolution:  -> duplicate
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