[issue45012] DirEntry.stat method should release GIL

2021-09-08 Thread uosiu

uosiu  added the comment:

Bardzo proszę :)

This fix is quite important for us. We would like to start using this fix in 
our product. Is there something I could do to backport it to 3.9?

--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

This is a minefield. If anyone has a use case for it, I'd *love* to hear it, 
but to me it seems that proper reinit support will be a lot of work (now and in 
future maintenance) for no gain. You can always create a new connection object.

Consider instead deprecating reinitialization, documenting it as unpredictable 
& removing it in Python 3.13.


Here's another thing to test:
```python
import sqlite3

conn = sqlite3.connect(':memory:')
cursor = conn.execute('CREATE TABLE foo (bar)')

try:
conn.__init__('/bad-file/')
except sqlite3.OperationalError:
pass

cursor.execute('INSERT INTO foo (bar) VALUES (1), (2), (3), (4)')
```

And here's the kind of behavior that should be specified (and tested), and 
might even change to make more sense:
```python
import sqlite3

conn = sqlite3.connect(':memory:')
conn.text_factory=bytes
conn.row_factory = sqlite3.Row
cursor = conn.execute('CREATE TABLE foo (bar)')
cursor.execute('INSERT INTO foo (bar) VALUES ("1"), ("2"), ("3"), ("4")')
cursor.execute('SELECT bar FROM foo')

for row in cursor:
print(row, list(row))
break

conn.__init__(':memory:')
conn.execute('CREATE TABLE foo (bar)')
conn.execute('INSERT INTO foo (bar) VALUES ("a"), ("b"), ("c"), ("d")')

# Currently this uses the old database, old row_factory, but new text_factory"
for row in cursor:
print(row, list(row))
```

We should also do a review of all places `connection` is used from Cursor, 
Statement, etc. to ensure everything continue to work with a different `db`. 
This can be done (and maybe you already did), but I'm also worried how well 
future maintainers can keep reinitialization in mind.

And all this will also need to be done for Cursor.

--

___
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-09-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

It *would* be possible to improve the documentation, though.
Say that it is only meant for debugging, document that exceptions are not 
propagated, and mention enable_callback_tracebacks.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, petr.viktorin
status: closed -> open

___
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-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> It *would* be possible to improve the documentation, though.

+1

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-09-08 Thread miss-islington


miss-islington  added the comment:


New changeset 2fe15dbaad651707fb198c3477b7db77ab89ade0 by Miss Islington (bot) 
in branch '3.10':
bpo-38820: Test with OpenSSL 3.0.0 final (GH-28205)
https://github.com/python/cpython/commit/2fe15dbaad651707fb198c3477b7db77ab89ade0


--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I modified your second example slightly:

```
import sqlite3

conn = sqlite3.connect(":memory:")
conn.text_factory=bytes
conn.row_factory = sqlite3.Row
cursor = conn.execute("CREATE TABLE foo (bar)")
numbers = range(4)
cursor.executemany("INSERT INTO foo (bar) VALUES (?)", ((str(v),) for v in 
numbers))
cursor.execute("SELECT bar FROM foo")

print("first fetch")
for row in cursor.fetchmany(2):
print(type(row[0]))

conn.__init__(":memory:")
conn.execute("CREATE TABLE foo (bar)")
letters = "a", "b", "c", "d"
conn.executemany("INSERT INTO foo (bar) VALUES (?)", ((v,) for v in letters))

# Currently this uses the old database, old row_factory, but new text_factory"
print("second fetch")
for row in cursor.fetchall():
print(type(row[0]))
```

Here's the output:
first fetch


second fetch



--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Note: I ran that with PR 28227.


OTOH: I do agree that there's a lot of pitfalls here, especially in the future. 
In the long run, it is probably best to deprecate reinit, and disable it in 
Python 3.13.

--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Modifying the loops to also print the values:

first fetch
b'0' 
b'1' 
second fetch
2 
3 

--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

FYI, I've expanded the reinit tests and added a deprecation warning to the PR.

--

___
Python tracker 

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



