[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Thanks Mike for the report and reproducer, and Pablo for the fix!

--

___
Python tracker 

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



[issue44013] tempfile.TemporaryFile: name of file descriptor cannot be reused in consecutive initialization

2021-06-04 Thread Xiang Zhong

Xiang Zhong  added the comment:

Dear Mr. Jollans, thanks for your comments and information.

I know my usage of tempfile.TemporaryFile() is unusual, technically I “open”ed 
it twice. The reason I coded them in this way, as a simple illustration, is I 
want to test/debug some codes of my early work which directly takes 
“real-file-names” as the input.

Good to know “fd.fileno()” is more advance than “fd.name”, thank you for your 
information.

For your writing, if my understanding is correct, you mean that os.close() and 
tempfile.TemporaryFile() are using the same low-level file descriptor 
sequences, which means they only keep track of their own file descriptor, and 
assign new file descriptor to the “just” next one.

For example, assume file descriptor integer numbers: 1,2,3,4… as the low-level 
sequences.

Firstly, call tempfile.TemporaryFile() will return 1 as the file descriptor.

Secondly, execute “with open..” will use 2 as the new one and finally it will 
be closed.

Third, call tempfile.TemporaryFile() again, problem in here is, it will 
sequentially take 2 (rather than 3) as the new file descriptor, because it only 
keeps its own orders.

Since the file descriptor 2 is already used and closed inside second step in 
with operation, so the OSError will happen, causing the file descriptor 2 
cannot be reused.

Is my understanding correct?

However, I do not agree with that. To boil down my example codes, 


fd = tempfile.TemporaryFile()
with open(fd.fileno()) as f:
pass # I know fd is closed after with is done

fd = tempfile.TemporaryFile() # since tempfile.TemporaryFile() is 
  # called again, it should return a 
  # valid file descriptor, and the above 
  # operations in “with” chunk should
  # not influence its result

fd.seek(0)   # this should work, however, in reality, it does not


Thanks for your example codes, but they are different with my examples. I even 
found a new problem with it, please check my additional testing file: 
“new-xtempfile.py” (which is attached).

I think those testings can be somehow explained your writing, however, it 
should be a bug.

Finally, I would like to make some revisions,

TL;DR:
 - having two file objects for the same file descriptor is asking for trouble
 - __del__ method should not close its “just” next file descriptor, if its 
current input is closed.
 - I'd say they are "bug"(s)

--
resolution:  -> wont fix
Added file: https://bugs.python.org/file50093/new-xtempfile.py

___
Python tracker 

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



[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-04 Thread Kshitiz Arya


Kshitiz Arya  added the comment:

As Brandt shows us, match-case in its current implementation is not 
significantly different from an if-else ladder in term of performance, though I 
still maintain that match-case is much more readable than an if-else ladder. I 
also agree with Karthikeyan and Terry that global replacement is not a good 
idea, at least not without a significant performance improvement. Therefore I 
will close this issue.

Currently, some people at issue 44283 are working on improving the performance 
of match-case so fingers are crossed. If there is some significant gain in 
performance then I will open new issues on case to case basis.

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



[issue44310] Document that lru_cache uses hard references

2021-06-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

It may useful to link back to @cached_property() for folks wanting method 
caching tied to the lifespan of an instance rather than actual LRU logic.

--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread miss-islington


miss-islington  added the comment:


New changeset ad2f3b74b5615aa36a82d1fdbc45bb7468aa1d72 by Miss Islington (bot) 
in branch '3.10':
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects 
(GH-26545)
https://github.com/python/cpython/commit/ad2f3b74b5615aa36a82d1fdbc45bb7468aa1d72


--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset fa106a685c1f199aca5be5c2d0277a14cc9057bd by Pablo Galindo in 
branch 'main':
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects 
(GH-26545)
https://github.com/python/cpython/commit/fa106a685c1f199aca5be5c2d0277a14cc9057bd


--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +25136
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26547

___
Python tracker 

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



[issue44310] Document that lru_cache uses hard references

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Agreed! I will let the PR to you :)

--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is a simpler reproducer:

dest = sqlite.connect(':memory:')
def md5sum(t):
return

dest.create_function("md5", 1, md5sum)
x = dest("create table lang (name, first_appeared)")
del md5sum, dest

y = [x]
y.append(y)

del x,y
gc.collect()

--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Using the reproducer code by Mike, without this fix:

❯ ./python ../lel.py
[1]25344 segmentation fault  ./python ../lel.py

With this fix:

❯ ./python ../problem.py
❯ echo $?
0

--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The problem is that this is wrong:

https://github.com/python/cpython/blob/f171877ebe276749f31386baed5841ce37cbee2e/Modules/_sqlite/statement.c#L411-L423

1) tp_clear should *not* do anything other than cleaning refs to python objects
2) sqlite3_finalize is called without the GIL but that can trigger a call to 
the destructor of the session (_destructor()) that executes Python code