[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 Thread Thomas Fischbacher


New submission from Thomas Fischbacher :

This problem may also be the issue underlying some other dataclasses.asdict() 
bugs:

https://bugs.python.org/issue?%40columns=id%2Cactivity%2Ctitle%2Ccreator%2Cassignee%2Cstatus%2Ctype&%40sort=-activity&%40filter=status&%40action=searchid&ignore=file%3Acontent&%40search_text=dataclasses.asdict&submit=search&status=-1%2C1%2C2%2C3

The documentation of dataclasses.asdict() states:

https://docs.python.org/3/library/dataclasses.html#dataclasses.asdict

===
Converts the dataclass instance to a dict (by using the factory function 
dict_factory). Each dataclass is converted to a dict of its fields, as name: 
value pairs. dataclasses, dicts, lists, and tuples are recursed into. For 
example: (...)
===

Given this documentation, the expectation about behavior is roughly:

def _dataclasses_asdict_equivalent_helper(obj, dict_factory=dict):
  rec = lambda x: (
_dataclasses_asdict_equivalent_helper(x,
  dict_factory=dict_factory))
  if isinstance(obj, (list, tuple)):
return type(obj)(rec(x) for x in obj)
  elif isinstance(obj, dict):
return type(obj)((k, rec(v) for k, v in obj.items())
  # Otherwise, we are looking at a dataclass-instance.
  for field in type(obj).__dataclass_fields__:
val = obj.__getattribute__[field]
if (hasattr(type(obj), '__dataclass_fields__')):
  # ^ approx check for "is this a dataclass instance"?
  # Not 100% correct. For illustration only.
  ret[field] = rec(val)
ret[field] = val
  return ret

def dataclasses_asdict_equivalent(x, dict_factory=dict):
   if not hasattr(type(x), '__dataclass_fields__'):
  raise ValueError(f'Not a dataclass: {x!r}')
   return _dataclasses_asdict_equivalent(x, dict_factory=dict_factory)


In particular, field-values that are neither dict, list, tuple, or 
dataclass-instances are expected to be used identically.

What actually happens however is that .asdict() DOES call __deepcopy__ on field 
values it has no business inspecting:

===
import dataclasses


@dataclasses.dataclass
class Demo:
  field_a: object

class Obj:
   def __init__(self, x):
self._x = x

   def __deepcopy__(self, *args):
 raise ValueError('BOOM!')


###
d1 = Demo(field_a=Obj([1,2,3]))
dd = dataclasses.asdict(d1)

# ...Execution does run into a "BOOM!" ValueError.
===

Apart from this: It would be very useful if dataclasses.asdict() came with a 
recurse={boolish} parameter with which one can turn off recursive translation 
of value-objects.

--
components: Library (Lib)
messages: 401360
nosy: tfish2
priority: normal
severity: normal
status: open
title: dataclasses.asdict() incorrectly calls __deepcopy__() on values.
type: behavior

___
Python tracker 

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



[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

I think a deprecation should be discussed a bit more widely than on bpo, so I 
opened a thread here: 
https://discuss.python.org/t/deprecating-sqlite-object-reinitialization/10503

--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Great, thanks.

--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

As for the effort to fix this:

If we deprecate this, there should be no new users of it in 3.11+.

If we deprecate and also fix this, and we happen to introduce bugs or behavior 
changes, then people that use it now will need to:
1) adapt to the new behavior
2) find a different way to do things (before 3.13)

If we deprecate but keep the buggy behavior it as it is, (1) is not needed. 
Less work for both us and the users.

--

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-08 Thread Ma Lin


Ma Lin  added the comment:

This article briefly introduces the inlining decisions in MSVC. 
https://devblogs.microsoft.com/cppblog/inlining-decisions-in-visual-studio/

--
nosy: +malin

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cb15afcccffc6c42cbfb7456ce8db89cd2f77512 by Victor Stinner in 
branch 'main':
bpo-39573: Py_TYPE becomes a static inline function (GH-28128)
https://github.com/python/cpython/commit/cb15afcccffc6c42cbfb7456ce8db89cd2f77512


--

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> If we deprecate but keep the buggy behavior it as it is, (1) is not needed. 
> Less work for both us and the users.

Indeed.

There's still a ref leak I'd like to take care of, though: if the first audit 
fails, database_obj leaks.

--

___
Python tracker 

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



[issue45132] Remove deprecated __getitem__ methods

2021-09-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d003a5bd2505a7fa04f50504b68ba8fca67349cd by Hugo van Kemenade in 
branch 'main':
bpo-45132 Remove deprecated __getitem__ methods (GH-28225)
https://github.com/python/cpython/commit/d003a5bd2505a7fa04f50504b68ba8fca67349cd


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45132] Remove deprecated __getitem__ methods

2021-09-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your contribution Hugo.

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26651
pull_request: https://github.com/python/cpython/pull/28231

___
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-09-08 Thread Ken Jin


Ken Jin  added the comment:


New changeset c11956a8bddd75f02ccc7b4da7e4d8123e1f3c5f by Yurii Karabas in 
branch 'main':
bpo-45121: Fix RecursionError when calling Protocol.__init__ from a subclass' 
__init__ (GH-28206)
https://github.com/python/cpython/commit/c11956a8bddd75f02ccc7b4da7e4d8123e1f3c5f


--

___
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-09-08 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +26652
pull_request: https://github.com/python/cpython/pull/28232

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

> boost https://bugzilla.redhat.com/show_bug.cgi?id=1896382

Fixed by: 
https://github.com/boostorg/python/commit/500194edb7833d0627ce7a2595fec49d0aae2484

--

___
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-09-08 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +26653
pull_request: https://github.com/python/cpython/pull/28233

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26654
pull_request: https://github.com/python/cpython/pull/28234

___
Python tracker 

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



[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I'll save the cleanup till Python 3.13 dev is started. I've opened a PR for 
fixing the ref leak (should be backported), and a draft PR for deprecating 
Connection and Cursor reinitialisation.

--

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-08 Thread STINNER Victor


New submission from STINNER Victor :

When Python is configured to use 'lib64' for sys.platlibdir, test_sysconfig 
fails:

$ ./configure --with-platlibdir=lib64
$ make
$ ./python -m test -v test_sysconfig 

==
FAIL: test_user_similar (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_sysconfig.py", line 299, in 
test_user_similar
self.assertEqual(user_path, global_path.replace(base, user, 1))
^^^
AssertionError: '/home/vstinner/.local/lib/python3.11/site-packages' != 
'/home/vstinner/.local/lib64/python3.11/site-packages'
- /home/vstinner/.local/lib/python3.11/site-packages
+ /home/vstinner/.local/lib64/python3.11/site-packages
?  ++

--
components: Tests
messages: 401372
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-08 Thread Miro Hrončok

Miro Hrončok  added the comment:

This was introduced in issue44860.

--
nosy: +dstufft, eric.araujo, frenzy, hroncok, lukasz.langa, miss-islington, 
pablogsal, petr.viktorin, uranusjr

___
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-09-08 Thread Miro Hrončok

Miro Hrončok  added the comment:

There seem to be a regression in test_user_similar: 
https://bugs.python.org/issue45136

--

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

> This was introduced in issue44860.

Right. Reverting the commit 608a6292366ebba20f33d93d8b52cbb928429e47 
(bpo-44860) fix the test.

The test should be updated.

--

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a release blocker: it would be *nice* to fix it before 
Python 3.10.0 final ;-)

--
priority: normal -> release blocker

___
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-09-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +26655
pull_request: https://github.com/python/cpython/pull/28235

___
Python tracker 

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



[issue34557] When sending binary file to a Microsoft FTP server over FTP TLS, the SSL unwind method hangs

2021-09-08 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue45097] "The loop argument is deprecated" reported when user code does not use it

2021-09-08 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +26656
pull_request: https://github.com/python/cpython/pull/28236

___
Python tracker 

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



[issue38371] Tkinter: deprecate the split() method

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland
nosy_count: 1.0 -> 2.0
pull_requests: +26657
pull_request: https://github.com/python/cpython/pull/28237

___
Python tracker 

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



[issue45137] Fix for bpo-37788 was not backported to Python3.8

2021-09-08 Thread Victor Vorobev


New submission from Victor Vorobev :