--
stage: patch review -> 

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +vstinner

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I did the bisection:

ff359d735f1a60878975d1c5751bfd2361e84067 is the first bad commit
commit ff359d735f1a60878975d1c5751bfd2361e84067
Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
Date:   Mon May 31 02:12:27 2021 -0700

bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)

(cherry picked from commit d1124b09e8251061dc040cbd396f35ae57783f4a)

Co-authored-by: Erlend Egeberg Aasland 

:04 04 701f24eacbdf2b52b612dc33ae9a7dcf24a73826 
100af9271a7e7c038a860388587b1cb096b8494f M  Modules
bisect run success

--
nosy: +pablogsal

___
Python tracker 

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



[issue44310] Document that lru_cache uses hard references

2021-06-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm thinking of a more minimal and targeted edit than what is in the PR.   

Per the dev guide, we usually word the docs in an affirmative and specific 
manner (here is what the tool does and an example of how to use it).  
Recounting a specific debugging case or misassumption usually isn't worthwhile 
unless it is a common misconception.

For strong versus weak references, we've had no previous reports even though 
the lru_cache() has been around for a long time.  Likely, that is because the 
standard library uses strong references everywhere unless specifically 
documented to the contrary.  Otherwise, we would have to add a strong reference 
note to everything stateful object in the language.

Another reason that it likely hasn't mattered to other users is that an lru 
cache automatically purges old entries.  If an object is not longer used, it 
cycles out as new items are added to the cache.  Arguably, a key feature of an 
LRU algorithm is that you don't have to think about the lifetime of objects.   

I'll think it a for a while and will propose an alternate edit that focuses on 
how the cache works with methods.  The essential point is that the instance is 
included in the cache key (which is usually what people want).  Discussing weak 
vs strong references is likely just a distractor.

--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0d441d2e70e365b5dc517d8ff24a20b97bc4536a by Miss Islington (bot) 
in branch '3.10':
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite 
(GH-26542) (GH-26544)
https://github.com/python/cpython/commit/0d441d2e70e365b5dc517d8ff24a20b97bc4536a


--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread miss-islington


miss-islington  added the comment:


New changeset b3c50b29e14d8f089aee3e0980298bfc74cb3ba7 by Miss Islington (bot) 
in branch '3.9':
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite 
(GH-26542)
https://github.com/python/cpython/commit/b3c50b29e14d8f089aee3e0980298bfc74cb3ba7


--

___
Python tracker 

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



[issue44186] TimedRotatingFileHandler overwrite log

2021-06-04 Thread Harry


Harry  added the comment:

This bug seems to come from the fact that the file rollover occurs it removes 
any files with same name as the destination file.

I believe this bug occurs on all "when" options, but the midnight option 
truncates the filename so only the date so it's much more likely to be a 
collision in filename so it's much easier to notice that it's happening.

One way of fixing this is to check if the destination file already exists, and 
if it does, append the logs to the end of the file instead of overwriting it.

Another potential fix is to check if the destination file already exists, and 
if it does rename it to something else, or even to choose a different name for 
the destination file of the log e.g. if the filename would be log.2021-05-05 
but there is a collision, call the file log.2021-05-05(1).

Personally I prefer the last option, it seems like the best way to avoid any 
future issues that could arise from appending. I can open a PR for this in the 
morning.

--
nosy: +Harry-Lees

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Jesse Silverman


Jesse Silverman  added the comment:

As Andre noted, it is good in IDLE.
I also realize how convenient it is to read the real docs from there.
I learned a lot about the state of console programming on Windows, in and out 
of Python, but I have no problem using IDLE when on Windows.