There is a [fix](https://github.com/python/cpython/pull/26103) for 
[bpo-37788](https://bugs.python.org/issue37788), but automatic backport to 3.8 
branch [have 
failed](https://github.com/python/cpython/pull/26103#issuecomment-841460885), 
and it looks like no one have backported it manually.

--
components: Library (Lib)
messages: 401377
nosy: victorvorobev
priority: normal
severity: normal
status: open
title: Fix for bpo-37788 was not backported to Python3.8
type: resource usage
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



[issue45137] Fix for bpo-37788 was not backported to Python3.8

2021-09-08 Thread Victor Vorobev


Change by Victor Vorobev :


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



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

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

I checked again the list of broken projects listed previously.

Fixed:

* Cython: 
https://github.com/cython/cython/commit/d8e93b332fe7d15459433ea74cd29178c03186bd
* immutables: https://github.com/MagicStack/immutables/pull/52
* numpy:

  * 
https://github.com/numpy/numpy/commit/a96b18e3d4d11be31a321999cda4b795ea9eccaa
  * 
https://github.com/numpy/numpy/commit/f1671076c80bd972421751f2d48186ee9ac808aa

* pycurl: 
https://github.com/pycurl/pycurl/commit/e633f9a1ac4df5e249e78c218d5fbbd848219042
* bitarray: https://github.com/ilanschnell/bitarray/pull/109
* mercurial: https://bz.mercurial-scm.org/show_bug.cgi?id=6451
* boost: 
https://github.com/boostorg/python/commit/500194edb7833d0627ce7a2595fec49d0aae2484
* pyside2: https://bugreports.qt.io/browse/PYSIDE-1436
* breezy: https://bugs.launchpad.net/brz/+bug/1904868
* duplicity: 
https://git.launchpad.net/duplicity/commit/duplicity/_librsyncmodule.c?id=bbaae91b5ac6ef7e295968e508522884609fbf84
* gobject-introspection: 
https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/243

Fix proposed:

* pybluez: https://github.com/pybluez/pybluez/pull/410

Broken:

* PyPAM
* pygobject3
* pylibacl 
* rdiff-backup

--

___
Python tracker 

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



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-09-08 Thread Victor Vorobev


Change by Victor Vorobev :


--
nosy: +victorvorobev
nosy_count: 15.0 -> 16.0
pull_requests: +26659
pull_request: https://github.com/python/cpython/pull/28239

___
Python tracker 

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



[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-09-08 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 2396fa6537d79554ac694dbd2b0b30eeb3476c80 by Florin Spătar in 
branch 'main':
bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX 
(GH-27857)
https://github.com/python/cpython/commit/2396fa6537d79554ac694dbd2b0b30eeb3476c80


--

___
Python tracker 

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



[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-09-08 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

We also got this error randomly on an internal s390x Red Hat build server:

==
FAIL: test_stress_delivery_simultaneous (test.test_signal.StressTest)
This test uses simultaneous signal handlers.
--
Traceback (most recent call last):
  File "/usr/lib64/python3.9/test/test_signal.py", line 1245, in 
test_stress_delivery_simultaneous
self.assertEqual(len(sigs), N, "Some signals were lost")
AssertionError: 5936 != 1 : Some signals were lost

--

___
Python tracker 

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



[issue30570] issubclass segfaults on objects with weird __getattr__

2021-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 
3.6, Python 3.7

___
Python tracker 

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



[issue12872] --with-tsc crashes on ppc64

2021-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

I don't see anything like the code of the patch in ceval.c now.

I will close this soon unless given a reason not to.

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue45138] [sqlite3] expand bound values in traced statements if possible

2021-09-08 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

For SQLite 3.14.0 and newer, we're using the v2 trace API. This means that the 
trace callback receives a pointer to the sqlite3_stmt object. We can use the 
sqlite3_stmt pointer to retrieve expanded SQL string.

The following statement...:
cur.executemany("insert into t values(?)", ((v,) for v in range(3)))

...will produce the following traces:
  insert into t values(0)
  insert into t values(1)
  insert into t values(2)

...instead of:
  insert into t values(?)
  insert into t values(?)
  insert into t values(?)

--
assignee: erlendaasland
components: Extension Modules
messages: 401383
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] expand bound values in traced statements if possible
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



[issue45138] [sqlite3] expand bound values in traced statements if possible

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
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-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 99506dcbbe9fb56ceabe55f0a4333e5981b72095 by Ken Jin in branch 
'3.9':
[3.9] bpo-45121: Fix RecursionError when calling Protocol.__init__ from a 
subclass' __init__ (GH-28206) (GH-28233)
https://github.com/python/cpython/commit/99506dcbbe9fb56ceabe55f0a4333e5981b72095


--

___
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-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c081649e6df55203178a44d16bc4c96f9fa2c6a4 by 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/c081649e6df55203178a44d16bc4c96f9fa2c6a4


--

___
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-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Pablo, marking as release blocker. PR GH-28232 is merged to 3.10. It should be 
cherry-picked for 3.10.0 inclusion.

--
nosy: +pablogsal
priority: critical -> release blocker

___
Python tracker 

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



[issue25130] Make tests more PyPy compatible

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 462c1f0403324efc27c11435da12b8d16f5387de by Serhiy Storchaka in 
branch '3.10':
[3.10] bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005) 
(GH-28027)
https://github.com/python/cpython/commit/462c1f0403324efc27c11435da12b8d16f5387de


--
nosy: +lukasz.langa

___
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-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, 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



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

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7538fe34d730fe08cbbecc17606bc0f5f69ff416 by 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/7538fe34d730fe08cbbecc17606bc0f5f69ff416


--

___
Python tracker 

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



[issue41031] Inconsistency in C and python traceback printers

2021-09-08 Thread Irit Katriel


Change by Irit Katriel :


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



[issue45012] DirEntry.stat method should release GIL

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Sadly, we can't backport this to 3.9 as it's only accepting bugfixes and this 
is a performance improvement. 3.10 is out of scope for this too as 3.10.0rc2 
shipped last night.

--

___
Python tracker 

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



[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a5610057615779ca6fc75d9e006d2fae644a94d3 by andrei kulakov in 
branch 'main':
bpo-19113: Remove unused test_errors from ctypes tests (GH-28008)
https://github.com/python/cpython/commit/a5610057615779ca6fc75d9e006d2fae644a94d3


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Change made in Python 3.11: duplicate test removed. Closing.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 2.7, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 Thread Eric V. Smith


Eric V. Smith  added the comment:

The intent was that asdict() returns something that, if mutated, doesn't affect 
the original object tree. I'd sort of like to just deprecate it, it's got a lot 
of corner cases that are poorly handled.

It probably needs the same kind of controls that attrs.asdict() does.

--

___
Python tracker 

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



[issue45097] "The loop argument is deprecated" reported when user code does not use it

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a328a13b70ea0b0bec8b9d1b0067628369cabea9 by Serhiy Storchaka in 
branch '3.9':
[3.9] bpo-45097: Fix deprecation warnings in test_asyncio (GH-28236)
https://github.com/python/cpython/commit/a328a13b70ea0b0bec8b9d1b0067628369cabea9


--

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

At commit cb15afcccffc6c42cbfb7456ce8db89cd2f77512, I am able to rename 
PyObject members (to make sure that the structure is not accessed directly), I 
only had to modify header files:

* Py_REFCNT(), Py_SET_REFCNT()
* Py_INCREF(), Py_DECREF()
* Py_TYPE(), Py_SET_TYPE()
* Py_IS_TYPE()

And just two more C files which corner cases:

* 1 line in Python/specialize.c
* 1 line in Modules/_testcapimodule.c: check_pyobject_forbidden_bytes_is_freed()

--

I did the same with PyVarObject, rename the ob_size member. I had to modify 
header files:

* Py_SIZE(), Py_SET_SIZE()

But I had to modify the following function of the array module:

static int
array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
{
...
if ((flags & PyBUF_ND)==PyBUF_ND) {
view->shape = &((PyVarObject*)self)->ob_size;
}
...
return 0;
}

I'm not sure how to patch this function.

--

This experience doesn't check usage of sizeof(PyObject) and sizeof(PyVarObject) 
which would break if these structures become opaque. sizeof() issues are listed 
in previous comments.

--

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

Oh and obviously, it's not possible possible to define structures which 
*include* PyObject or PyVarObject if PyObject and PyVarObject become opaque. 
Example:

typedef struct {
PyObject ob_base;
Py_ssize_t ob_size; /* Number of items in variable part */
} PyVarObject;

This C code requires the PyObject structure to be fully defined (not being 
opaque).

A new C API and ABI where structures *don't* include PyObject or PyVarObject 
should be designed to allocate their members "before" the PyObject* pointer 
value. Something like the current PyGC_Head structure which is excluded from 
PyObject and stored *before* the "PyObject*" pointer.

Simplified code which allocates memory for an object implementin the GC 
protocol:

static PyObject *
_PyObject_GC_Malloc(size_t basicsize)
{
...
size_t size = sizeof(PyGC_Head) + basicsize;
...
PyGC_Head *g = (PyGC_Head *)PyObject_Malloc(size);
...
PyObject *op = (PyObject *)(g + 1);
return op;
}

--

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d41abe8970453716dbc6a3a898ac8fb01cbf6c6f by Łukasz Langa in 
branch '3.10':
[3.10] bpo-45056: Remove trailing unused constants from co_consts (GH-28109) 
(GH-28125)
https://github.com/python/cpython/commit/d41abe8970453716dbc6a3a898ac8fb01cbf6c6f


--

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

It goes to 3.10.1 then. Fixed!

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



[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

I changed the issue title to restrict its scope: "[C API] Avoid accessing 
PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), 
disallow Py_TYPE(obj)=type".

Making PyObject and PyVarObject structures opaque is a broader topic which 
should be splited into sub-issues.

"Py_TYPE(obj)=type;" is now disallowed. I consider that the work of this issue 
is now completed and I close the issue.

Thanks everyone who help to fix these tedious issues!

You can continue to use this issue if you need my help to adapt your C 
extensions to Py_SET_TYPE()/Py_SET_SIZE().

See also the upgrade_pythoncapi.py script of the pythoncapi_compat project 
which helps to port your C extensions without losing support for old Python 
versions:
https://github.com/pythoncapi/pythoncapi_compat

See also the Py_TYPE() change announcement on the capi-sig list:
https://mail.python.org/archives/list/capi-...@python.org/thread/WGRLTHTHC32DQTACPPX36TPR2GLJAFRB/

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [C API] Make PyObject an opaque structure in the limited C API -> [C 
API] Avoid accessing PyObject and PyVarObject members directly: add 
Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type
versions: +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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 6b996d61c96222d959d043b9424e8125c0efbb27 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-45083: Include the exception class qualname when formatting an 
exception (GH-28119) (GH-28134)
https://github.com/python/cpython/commit/6b996d61c96222d959d043b9424e8125c0efbb27


--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Irit! ✨ 🍰 ✨

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



[issue44219] Opening a file holds the GIL when it calls "isatty()"

2021-09-08 Thread Vincent Michel


Vincent Michel  added the comment:

Here's a possible patch that fixes the 3 unprotected calls to `isatty` 
mentioned above. It successfully passes the test suite. I can submit a PR with 
this patch if necessary.

--
keywords: +patch
Added file: https://bugs.python.org/file50270/bpo-44219.patch

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset 6b996d61c96222d959d043b9424e8125c0efbb27 by Miss Islington 
> (bot) in branch '3.10':

Pablo wrote that new changes in the 3.10 branch will only land in 3.10.1. It 
means that Python 3.10.0 and 3.10.1 will produce different exception messages. 
It is going to be an issue, no?

You should either ask for an exception to Pablo, or revert the change.

--

___
Python tracker 

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



[issue41082] Error handling and documentation of Path.home()

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Using `os.path.expanduser` is a functional change so it wasn't backported at 
the time to 3.9 and sure shouldn't be backported now. Going with a doc update 
is the right approach.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45129] Remove deprecated reuse_address parameter from create_datagram_endpoint()

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 59ea704df7a2fae4559e1e04f7a59d6c40f63657 by Hugo van Kemenade in 
branch 'main':
bpo-45129 Remove deprecated reuse_address (GH-28207)
https://github.com/python/cpython/commit/59ea704df7a2fae4559e1e04f7a59d6c40f63657


--

___
Python tracker 

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



[issue45129] Remove deprecated reuse_address parameter from create_datagram_endpoint()

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Hugo! ✨ 🍰 ✨

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7a6178a7cd8514911e9480f826838dc789fb8655 by Łukasz Langa in 
branch '3.9':
[3.9] bpo-38820: Test with OpenSSL 3.0.0 final (GH-28205) (GH-28217)
https://github.com/python/cpython/commit/7a6178a7cd8514911e9480f826838dc789fb8655


--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Christian, Python is now tested with 3.0.0 final in 3.9, 3.10, and 3.11. Looks 
like we can close this!

Thank you for this big body of work ✨ 🍰 ✨

--
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

(I'll let you close this yourself when you determine that the two remaining 
open dependencies can be closed as well.)

--

___
Python tracker 

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



[issue45139] Simplify source links in documentation?

2021-09-08 Thread Jean Abou Samra


New submission from Jean Abou Samra :

Currently, links to source code in the documentation look like this:

**Source code:** :source:`Lib/abc.py`

For documentation translators, this means that every module contains
a boilerplate string to translate. A small burden perhaps, but avoidable.
I propose to refactor the links in a directive, like so:

.. source:: Lib/abc.py

Then just the text "Source code:" gets translated (in sphinx.po) and
the rest is automatic. This could also benefit the presentation in
the future, if anyone wants to change the styling of these links.

Open question is how to handle the handful of links that contain several
source files (async I/O modules in particular). To make it language-agnostic,
perhaps the markup

.. source::
   Lib/asyncio/futures.py,
   Lib/asyncio/base_futures.py

could be rendered as if it were

**Source code:** :source:`Lib/asyncio/futures.py` | 
:source:`Lib/asyncio/base_futures.py`

Thoughts?

--
assignee: docs@python
components: Documentation
messages: 401410
nosy: Jean_Abou_Samra, docs@python, mdk
priority: normal
severity: normal
status: open
title: Simplify source links in documentation?

___
Python tracker 

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



[issue45026] More compact range iterator

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

I like Dennis' idea and Serhiy's implementation in GH-28176. It's a bit of a 
larger change compared to GH-27986 but I think it's worth it: I expect 
iteration speed is more important than `len()` speed for range objects.

--

___
Python tracker 

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



[issue41082] Error handling and documentation of Path.home()

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset dc2e11ed5a5a8083db1d8b5e2396c9238999568c by andrei kulakov in 
branch '3.9':
[3.9] bpo-41082: Add note on errors that may be raised by home() and 
expanduser() (GH-28186)
https://github.com/python/cpython/commit/dc2e11ed5a5a8083db1d8b5e2396c9238999568c


--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

Pablo wanted to wait for 3.10.1, see 
https://github.com/python/cpython/pull/28134#issuecomment-912679271

--

___
Python tracker 

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



[issue41082] Error handling and documentation of Path.home()

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:

Behavior is fixed in Python 3.10+. For Python 3.9 the docs are updated to list 
possible exceptions. Since this was reported with 3.9 in mind, I'm marking this 
one as wontfix.

Thanks for picking this up, Andrei! ✨ 🍰 ✨

--
resolution:  -> wont fix
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



[issue44340] Add support for building cpython with clang thin lto

2021-09-08 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 84ca5fcd31541929f0031e974a434b95d8e78aab by Dong-hee Na in branch 
'main':
bpo-44340: Update whatsnews for ThinLTO (GH-28229)
https://github.com/python/cpython/commit/84ca5fcd31541929f0031e974a434b95d8e78aab


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'

2021-09-08 Thread Miro Hrončok

Miro Hrončok  added the comment:

Fix was proposed in https://github.com/python/cpython/pull/28235 but references 
the original bpi number.

--

___
Python tracker 

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



[issue45140] strict_timestamps for PyZipFile

2021-09-08 Thread Rebecca Wallander


New submission from Rebecca Wallander :

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

Above fix solved the problem with pre-1980 files for regular ZipFile, but I 
still have issues when using PyZipFile object.

https://docs.python.org/3.11/library/zipfile.html#pyzipfile-objects

I would be glad if `strict_timestamps` was added to PyZipFile as well.

The documentation of PyZipFile also states that PyZipFile has the same 
parameters as ZipFile with the addition of one extra. If this issue can't be 
fixed in code, at least the documentation should be updated to reflect this is 
not longer true.

--
components: Library (Lib)
messages: 401417
nosy: sakcheen
priority: normal
severity: normal
status: open
title: strict_timestamps for PyZipFile
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



[issue45135] dataclasses.asdict() incorrectly calls __deepcopy__() on values.

2021-09-08 Thread Thomas Fischbacher


Thomas Fischbacher  added the comment:

The current behavior deviates from the documentation in a way that might evade 
tests and hence has the potential to cause production outages.

Is there a way to fix the documentation so that it correctly describes current 
behavior - without having to wait for a new release? Eliminating the risk in 
such a way would be highly appreciated.

In the longer run, there may be some value in having a differently named method 
(perhaps .as_dict()?) that basically returns
{k: v for k, v in self.__dict__.items()}, but without going through reflection? 
The current approach to recurse looks as if it were based on quite a few 
doubtful assumptions.

(Context: some style guides, such as Google's Python style guide,
limit the use of reflection in order to keep some overall undesirable processes 
in check: https://google.github.io/styleguide/pyguide.html#2191-definition)

--

___
Python tracker 

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



[issue45026] More compact range iterator

2021-09-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I have not benchmarked PR 28176 yet and do not know whether it have advantages 
over PR 27986 and how large. Slower __lenght_hint__ can make list(range(...)) 
slower for small ranges, but I do not know how small.

--

___
Python tracker 

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



[issue45141] mailcap.getcaps() from given file(s)

2021-09-08 Thread pacien


New submission from pacien :

Currently, `mailcap.getcaps()` can only be used to load mailcap dictionaries
from files located at some specific hard-coded paths.

It is however also desirable to use the mailcap parser to load files located
elsewhere.

An optional parameter could be added to this function to explicitly specify
the mailcap file(s) to read.

--
components: email
messages: 401420
nosy: barry, pacien, r.david.murray
priority: normal
severity: normal
status: open
title: mailcap.getcaps() from given file(s)
type: enhancement

___
Python tracker 

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



[issue40059] Provide a toml module in the standard library

2021-09-08 Thread Brett Cannon


Brett Cannon  added the comment:

No progress as I've been swamped with higher-priority things and the bigger 
discussion about how we want to manage the stdlib going forward has not started 
yet (once again, not had the time to start that).

--

___
Python tracker 

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



[issue38371] Tkinter: deprecate the split() method

2021-09-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f235dd0784b92824565c4a4e72adc70fa3eab68f by Erlend Egeberg 
Aasland in branch 'main':
bpo-38371: Remove deprecated `tkinter` split() method (GH-28237)
https://github.com/python/cpython/commit/f235dd0784b92824565c4a4e72adc70fa3eab68f


--

___
Python tracker 

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



[issue45138] [sqlite3] expand bound values in traced statements when possible

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
title: [sqlite3] expand bound values in traced statements if possible -> 
[sqlite3] expand bound values in traced statements when possible

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-08 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I did some experiments using the connection object as a "backref" in the 
callback context, but it seems that the GC does not play well with such ref 
circles; I ended up with a lot of ref leaks (yes, I modified the traverse and 
clear slots to visit and clear the backref).

Using the module object as a "backref", however, worked swell. It ends up being 
a much larger PR, though.

--

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-08 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26661
pull_request: https://github.com/python/cpython/pull/28242

___
Python tracker 

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



[issue37529] Mimetype module duplicates

2021-09-08 Thread Andrei Kulakov


Change by Andrei Kulakov :


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

___
Python tracker 

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



[issue45139] Simplify source links in documentation?

2021-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

ISTM that translating this fixed pattern is possibly one of the simplest things 
a translator will be asked to do, so there is very little payoff to making the 
change.  

For a person writing the docs, it is best to leave it as-is so that the wording 
and presentation is easily customized for a situation unique to a particular 
module.  This becomes a much more difficult task if we have to override logic 
in a PO file.

Thanks for the suggestion, but I am -1 on this change.   Let's not take 
something simple and introduce hard-to-override implicit behavior.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37529] Mimetype module duplicates

2021-09-08 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
pull_requests: +26663
pull_request: https://github.com/python/cpython/pull/28244

___
Python tracker 

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



[issue45139] Docs: More surrounding text into the "source" directive

2021-09-08 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
title: Simplify source links in documentation? -> Docs: More surrounding text 
into the "source" directive
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



[issue45141] mailcap.getcaps() from given file(s)

2021-09-08 Thread pacien


Change by pacien :


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

___
Python tracker 

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



[issue45017] move opcode-related logic from modulefinder to dis

2021-09-08 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45142] Import error for Iterable in collections

2021-09-08 Thread Joshua


New submission from Joshua :

Traceback:
Traceback (most recent call last):
  File "/Users/user/PycharmProjects/phys2/main.py", line 5, in 
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' 
(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)

Done using a venv based on python 3.10.0rc1 running on Darwin/MacOS. 

I am new to adding bugs so I don't quite know what information I can provide 
that could be of use other than that this issue persists in REPL.

--
components: Library (Lib)
messages: 401425
nosy: Joshuah143
priority: normal
severity: normal
status: open
title: Import error for Iterable in collections
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



[issue45143] ipaddress multicast v6 RFC documentation correction

2021-09-08 Thread Hanu


New submission from Hanu :

In the ipaddress library documentation related to multicast.
https://docs.python.org/3/library/ipaddress.html#ip-addresses

the is_multicast, refers to the v6 multicast RFC as 2373:
"is_multicast
True if the address is reserved for multicast use. See RFC 3171 (for IPv4) or 
RFC 2373 (for IPv6)."

Should that be referred to as RFC 2375 (for IPv6)? 
- RFC 2373 is "IP Version 6 Addressing Architecture"
- RFC 2375 is "IPv6 Multicast Address Assignments"

Also for IPv4, the multicast is referred to RFC 3171, which is obsoleted by RFC 
5771 (IPv4 Multicast Address Assignments)

--
messages: 401426
nosy: hanugit
priority: normal
severity: normal
status: open
title: ipaddress multicast v6 RFC documentation correction
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



[issue45142] Import error for Iterable in collections

2021-09-08 Thread Joshua


Joshua  added the comment:

Update: I'm just dumb, should have used "from collections.abc import Iterable"

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-08 Thread Diego Ramirez


Change by Diego Ramirez :


--
nosy: +DiddiLeija

___
Python tracker 

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



  1   2   >