--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25134
pull_request: https://github.com/python/cpython/pull/26544

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25133
pull_request: https://github.com/python/cpython/pull/26543

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f171877ebe276749f31386baed5841ce37cbee2e by Pablo Galindo in 
branch 'main':
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite 
(GH-26542)
https://github.com/python/cpython/commit/f171877ebe276749f31386baed5841ce37cbee2e


--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm landing https://github.com/python/cpython/pull/26542 as a temporary 
solution meanwhile we decide what to do with PR 26536.

--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Eric Snow


Eric Snow  added the comment:

Thanks Pablo.  I'll get this sorted out.  Sorry for the pain.

--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: release blocker -> 

___
Python tracker 

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



[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Raising this to a release blocker for 3.10.0 beta 3 as it breaks PyQt6 and 
other projects.

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread STINNER Victor


STINNER Victor  added the comment:

I bet that this issue is simply a duplicate of bpo-38323, since I can still 
(easily) reproduce it locally.

I fixed the buildbot configuration, so if the bug happens again on Refleak 
buildbots, at least we should know which test method hangs. If it's not 
bpo-38323, I suggest to open a new more specific issue about this test method.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: MultiLoopWatcher has a race condition (test_asyncio: 
test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25132
pull_request: https://github.com/python/cpython/pull/26542

___
Python tracker 

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



[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-04 Thread Thomas Caswell


Thomas Caswell  added the comment:

This change also affects PyQt6:

Python 3.10.0b2+ (heads/3.10:d0991e2db3, Jun  1 2021, 11:42:08) [GCC 11.1.0] on 
linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt6.QtCore
>>> PyQt6.QtCore.PYQT_VERSION_STR
'6.1.1.dev2105301600'
>>> PyQt6.QtCore.Qt.Key
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 615, in 
__call__
return cls._create_(
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 762, in 
_create_
return metacls.__new__(metacls, class_name, bases, classdict, 
boundary=boundary)
  File "/home/tcaswell/.pybuild/bleeding/lib/python3.10/enum.py", line 544, in 
__new__
raise TypeError(
TypeError: invalid Flag 'DropAction' -- missing values: 8, 16, 32, 64, 128, 
32768
>>> 


> remove the creation time check (which will remove the error for the OP), and 
> then add a decorator to the enum module that does that creation time check

I am very supportive of this plan!

Could this be labeled as a higher priority / release blocker?

--
nosy: +tcaswell

___
Python tracker 

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



[issue44312] test_asyncio leaked [1533, 1531, 1533] references, sum=4597

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yep

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 8.0 -> 9.0
pull_requests: +25131
pull_request: https://github.com/python/cpython/pull/26541

___
Python tracker 

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



[issue44312] test_asyncio leaked [1533, 1531, 1533] references, sum=4597

2021-06-04 Thread STINNER Victor


STINNER Victor  added the comment:

> This is caused by: https://bugs.python.org/issue43693

You reverted the change: https://bugs.python.org/issue43693#msg395105

Can this issue be closed in this case?

--

___
Python tracker 

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



[issue44265] Create an MSI Package

2021-06-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6, 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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread Irit Katriel


Change by Irit Katriel :


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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 1065ba66b535b786d6dc5f7d912c6486d9a834ae by Miss Islington (bot) 
in branch '3.10':
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) 
(GH-26538)
https://github.com/python/cpython/commit/1065ba66b535b786d6dc5f7d912c6486d9a834ae


--

___
Python tracker 

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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset ea298e1e33eb03b2b4ea2f4556e59b11e3bf240f by Miss Islington (bot) 
in branch '3.9':
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) 
(GH-26539)
https://github.com/python/cpython/commit/ea298e1e33eb03b2b4ea2f4556e59b11e3bf240f


--

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25130
pull_request: https://github.com/python/cpython/pull/26539

___
Python tracker 

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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset dda9ecbfece28aad7b8ba7eaf7951dd9816f78b1 by Irit Katriel in 
branch 'main':
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)
https://github.com/python/cpython/commit/dda9ecbfece28aad7b8ba7eaf7951dd9816f78b1


--

___
Python tracker 

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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +25129
pull_request: https://github.com/python/cpython/pull/26538

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread mike bayer


mike bayer  added the comment:

yes, if I have time I will begin to undertake that, wanted to put it up here in 
case anyone has git bisect on speed dial for cpython.

--

___
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-06-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue42349] Compiler front-end produces a broken CFG

2021-06-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

>From https://devguide.python.org/compiler/#source-code-to-ast:

> Basic blocks themselves are a block of IR that has a single entry point but 
> possibly multiple exit points.

In particular, compile.c's label_exception_targets has the assertion (`assert(i 
== b->b_iused -1);`) that jumps only occur as the last instruction of a block.

Does the devguide need updating, or do I have a misunderstanding?

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25127
pull_request: https://github.com/python/cpython/pull/26536

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> MultiLoopChildWatcher must ensures that the event loop is awaken when it 
> receives a signal by using signal.setwakeup(). This is done by 
> _UnixSelectorEventLoop.add_signal_handler(). Maybe MultiLoopChildWatcher 
> could reuse this function, 

This is the conclusion I came to, too. But changing MultiLoopChildWatcher to 
use loop.add_signal_handler() would contradict the class's documented purpose 
and make it the same as SafeChildWatcher. This is why I think a maintainer 
needs to weigh in. The class's purpose / design might fundamentally not be 
workable. If it can't be made to work, maybe it should be removed or be 
documented as susceptible to hangs.

--

___
Python tracker 

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



[issue44310] Document that lru_cache uses hard references

2021-06-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also note that many important objects in Python are not weak referenceable, 
tuples for example.

--
title: lru_cache memory leak -> Document that lru_cache uses hard references

___
Python tracker 

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



[issue44310] lru_cache memory leak

2021-06-04 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue44307] date.today() is half as fast as datetime.now().date()

2021-06-04 Thread Anthony Sottile


Anthony Sottile  added the comment:

*terry.reedy oops typo!

--

___
Python tracker 

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



[issue44307] date.today() is half as fast as datetime.now().date()

2021-06-04 Thread Anthony Sottile


Anthony Sottile  added the comment:

@terry.reddy -- I believe your title change makes this more difficult to 
understand

--

___
Python tracker 

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



[issue44316] Support preserving path meaning in os.path.normpath() and abspath()

2021-06-04 Thread Barney Gale


New submission from Barney Gale :

>>> os.path.normpath('a/./b/../c//.')
'a/c'
>>> pathlib.Path('a/./b/../c//.')
PosixPath('a/b/../c')

pathlib takes care not to change the meaning of the path when normalising. That 
means preserving '..' entries, as these can't be simplified without resolving 
symlinks etc.

normpath(), on the other handle, /always/ eliminates '..' entries, which can 
change the meaning of the path.

We could add a new argument to `normpath()` and `abspath()` that leaves '..' 
entries intact. This was closed as "won't fix" back in bpo-2289, but I think 
it's worth re-considering.

This enhancement would be helpful for my longer-term work to make pathlib an 
OOP wrapper of os + os.path, rather than a parallel implementation.

--
components: Library (Lib)
messages: 395122
nosy: barneygale
priority: normal
severity: normal
status: open
title: Support preserving path meaning in os.path.normpath() and abspath()
type: enhancement

___
Python tracker 

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



[issue44310] lru_cache memory leak

2021-06-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6, 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



[issue44309] Add support for yescrypt in crypt.

2021-06-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +jafo

___
Python tracker 

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



[issue44307] date.today() is half as fast as datetime.now().date()

2021-06-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: date.today() is 2x slower than datetime.now().date() -> date.today() is 
half as fast as datetime.now().date()

___
Python tracker 

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



[issue44304] segmentation fault appeared in python 3.10.0b2

2021-06-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Coredevs are likely to assume that the problem is in greenlets, especially if 
it has any C code (I don't know).  I suggest you first try to find the commit 
between releases that resulted in the problem.  If it is not deterministicly 
reproducible, you likely need to do a manual binary search.  (This is as much 
as I know.)

If you get an OS 'traceback' longer than a dozen line or so, please attach it 
as a file rather than pasting in a message.

--
nosy: +terry.reedy
type:  -> crash

___
Python tracker 

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



[issue44301] Is there a way to provide destructor for module written using C API?

2021-06-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6, 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



[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

To me, Raymond's flattening is a plausible replacement, especially ater a 
future speedup.  However, I would re-order the patterns to None, False, True, 
str(), int(), ..., _.  These independent conditions, other than _ (or else in 
the if chain), can be ordered for best reading and comprehension speed, and I 
think the above is an improvement.

Ordering for execution speed would instead start with the most frequently true 
conditions.  An advantage of match over 'if' is that patterns are apparently 
easier to re-order or otherwise automatically optimize.

I agree that replacement should only be done when there is significant 
improvement in reading and/or execution speed.  To avoid backport issues, they 
should best be preceded by a check for bug reports and especially PRs that will 
or do affect the same area of code.

The proposal for a general, +- global replacement has been and will be 
rejected. I think that this issue should therefore be closed, fairly soon, as 
such.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread STINNER Victor


STINNER Victor  added the comment:

When I reproduce test_cancel_make_subprocess_transport_exec() hang, the problem 
is that the C signal handler is called with SIGCHLD when the child process 
completes, but the Python signal handler is not called.

Python is "blocked" in a selector (maybe select.select(), it doesn't matter). I 
guess that the selector is interrupted by a signal (even if asyncio calls 
signal.setinterrupt(SIGCHLD, False)), but since the signal handler doesn't 
raise an exception, the syscall is restarted: see the PEP 475.

I understood that the asyncio event loop only gets the opportunity to call the 
Python signal handler if there is a pending asyncio event (call_soon, 
call_timer, event on a tracked FD, whatever). If the signal arrives when the 
event loop is idle, the Python signal handler will never be called since the 
selector is called with timeout=0 (blocking mode).

MultiLoopChildWatcher must ensures that the event loop is awaken when it 
receives a signal by using signal.setwakeup(). This is done by 
_UnixSelectorEventLoop.add_signal_handler(). Maybe MultiLoopChildWatcher could 
reuse this function, rather than calling directly signal.signal().

--

___
Python tracker 

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



[issue44315] [sqlite3] remove unused connection argument from pysqlite_step()

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal
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



[issue44315] [sqlite3] remove unused connection argument from pysqlite_step()

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7459208de194db6222d7e3aa301c2b831dbe566d by Erlend Egeberg 
Aasland in branch 'main':
bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)
https://github.com/python/cpython/commit/7459208de194db6222d7e3aa301c2b831dbe566d


--
nosy: +pablogsal

___
Python tracker 

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



[issue44315] [sqlite3] remove unused connection argument from pysqlite_step()

2021-06-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue44315] [sqlite3] remove unused connection argument from pysqlite_step()

2021-06-04 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

The code that used the connection argument was removed one year before pysqlite 
was included in CPython, as far as I can see. It can safely be removed.

See also:
https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722

--
assignee: erlendaasland
components: Extension Modules
messages: 395117
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] remove unused connection argument from pysqlite_step()
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



[issue42213] Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache

2021-06-04 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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



[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-04 Thread Paul Ganssle


Paul Ganssle  added the comment:

Yeah, I knew this was slower and it's been on my long list to look at it (tied 
to this is the fact that `datetime.today()` is basically just a slow version of 
`datetime.now()`, in defiance of user expectations).

My inclination is that we shouldn't re-implement `fromtimestamp` in 
`date.today`, but rather call `date_fromtimestamp` in the fast path. I believe 
that incurs the overhead of creating one additional Python object (an integer), 
but if it's a sufficiently significant speedup, we could possibly refactor 
`date_fromtimestamp` to a version that accepts a C integer and a version that 
accepts a Python integer, then call the version accepting a C integer.

I think this won't give any speedup to `datetime.today`, since `datetime.today` 
will still take the slow path. If we care about this, we *may* be able to 
implement `datetime.today` as an alias for `datetime.now(None)`, assuming there 
are no behavioral differences between the two.

--

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Andre Roberge


Andre Roberge  added the comment:

Terry: I just checked with Idle on Windows with Python 3.9.5 and the display 
works perfectly, with no incorrect characters.

--

___
Python tracker 

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



[issue29249] Pathlib glob ** bug

2021-06-04 Thread Christian Heimes


Change by Christian Heimes :


--
nosy:  -christian.heimes

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Jesse or Andre, please test interactive help in IDLE as pydoc then knows that 
it is *not* talking to Windows console.  It then does not use more.com but 
prints the entire text at once.  It should send it 'as is' and should ignore 
the console language and encoding settings.  Use a Start menu icon or

> pyw -m idlelib

'py' works too.  It blocks, but displays the occasional tk/tkinter/IDLE error 
message as sys.__stderr__, etc, are the console stream instead of None.

Long output such as the 240 lines for COMPARISON is, by default, 'squeezed' to 
a little box.  Double click to expand or right click to move it to a separate 
window.

If there is still a problem with garbage in the text, we should try to fix it.

PS: one can select more than one Component, but Documentation usually refers to 
the content, not the means of displaying it.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue29249] Pathlib glob ** bug

2021-06-04 Thread Barney Gale


Change by Barney Gale :


--
nosy: +barneygale

___
Python tracker 

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



[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-04 Thread Ruairidh MacLeod


Change by Ruairidh MacLeod :


--
nosy: +rkm

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-04 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> This issue is not solved.

Yes, nothing was changed. After diagnosing this issue and trying some things 
out in a draft PR, my conclusion is that an asyncio maintainer really needs to 
weigh in on what to do (especially Andrew who authored the class). The reason 
is that the hang is closely tied to MultiLoopChildWatcher's documented purpose. 
The only way I could see to fix MultiLoopChildWatcher would change its 
documented behavior and make it the same as SafeChildWatcher, which would 
defeat the purpose of having a separate class: 
https://github.com/python/cpython/pull/20142#issuecomment-712417912
Maybe there is a way to sidestep the hangs in the tests without fixing 
MultiLoopChildWatcher, but I didn't look into that.

--

___
Python tracker 

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



[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-06-04 Thread miss-islington


miss-islington  added the comment:


New changeset 067d6d46575b5cf30bbf7c812defee1517106a34 by Miss Islington (bot) 
in branch '3.10':
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)
https://github.com/python/cpython/commit/067d6d46575b5cf30bbf7c812defee1517106a34


--

___
Python tracker 

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



[issue44266] AttributeError: module 'sys' has no attribute 'original_stdout'

2021-06-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If you intend to import the stdlib sys and succeed, the original stdout is 
called '__stdout__'.  See 
https://docs.python.org/3/library/sys.html#sys.__stdin__, including the note 
that it may be None on Windows.  Also peruse that doc to see what attributes 
sys *does* have.

When you have questions about using python, please post first to python-list or 
other question-answering forums.

--
nosy: +terry.reedy
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



[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3f4d801bf907a5fcab50f3b64475d1410b90a80f by Miss Islington (bot) 
in branch '3.10':
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) (GH-26531)
https://github.com/python/cpython/commit/3f4d801bf907a5fcab50f3b64475d1410b90a80f


--

___
Python tracker 

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



[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-06-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +25125
pull_request: https://github.com/python/cpython/pull/26534

___
Python tracker 

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



[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 006fd869e4798b68e266f5de89c83ddb531a756b by Erlend Egeberg 
Aasland in branch 'main':
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)
https://github.com/python/cpython/commit/006fd869e4798b68e266f5de89c83ddb531a756b


--
nosy: +pablogsal

___
Python tracker 

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



[issue44314] [doc] SSLContext.set_ciphers() link to OpenSSL cipher list format is outdated

2021-06-04 Thread Chris Mayo


New submission from Chris Mayo :

Current link is:
https://www.openssl.org/docs/manmaster/man1/ciphers.html

Manual page entries without the 'openssl-' prefix have been deprecated, and 
this link is now directed to a generic page for openssl cmd.

Suggest an update to:
https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-LIST-FORMAT

Currently at:
https://github.com/python/cpython/blame/main/Doc/library/ssl.rst#L1680

--
assignee: docs@python
components: Documentation
messages: 395108
nosy: cjmayo, docs@python
priority: normal
severity: normal
status: open
title: [doc] SSLContext.set_ciphers() link to OpenSSL cipher list format is 
outdated
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



[issue43740] Long paths in imp.load_dynamic() lead to segfault

2021-06-04 Thread Thomas Jollans


Thomas Jollans  added the comment:

I cannot reproduce this on my OpenSUSE (glibc 2.33, Linux 5.12.4) or Ubuntu 
20.04 (glibc 2.31, Linux 5.4.0) machines, but I can reproduce it on an old 
Debian Stretch VM I happened to have lying around (glibc 2.24, Linux 4.9.0). 
(FreeBSD 12.2 and Windows 10 also fine.)

This doesn't look like a bug in Python, but like a bug in glibc (and Apple's 
libc?) (or Linux?) that is fixed in current versions.

This C program produces the same result - segfault on old Linux, error message 
on new Linux.

#include 
#include 
#include 
#include 

static const char *FRAGMENT =  "abs/";
#define REPEATS 1000

int main()
{
size_t fragment_len = strlen(FRAGMENT);
size_t len = fragment_len * REPEATS;
char *name = malloc(len + 1);
name[len] = '\0';
for (char *p = name; p < name + len; p += fragment_len) {
memcpy(p, FRAGMENT, fragment_len);
}

void *handle = dlopen(name, RTLD_LAZY);
if (handle == NULL) {
printf("Failed:\n%s\n", dlerror());
free(name);
return 1;
} else {
printf("Success.");
dlclose(handle);
free(name);
return 0;
}
}

--
nosy: +tjollans

___
Python tracker 

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



[issue44041] [sqlite3] check that column count is updated correctly for cached statements

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal
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



[issue44041] [sqlite3] check that column count is updated correctly for cached statements

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 8363ac8607eca7398e568e1336154e1262a995a0 by Erlend Egeberg 
Aasland in branch 'main':
bpo-44041: Add test for sqlite3 column count (GH-25907)
https://github.com/python/cpython/commit/8363ac8607eca7398e568e1336154e1262a995a0


--
nosy: +pablogsal

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 17c4edc4e0692fe55e185755ea8a2f5238f3ef08 by Pablo Galindo in 
branch 'main':
bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and 
b2bf2bc1ece673d387341e06c8d3c2bc6e259747  (GH-26530)
https://github.com/python/cpython/commit/17c4edc4e0692fe55e185755ea8a2f5238f3ef08


--

___
Python tracker 

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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-06-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +25124
pull_request: https://github.com/python/cpython/pull/26531

___
Python tracker 

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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a46c220edc5cf716d0b71eb80ac29ecdb4ebb430 by stratakis in branch 
'main':
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
https://github.com/python/cpython/commit/a46c220edc5cf716d0b71eb80ac29ecdb4ebb430


--
nosy: +pablogsal

___
Python tracker 

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



[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

@mark.shannon what do you think about doing this both for `import ` and 
`from  import `. It will definitely simplify the 
implementation (no need to extra visitors or flags, just using the default 
DEF_IMPORT one 
https://github.com/isidentical/cpython/commit/f8f8fcee4d1480970c356eec0f23c326b9fe674d)
 and also might help you to specialize other cases too (e.g importing 
submodules, from concurrent import futures).

--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR reverts commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and 
b2bf2bc1ece673d387341e06c8d3c2bc6e259747. Please, commit them back once the 
refleaks are resolved. I took a quick look and seems that there are several 
issues but there are more I could find. Some of the issues seem to be related 
to commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f calling _PyCode_GetVarnames 
and _PyCode_GetFreevars without decrementing the reference after use but there 
are more.

--

___
Python tracker 

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I was just asking if we could do anything about the multiple test failures 
> (especially test_asyncio failure).

We don't see any failures as the ones in your logs in the buildbots or 
otherwise, so seems something wrong in your system or only affecting your 
system.

> I didn't include this error. 

Sorry Shreyan, but unfortunately I find your messages very confusing. You seem 
to be mixing several different problems and your logs don't seem to be directly 
related to the issue at hand. Please, in the future, add some context to your 
messages if possible.

--

___
Python tracker 

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



[issue44312] test_asyncio leaked [1533, 1531, 1533] references, sum=4597

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is caused by:

https://bugs.python.org/issue43693

--
nosy: +Mark.Shannon, eric.snow

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25123
pull_request: https://github.com/python/cpython/pull/26530

___
Python tracker 

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



[issue44313] Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for imports

2021-06-04 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

import foo
def func():
return foo.bar()

The snippet above will generate the following code;

  2   0 LOAD_GLOBAL  0 (foo)
  2 LOAD_METHOD  1 (bar)
  4 CALL_METHOD  0
  6 RETURN_VALUE

Though this will make things harder for specializing the LOAD_ATTR for modules 
since now the handling of LOAD_METHOD for that case is necessary so for the 
imports that we can infer during the symbol analysis pass, we'll generate 
LOAD_ATTR+CALL_ATTR instead of LOAD_METHOD+CALL_METHOD and hopefully the 
generated code will get specialized via the PEP 659.

Ref: https://github.com/faster-cpython/ideas/issues/55#issuecomment-853101039

--
assignee: BTaskaya
components: Interpreter Core
messages: 395099
nosy: BTaskaya, Mark.Shannon
priority: normal
severity: normal
status: open
title: Generate LOAD_ATTR+CALL_FUNCTION instead of LOAD_METHOD+CALL_METHOD for 
imports
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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Please, in the future, check with the buildbots before merging these kinds of 
big PRs.

--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f has broken all 
the refleak buildbots. Example failure:

BISECTION:

c1e2583fdc4db6b43d163239ea42b0e8394171f is the first bad commit
commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f
Author: Eric Snow 
Date:   Thu Jun 3 10:28:27 2021 -0600

bpo-43693: Add new internal code objects fields: co_fastlocalnames and 
co_fastlocalkinds. (gh-26388)


https://buildbot.python.org/all/#/builders/384/builds/50/steps/5/logs/stdio




As this is affecting all test, I am proceeding with a revert of commit 
2c1e2583fdc4db6b43d163239ea42b0e8394171f directly to not mask other issues.

--
nosy: +pablogsal

___
Python tracker 

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



[issue44312] test_asyncio leaked [1533, 1531, 1533] references, sum=4597

2021-06-04 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

All refleak buildbots are currently broken in master:

..
test_asyncio leaked [1533, 1531, 1533] references, sum=4597
test_asyncio leaked [367, 366, 367] memory blocks, sum=1100
11 tests failed again:
test_asyncgen test_asyncio test_code test_collections
test_coroutines test_exceptions test_idle test_import test_inspect
test_modulefinder test_types
== Tests result: FAILURE then FAILURE ==
403 tests OK.
10 slowest tests:
- test_signal: 31 min 10 sec
- test_pydoc: 29 min 41 sec
- test_asyncio: 20 min 3 sec
- test_concurrent_futures: 17 min 35 sec
- test_peg_generator: 13 min 38 sec
- test_gdb: 12 min 20 sec
- test_multiprocessing_spawn: 9 min 33 sec
- test_multiprocessing_forkserver: 6 min 49 sec
- test_nntplib: 6 min 20 sec
- test_multiprocessing_fork: 5 min 41 sec
11 tests failed:
test_asyncgen test_asyncio test_code test_collections
test_coroutines test_exceptions test_idle test_import test_inspect
test_modulefinder test_types
13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_ossaudiodev
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64
11 re-run tests:
test_asyncgen test_asyncio test_code test_collections
test_coroutines test_exceptions test_idle test_import test_inspect
test_modulefinder test_types

Example failure:

https://buildbot.python.org/all/#/builders/384/builds/50/steps/5/logs/stdio

--
messages: 395096
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_asyncio leaked [1533, 1531, 1533] references, sum=4597

___
Python tracker 

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> Your logs don't show this error. This error is test_asyncio hanging, but in 
> your logs the test fails (multiple test do, actually).

I didn't include this error. I was just asking if we could do anything about 
the multiple test failures (especially test_asyncio failure).

--

___
Python tracker 

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Yes, with the commands you provided in the 
> https://bugs.python.org/issue38323#msg395090 I also reproduced the crash on 
> my WSL. And any suggestions on the other test failures in the log I attached? 
> I don't know if they are fixed already in the latest commits though.

Your logs don't show this error. This error is test_asyncio hanging, but in 
your logs the test fails (multiple test do, actually).

--

___
Python tracker 

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> bpo-38323 is not fixed yet, I can still easily reproduce the hang on Linux is 
> less than 1 minute:
https://bugs.python.org/issue38323#msg395090

Yes, with the commands you provided in the 
https://bugs.python.org/issue38323#msg395090 I also reproduced the crash on my 
WSL. And any suggestions on the other test failures in the log I attached? I 
don't know if they are fixed already in the latest commits though.

--

___
Python tracker 

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



[issue44308] Raw Strings lack parody

2021-06-04 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. Glad that you found a solution to your issue.

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



[issue44112] [buildbot] test_asyncio hangs (killed after 3 hours) on Refleak buildbots

2021-06-04 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo:
> Extending the bot time was done so we can use faulthandler to identify the 
> test, because buildbot was cancelling the whole build before that :)

Right. I increased buildbot timeout to check if buildbots hang because of 
bpo-38323 or if it's a new regression.

bpo-38323 is not fixed yet, I can still easily reproduce the hang on Linux is 
less than 1 minute:
https://bugs.python.org/issue38323#msg395090

--

___
Python tracker 

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



  1   2   >