Re: Start Python programming

2021-04-27 Thread Abrantes Araujo Silva Filho
On Tue, 27 Apr 2021 17:32:22 +, Gazoo wrote:

> I'd like to start learning Python programming. What sites/tutorials
> could you recommend for beginner, please.

Have you tried this book?

https://greenteapress.com/wp/think-python-2e/

It is a good book, written by Allan B. Downey, which is available for 
free in HTML or PDF. If you wish, you can buy a copy on Amazon as well.


-
Abrantes
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43888] GitHub Actions CI/CD `Coverage` job is broken on master

2021-04-27 Thread Ammar Askar


Change by Ammar Askar :


--
pull_requests: +24370
pull_request: https://github.com/python/cpython/pull/25679

___
Python tracker 

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



[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-27 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

For what it's worth, I checked grep.app and found only one usage of del on 
__annotations__, in a test suite: 
https://github.com/go-python/gpython/blob/master/py/tests/function.py#L82. 
Changing its behavior seems very low risk.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue37892] IDLE Shell: isolate user code input

2021-04-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +24369
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25678

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset cf9d65c5af7905d9e9945a297dbbf15d3bcace15 by Miss Islington (bot) 
in branch '3.9':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/cf9d65c5af7905d9e9945a297dbbf15d3bcace15


--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a5e6e6df7d1d498576bab26deaddc288a7bd by Victor Stinner in 
branch 'master':
bpo-43963: Add _signal module state (GH-25676)
https://github.com/python/cpython/commit/a5e6e6df7d1d498576bab26deaddc288a7bd


--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 5c84bb506aaca01f5f750116d8f7a41d41f8124d by Inada Naoki in branch 
'master':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/5c84bb506aaca01f5f750116d8f7a41d41f8124d


--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24368
pull_request: https://github.com/python/cpython/pull/25677

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +24367
pull_request: https://github.com/python/cpython/pull/25676

___
Python tracker 

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



[issue43939] Deadlock in logging

2021-04-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I'm kind of puzzled on that fact that context manager solves it. 

It "solves" the problem because of the happenstance rather than because of 
language guarantees.

The current implementation of the with-statement in CPython is to generate a 
SETUP_WITH opcode that calls both __enter__() and PyFrame_BlockSetup() within a 
single opcode while the GIL is held.  And because RLlock.__enter__() is 
implemented in C there are no pure python steps before the block frame setup.

If we added a pure Python __enter__ and __exit__ to the Handler class 
(necessary because a user can override createLock), then pure python steps 
would occur before the frame block setup and the problem would reappear.

If RLock were implemented in pure python, the problem would also reappear.

If the opcodes were changed so that the call to __enter__() were in a different 
opcode than setting up the block frame, the problem would reappear.


> I'll submit a PR in a few days

Let's wait to hear from Vinay and Nick before deciding to work on a PR.  Since 
you are no longer using the package, you no longer have the problem to solve.  
The programming practice that gave rise to the problem is inherently fragile. 
The proposed mitigation only helps one module and doesn't solve the problem in 
general.  As described above, the proposed mitigation is fragile and 
implementation specific.  Lastly, it overrides an old decision to not use 
context managers in the logging module for reasons I no longer remember.

--
assignee:  -> vinay.sajip

___
Python tracker 

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



[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-27 Thread Larry Hastings


Larry Hastings  added the comment:

I think the PR is in good shape.  If anybody has the time for a review, I'd 
appreciate it!

--

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:

What does os.rename do on Linux? Does it just overwrite existing files by 
default?

--

___
Python tracker 

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



Re: Not found in the documentation

2021-04-27 Thread elas tica
Le mardi 27 avril 2021 à 01:44:04 UTC+2, Paul Bryan a écrit :
> From 
> https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy
>  
> : 
> 
> > The string representations of the numeric classes, computed 
> > by__repr__() and __str__(), have the following properties: 
> > * They are valid numeric literals which, when passed to their 
> > class constructor, produce an object having the value of the 
> > original numeric. 
> > * The representation is in base 10, when possible. 

I realize that these basic informations have been very recently added to the 
Language Reference document as they are missing from the 3.8.5 version (July 
2020) as you can check here: 
https://docs.python.org/release/3.8.5/reference/datamodel.html#index-8

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-27 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a09766deab5aff549f40f27080895e148af922ed by Victor Stinner in 
branch 'master':
bpo-43963: Fix import _signal in subinterpreters (GH-25674)
https://github.com/python/cpython/commit/a09766deab5aff549f40f27080895e148af922ed


--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

FYI I used the following patch to debug this issue:

diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 872f121127..ee2e1ff77f 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -546,6 +546,8 @@ def _callSetUp(self):
 self.setUp()

 def _callTestMethod(self, method):
+if sys.gettrace() is not None:
+raise Exception("sys.gettrace() is not None")
 method()

 def _callTearDown(self):

And I used the following script:
---
import random
import os.path
import sys

with open("tests") as fp:
lines = list(filter(bool, (line.strip() for line in fp)))
print(len(lines))

filename = "test"
loop = 2
while os.path.exists(filename):
filename = "test%s" % loop
loop += 1

with open(filename, "w") as fp:
for _ in range(5):
test = random.choice(lines)
print(test, file=fp)
print("test_signal", file=fp)

with open(filename) as fp:
for line in fp:
print(line.rstrip())

args = [sys.executable, "-m", "test", "--fromfile=" + filename]
print("RUN", args)

os.execv(args[0], args)
---

I created the "tests" file using the command:

   python -m test --list-tests > tests

Then I removed all tests starting at test_signal, including test_signal. I 
removed slow tests like asyncio and multiprocessing tests.

--

___
Python tracker 

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



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

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-41713: Port _signal module to multi-phase init (GH-23355)

This change caused a regression: bpo-43963.

--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is a follow-up of bpo-41713:

commit 7f9b25a21ab95f8cf8d663396993766307be475c
Author: Victor Stinner 
Date:   Tue Nov 17 23:28:25 2020 +0100

bpo-41713: Port _signal module to multi-phase init (GH-23355)

Port the _signal extension module to the multi-phase initialization
API (PEP 489).

Co-Authored-By: Mohamed Koubaa 

--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43955: "Windows: Running the Python test suite sequentially is 
interrupted by (Pdb) prompt".

--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Running these 3 tests is enough to reproduce the issue:
---
vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>python -m test 
test_interpreters test_pdb test_threading  
Running Debug|x64 interpreter...
0:00:00 Run tests sequentially
0:00:00 [1/3] test_interpreters
0:00:04 [2/3] test_pdb
test test_pdb failed -- Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\doctest.py", line 2205, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_pdb.test_pdb_issue_20766
  File "C:\vstinner\python\master\lib\test\test_pdb.py", line 1270, in 
test_pdb_issue_20766
(...)
0:00:10 load avg: 0.03 [3/3/1] test_threading -- test_pdb failed
(Pdb) 
---

Moreover, my PR 25674 (bpo-43963) fix these tests.

--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43963: "test_interpreters has side effects on test_signal".

--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43962: "test_interpreters: when 
TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion 
error".

--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-04-27 Thread STINNER Victor

New submission from STINNER Victor :

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>type bisect3
test.test_signal.RaiseSignalTest.test_handler
test.test_interpreters.TestInterpreterAttrs.test_main_id
test.test_interpreters.TestInterpreterClose.test_from_sibling

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>python -m test 
test_interpreters test_signal --matchfile=bisect3 -v
Running Debug|x64 interpreter...
== CPython 3.10.0a7+ (heads/master:6bd9288b80, Apr 27 2021, 22:54:42) [MSC 
v.1928 64 bit (AMD64)]
== Windows-10-10.0.19042-SP0 little-endian
== cwd: C:\vstinner\python\master\build\test_python_5756æ
== CPU count: 2
== encodings: locale=cp1252, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/2] test_interpreters
test_main_id (test.test_interpreters.TestInterpreterAttrs) ... ok
test_from_sibling (test.test_interpreters.TestInterpreterClose) ... ok

--

Ran 2 tests in 0.277s

OK
0:00:00 [2/2] test_signal
test_handler (test.test_signal.RaiseSignalTest) ... ERROR

==
ERROR: test_handler (test.test_signal.RaiseSignalTest)
--
Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable 
object

--

Ran 1 test in 0.004s

FAILED (errors=1)
test test_signal failed
test_signal failed

== Tests result: FAILURE ==

1 test OK.

1 test failed:
test_signal

Total duration: 689 ms
Tests result: FAILURE

--
components: Tests
messages: 392147
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_interpreters has side effects on test_signal
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



[issue43960] test_pdb fails when only some tests are run

2021-04-27 Thread Irit Katriel


Irit Katriel  added the comment:

I scanned the file and I think this was the only test where this was missing.  
test_pdb_continue_in_bottomframe doesn't have a reset, but it doesn't expect a 
specific breakpoint number, it does:

Breakpoint ... at 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_interpreters: when test_id_type() is run alone, it fails with an 
assertion error -> test_interpreters: when TestInterpreterAttrs.test_id_type() 
is run alone, it fails with an assertion error

___
Python tracker 

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



[issue43962] test_interpreters: when test_id_type() is run alone, it fails with an assertion error

2021-04-27 Thread STINNER Victor

New submission from STINNER Victor :

Example on Linux.

$ ./python -m test test_interpreters -m 
test.test_interpreters.TestInterpreterAttrs.test_id_type
0:00:00 load avg: 1.20 Run tests sequentially
0:00:00 load avg: 1.20 [1/1] test_interpreters
python: Python/pystate.c:561: _PyInterpreterState_IDDecref: Assertion 
`interp->id_refcount != 0' failed.
Fatal Python error: Aborted

Current thread 0x7f05eab42740 (most recent call first):
  File "/home/vstinner/python/master/Lib/unittest/case.py", line 549 in 
_callTestMethod
  File "/home/vstinner/python/master/Lib/unittest/case.py", line 592 in run
  File "/home/vstinner/python/master/Lib/unittest/case.py", line 652 in __call__
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 122 in run
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 84 in __call__
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 122 in run
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 84 in __call__
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 122 in run
  File "/home/vstinner/python/master/Lib/unittest/suite.py", line 84 in __call__
  File "/home/vstinner/python/master/Lib/test/support/testresult.py", line 169 
in run
  File "/home/vstinner/python/master/Lib/test/support/__init__.py", line 959 in 
_run_suite
  File "/home/vstinner/python/master/Lib/test/support/__init__.py", line 1082 
in run_unittest
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 210 
in _test_module
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 246 
in _runtest_inner2
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 282 
in _runtest_inner
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 154 
in _runtest
  File "/home/vstinner/python/master/Lib/test/libregrtest/runtest.py", line 194 
in runtest
  File "/home/vstinner/python/master/Lib/test/libregrtest/main.py", line 423 in 
run_tests_sequential
  File "/home/vstinner/python/master/Lib/test/libregrtest/main.py", line 521 in 
run_tests
  File "/home/vstinner/python/master/Lib/test/libregrtest/main.py", line 694 in 
_main
  File "/home/vstinner/python/master/Lib/test/libregrtest/main.py", line 641 in 
main
  File "/home/vstinner/python/master/Lib/test/libregrtest/main.py", line 719 in 
main
  File "/home/vstinner/python/master/Lib/test/__main__.py", line 2 in 
  File "/home/vstinner/python/master/Lib/runpy.py", line 86 in _run_code
  File "/home/vstinner/python/master/Lib/runpy.py", line 196 in 
_run_module_as_main

Extension modules: _testcapi, _xxsubinterpreters (total: 2)
Abandon (core dumped)


When the whole test case is run, it's fine:

$ ./python -m test test_interpreters -m TestInterpreterAttrs -v
== CPython 3.10.0a7+ (heads/master:6bd9288b80, Apr 27 2021, 22:16:25) [GCC 
11.0.1 20210324 (Red Hat 11.0.1-0)]
== Linux-5.11.15-300.fc34.x86_64-x86_64-with-glibc2.33 little-endian
== cwd: /home/vstinner/python/master/build/test_python_16394æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.39 Run tests sequentially
0:00:00 load avg: 1.39 [1/1] test_interpreters
test_custom_id (test.test_interpreters.TestInterpreterAttrs) ... ok
test_custom_isolated_default (test.test_interpreters.TestInterpreterAttrs) ... 
skipped 'not ready yet (see bpo-32604)'
test_custom_isolated_explicit (test.test_interpreters.TestInterpreterAttrs) ... 
ok
test_equality (test.test_interpreters.TestInterpreterAttrs) ... ok
test_id_readonly (test.test_interpreters.TestInterpreterAttrs) ... ok
test_id_type (test.test_interpreters.TestInterpreterAttrs) ... ok
test_isolated_readonly (test.test_interpreters.TestInterpreterAttrs) ... ok
test_main_id (test.test_interpreters.TestInterpreterAttrs) ... ok
test_main_isolated (test.test_interpreters.TestInterpreterAttrs) ... skipped 
'not ready yet (see bpo-32604)'
test_subinterpreter_isolated_default 
(test.test_interpreters.TestInterpreterAttrs) ... skipped 'not ready yet (see 
bpo-32604)'
test_subinterpreter_isolated_explicit 
(test.test_interpreters.TestInterpreterAttrs) ... ok

--

Ran 11 tests in 0.159s

OK (skipped=3)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 285 ms
Tests result: SUCCESS

--
components: Tests
messages: 392145
nosy: eric.snow, nanjekyejoannah, vstinner
priority: normal
severity: normal
status: open
title: test_interpreters: when test_id_type() is run alone, it fails with an 
assertion error
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



[issue43960] test_pdb fails when only some tests are run

2021-04-27 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-27 Thread Irit Katriel


Irit Katriel  added the comment:

I have a fix, I'll make a PR in a bit.

The issue here is the breakpoint number:

Breakpoint 1 at https://github.com/python/cpython/pull/21989/files

So I will make this test use it.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
title: Test Failures on Windows 10 -> Windows: Running the Python test suite 
sequentially is interrupted by (Pdb) prompt

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-27 Thread Inada Naoki


Inada Naoki  added the comment:

namespace package support is broken since Python 3.7.
See https://bugs.python.org/issue23882#msg387549

We can not use namespace package even if top level directory is specified.

--

___
Python tracker 

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



[issue26629] Need an ability to build standard DLLs with distutils

2021-04-27 Thread Irit Katriel


Irit Katriel  added the comment:

distutils is deprecated and python 2.7 is past EOL.

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

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-27 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 4.0 -> 5.0
pull_requests: +24363
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25672

___
Python tracker 

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



[issue25817] modsupport: 'countformat' does not handle strings without bracket levels correctly

2021-04-27 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Doesn't the pdb prompt use the builtin input()?

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

Oh. I also got this surprising (Pdb) prompt when running "python -m test" on 
Windows.

The prompt doesn't display any output, I only get the prompt display 

(...)
0:34:05 load avg: 1.06 [300/426/2] test_select
0:34:08 load avg: 1.03 [301/426/2] test_selectors
0:34:13 load avg: 0.94 [302/426/2] test_set
0:34:24 load avg: 0.80 [303/426/2] test_setcomps
0:34:26 load avg: 0.78 [304/426/2] test_shelve
0:34:30 load avg: 0.74 [305/426/2] test_shlex
0:34:32 load avg: 0.70 [306/426/2] test_shutil
0:34:36 load avg: 0.66 [307/426/2] test_signal
(Pdb) help
(Pdb) l
(Pdb) ?
(Pdb) help
(Pdb) where
(Pdb) down
(Pdb) p 1
(Pdb) p 2
(Pdb)  


*But* I managed to get more info about that issue:

(Pdb) f=open("debug.txt", "w")
(Pdb) import traceback
(Pdb) traceback.print_stack(file=f)
(Pdb) f.flush()

C:\vstinner\python\master\build\test_python_6260æ\debug.txt content:

(...)
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 154, 
in _runtest
result = _runtest_inner(ns, test_name,
(...)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 549, in 
_callTestMethod
method()
  File "C:\vstinner\python\master\lib\test\test_signal.py", line 1345, in 
test_sigint
signal.raise_signal(signal.SIGINT)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 216, in __exit__
def __exit__(self, exc_type, exc_value, tb):
  File "C:\vstinner\python\master\lib\bdb.py", line 92, in trace_dispatch
return self.dispatch_call(frame, arg)
  File "C:\vstinner\python\master\lib\bdb.py", line 136, in dispatch_call
self.user_call(frame, arg)
  File "C:\vstinner\python\master\lib\pdb.py", line 252, in user_call
self.interaction(frame, None)
  File "C:\vstinner\python\master\lib\pdb.py", line 357, in interaction
self._cmdloop()
  File "C:\vstinner\python\master\lib\pdb.py", line 322, in _cmdloop
self.cmdloop()
  File "C:\vstinner\python\master\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
  File "C:\vstinner\python\master\lib\pdb.py", line 423, in onecmd
return cmd.Cmd.onecmd(self, line)
  File "C:\vstinner\python\master\lib\cmd.py", line 216, in onecmd
return self.default(line)
  File "C:\vstinner\python\master\lib\pdb.py", line 381, in default
exec(code, globals, locals)
  File "", line 1, in 


Using debug.txt, I also see that in test_signal, sys.gettrace() = >.

Lib/test/libregrtest/save_env.py is supposed to mark a test as "env changed" 
(ENV_CHANGED) if sys.gettrace() is changed between two tests.

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

For test_logging test_namer_rotator_inheritance() error: I created bpo-43961 
"[Windows] test_logging.test_namer_rotator_inheritance() logs a logging error". 
It doesn't like like an error and it only happens on Windows.

--

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: test_logging.test_namer_rotator_inheritance() logs a logging error -> 
[Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

___
Python tracker 

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



[issue43961] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Ah, I only see this output on Windows. On Linux, I don't see it.

--

___
Python tracker 

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



[issue43961] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-27 Thread STINNER Victor


New submission from STINNER Victor :

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\master>python -m test test_logging 
-m test_namer_rotator_inheritance
Running Debug|x64 interpreter...
0:00:00 Run tests sequentially
0:00:00 [1/1] test_logging
--- Logging error ---
Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\logging\handlers.py", line 74, in emit
self.doRollover()
  File "C:\vstinner\python\master\lib\logging\handlers.py", line 179, in 
doRollover
self.rotate(self.baseFilename, dfn)
  File "C:\vstinner\python\master\lib\logging\handlers.py", line 117, in rotate
self.rotator(source, dest)
  File "C:\vstinner\python\master\lib\test\test_logging.py", line 5222, in 
rotator
os.rename(source, dest + ".rotated")
FileExistsError: [WinError 183] Cannot create a file when that file already 
exists: 'C:\\Users\\vstinner\\AppData\\Local\\Temp\\test_logging-2-tj71b
t8k.log' -> 
'C:\\Users\\vstinner\\AppData\\Local\\Temp\\test_logging-2-tj71bt8k.log.1.test.rotated'
Call stack:
  File "C:\vstinner\python\master\lib\runpy.py", line 196, in 
_run_module_as_main
return _run_code(code, main_globals, None,
  File "C:\vstinner\python\master\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
  File "C:\vstinner\python\master\lib\test\__main__.py", line 2, in 
main()
  File "C:\vstinner\python\master\lib\test\libregrtest\main.py", line 719, in 
main
Regrtest().main(tests=tests, **kwargs)
  File "C:\vstinner\python\master\lib\test\libregrtest\main.py", line 641, in 
main
self._main(tests, kwargs)
  File "C:\vstinner\python\master\lib\test\libregrtest\main.py", line 694, in 
_main
self.run_tests()
  File "C:\vstinner\python\master\lib\test\libregrtest\main.py", line 521, in 
run_tests
self.run_tests_sequential()
  File "C:\vstinner\python\master\lib\test\libregrtest\main.py", line 423, in 
run_tests_sequential
result = runtest(self.ns, test_name)
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 194, 
in runtest
return _runtest(ns, test_name)
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 154, 
in _runtest
result = _runtest_inner(ns, test_name,
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 282, 
in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 246, 
in _runtest_inner2
test_runner()
  File "C:\vstinner\python\master\lib\test\support\__init__.py", line 682, in 
inner
return func(*args, **kwds)
  File "C:\vstinner\python\master\lib\test\test_logging.py", line 5503, in 
test_main
support.run_unittest(*tests)
  File "C:\vstinner\python\master\lib\test\support\__init__.py", line 1082, in 
run_unittest
_run_suite(suite)
  File "C:\vstinner\python\master\lib\test\support\__init__.py", line 959, in 
_run_suite
result = runner.run(suite)
  File "C:\vstinner\python\master\lib\test\support\testresult.py", line 169, in 
run
test(self.result)
  File "C:\vstinner\python\master\lib\unittest\suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\master\lib\unittest\suite.py", line 122, in run
test(result)
  File "C:\vstinner\python\master\lib\unittest\suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\master\lib\unittest\suite.py", line 122, in run
test(result)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 652, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 592, in run
self._callTestMethod(testMethod)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 549, in 
_callTestMethod
method()
  File "C:\vstinner\python\master\lib\test\test_logging.py", line 5229, in 
test_namer_rotator_inheritance
rh.emit(self.next_rec())
Message: '2'
Arguments: None

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.1 sec
Tests result: SUCCESS

--
components: Tests
messages: 392137
nosy: vinay.sajip, vstinner
priority: normal
severity: normal
status: open
title: test_logging.test_namer_rotator_inheritance() logs a logging error
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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> To make it more confusing, all 4 tests passed when I ran with `-j` (to force 
> parallel test execution) - but then test_compileall failed instead :-)

bpo-37387 "test_compileall fails randomly on Windows when tests are run in 
parallel" about random PermissionError.

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Tim Peters


Tim Peters  added the comment:

Shreyan Avigyan:
> And the "(Pdb) continue (...) actually is manually entered by me.

Victor Stinner:
Do you mean that you modified the Python source code?

Me:
Doubt it. For me, with more words: the "(Pdb) " prompt appears all by itself, 
by magic, and the test run is stuck then. I bet Shreyan meant to say "so I 
manually entered 'continue [RETURN]' at the pdb prompt to get it unstuck again".

> Does the issue go away if you revert your change or
> if you test a newly installed Python?

For me, I was using Win10 x64 CPython built from yesterday's github master/main.

And thanks for the distutils clue! I bet that one is a distinct issue.

To make it more confusing, all 4 tests passed when I ran with `-j` (to force 
parallel test execution) - but then test_compileall failed instead :-)

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:

I think the test failures cascade, and some state is not being cleaned up. I'm 
trying to work through them now, but if someone else is as well, do say so and 
I'll find something else to do.

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Shreyan Avigyan:
> And the "(Pdb) continue (...) actually is manually entered by me.

Do you mean that you modified the Python source code? Does the issue go away if 
you revert your change or if you test a newly installed Python?

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

File "C:\github\cpython\lib\test\test_distutils.py", line 15, in 
import distutils.tests
  File "C:\github\cpython\lib\contextlib.py", line 140, in __exit__
next(self.gen)
  File "C:\github\cpython\lib\test\support\warnings_helper.py", line 179, in 
_filterwarnings
raise AssertionError("filter (%r, %s) did not catch any warning" %
AssertionError: filter ('The distutils package is deprecated', 
DeprecationWarning) did not catch any warning

Ah, test_distutils fails if distutils was already imported previously. The test 
should be fixed.

"""
test test_pdb failed -- Traceback (most recent call last):
  File "C:\github\cpython\lib\doctest.py", line 2205, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_pdb.test_pdb_issue_20766
  File "C:\github\cpython\lib\test\test_pdb.py", line 1270, in 
test_pdb_issue_20766
"""

This is a surprising failure. No clue why test_pdb fails when other tests are 
run previously (when tests are run sequentially).

See also bpo-43960

--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-27 Thread STINNER Victor

New submission from STINNER Victor :

test_pdb fails with the following commands. I tested on Linux, same/similar 
failure on Windows.

See also bpo-41914: "test_pdb fails".


$ cat bisect 
test.test_pdb.PdbTestCase.test_run_module
test.test_pdb.test_next_until_return_at_return_event
test.test_pdb.test_pdb_next_command_in_generator_for_loop

$ ./python -m test test_pdb  --matchfile=bisect -v
== CPython 3.10.0a7+ (heads/master:6bd9288b80, Apr 27 2021, 22:16:25) [GCC 
11.0.1 20210324 (Red Hat 11.0.1-0)]
== Linux-5.11.15-300.fc34.x86_64-x86_64-with-glibc2.33 little-endian
== cwd: /home/vstinner/python/master/build/test_python_7720æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.31 Run tests sequentially
0:00:00 load avg: 1.31 [1/1] test_pdb
test_run_module (test.test_pdb.PdbTestCase) ... ok
test_next_until_return_at_return_event (test.test_pdb)
Doctest: test.test_pdb.test_next_until_return_at_return_event ... ok
test_pdb_next_command_in_generator_for_loop (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_in_generator_for_loop ... FAIL

==
FAIL: test_pdb_next_command_in_generator_for_loop (test.test_pdb)
Doctest: test.test_pdb.test_pdb_next_command_in_generator_for_loop
--
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/doctest.py", line 2205, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for 
test.test_pdb.test_pdb_next_command_in_generator_for_loop
  File "/home/vstinner/python/master/Lib/test/test_pdb.py", line 1182, in 
test_pdb_next_command_in_generator_for_loop

--
File "/home/vstinner/python/master/Lib/test/test_pdb.py", line 1195, in 
test.test_pdb.test_pdb_next_command_in_generator_for_loop
Failed example:
with PdbTestInput(['break test_gen',
   'continue',
   'next',
   'next',
   'next',
   'continue']):
test_function()
Expected:
> (3)test_function()
-> for i in test_gen():
(Pdb) break test_gen
Breakpoint 1 at :1
(Pdb) continue
> (2)test_gen()
-> yield 0
(Pdb) next
value 0
> (3)test_gen()
-> return 1
(Pdb) next
Internal StopIteration: 1
> (3)test_function()
-> for i in test_gen():
(Pdb) next
> (5)test_function()
-> x = 123
(Pdb) continue
Got:
> (3)test_function()
-> for i in test_gen():
(Pdb) break test_gen
Breakpoint 2 at :1
(Pdb) continue
> (2)test_gen()
-> yield 0
(Pdb) next
value 0
> (3)test_gen()
-> return 1
(Pdb) next
Internal StopIteration: 1
> (3)test_function()
-> for i in test_gen():
(Pdb) next
> (5)test_function()
-> x = 123
(Pdb) continue


--

Ran 3 tests in 0.186s

FAILED (failures=1)
test test_pdb failed
test_pdb failed

== Tests result: FAILURE ==

1 test failed:
test_pdb

Total duration: 480 ms
Tests result: FAILURE

--
components: Tests
messages: 392131
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_pdb fails when only some tests are run
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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue19348] Building _testcapimodule as a builtin results in compile error

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

The C API was deeply reworked since 2013. This issue was reported in Python 
2.7. I'm confident that it has been fixed in the meanwhile.

--
resolution: out of date -> fixed
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-27 Thread Stefan Behnel


Change by Stefan Behnel :


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

___
Python tracker 

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



[issue43939] Deadlock in logging

2021-04-27 Thread DaRoee


DaRoee  added the comment:

Ha! Already gave them my analysis, and stopped using that package since.
While I certainly think this is not the trivial, basic usage, and that the 
pattern used for the lock is common (and part of some PEP if I remember 
correctly), I'm kind of puzzled on that fact that context manager solves it. 
The test will pass constantly once the change is made (even though it looks 
like RLock __enter__ is just calling the acquire function), and I overall think 
this is a good change to do in the Handler class, even it's just for self.lock 
(can we find and understand why the last proposal was rejected?).

I'll submit a PR in a few days, but was wondering on the usage of the lock, and 
that it doesn't always exists on `self`. Anyway, I assume these are questions 
that we can continue discussing in the PR if you also think this is a good 
direction..

--

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-27 Thread Stefan Behnel


New submission from Stefan Behnel :

The documentation of the PyContextVar C-API is unclear in a couple of places.

- It's not clear whether PyContextVar_Get() always returns an owned reference 
also for default values or only if a value was found.
- It's not explicit that "optional" actually means "pass an object reference or 
NULL".
- The return value of PyContextVar_Set() is not explained.

--
assignee: docs@python
components: Documentation
messages: 392128
nosy: docs@python, scoder
priority: normal
severity: normal
status: open
title: Improve documentation of PyContextVar C-API
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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



[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Steve Dower


Change by Steve Dower :


--
pull_requests:  -24360

___
Python tracker 

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



[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 6bd9288b805c765ec2433f66aa4d82e05767325f by Ethan Furman in 
branch 'master':
bpo-43957: [Enum] Deprecate ``TypeError`` from containment checks. (GH-25670)
https://github.com/python/cpython/commit/6bd9288b805c765ec2433f66aa4d82e05767325f


--

___
Python tracker 

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



[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman


Change by Ethan Furman :


--
keywords: +patch
pull_requests: +24361
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25670

___
Python tracker 

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



[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +24360
pull_request: https://github.com/python/cpython/pull/25670

___
Python tracker 

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



[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Steve Dower


Change by Steve Dower :


--
pull_requests:  -24359

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the backports!

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

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset 5cadcec5ecf6f95cc771e509ad98c3e3533b32bb by Erlend Egeberg 
Aasland in branch '3.9':
[3.9] bpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)
https://github.com/python/cpython/commit/5cadcec5ecf6f95cc771e509ad98c3e3533b32bb


--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset 7f7cfc41185b651be9cb4d2759c40c3abf738485 by Erlend Egeberg 
Aasland in branch '3.8':
[3.8] bpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)
https://github.com/python/cpython/commit/7f7cfc41185b651be9cb4d2759c40c3abf738485


--

___
Python tracker 

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



[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman
nosy_count: 6.0 -> 7.0
pull_requests: +24359
pull_request: https://github.com/python/cpython/pull/25670

___
Python tracker 

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



[issue43958] Importlib.metadata docs claim PackagePath is a Path subclass

2021-04-27 Thread Paul Moore


Change by Paul Moore :


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

___
Python tracker 

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



[issue43958] Importlib.metadata docs claim PackagePath is a Path subclass

2021-04-27 Thread Paul Moore


New submission from Paul Moore :

The importlib.metadata documentation states that the PackagePath class is "a 
pathlib.Path derived object". This isn't true - it's a PurePath subclass, and 
in particular it does not have a resolve() method. In fact, it has an 
undocumented custom locate() method that converts it into a Path object.

I propose changing the documentation to make it clear that it is a PurePath 
subclass, and explicitly documenting the locate() method.

--
assignee: docs@python
components: Documentation
messages: 392123
nosy: docs@python, paul.moore
priority: normal
severity: normal
status: open
title: Importlib.metadata docs claim PackagePath is a Path subclass
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-27 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +24357
pull_request: https://github.com/python/cpython/pull/25668

___
Python tracker 

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



[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-27 Thread Ethan Furman


New submission from Ethan Furman :

In 3.12 `__contains__` will check for both members and values:

Color.RED in Color  --> True
1 in Color  --> True
'RED' in Color  --> False

Add DeprecationWarning for now.

--
assignee: ethan.furman
messages: 392122
nosy: ethan.furman
priority: normal
severity: normal
stage: needs patch
status: open
title: [Enum] update __contains__ to return True for valid values
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yes, I also see that pdb prompt. I recommend looking at what different
configurations are used by test.libregrtest.main() when no tests are passed
on the command line.

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Yes you're right. Running the failed tests individually does not trigger the 
errors. And the

(Pdb) continue
(Pdb) continue
(Pdb) continue
(Pdb) continue

actually is manually entered by me. My tests also stop at that prompt but 
somehow entering these commands again allow us to continue. Why are the errors 
triggering at all? The tests that are failing when ran alongside the test suite 
haven't been messed with for a very long time now and still somehow out of the 
blue they are failing. Any thoughts?

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Tim Peters


Tim Peters  added the comment:

I expect parallelism is a red herring: early in the test output attached to 
this report:

0:00:04 Run tests sequentially

and there's no other evidence in the output that multiple tests are running 
simultaneously.

Also on Win10, the 4 failing tests here pass for me if I run them one at a 
time, so it's not obvious.

I _suspect_ that what's going wrong with test_pdb is the root cause: every now 
& again, for some weeks now, when I try to run tests on Windows I come back to 
the cmd.exe window and see that it's just sitting there, waiting at a pdb 
prompt.

In the output attached to this report, note that after test_threading starts, 

(Pdb) continue
(Pdb) continue
(Pdb) continue
(Pdb) continue

appears out of the blue. But test_pdb is long finished by that time.

But I'm clueless about current pdb internals.

--
nosy: +tim.peters

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Can you submit a PR that fixes it?

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

The test expects the  but gets sigint_handler 
method of a pdb.Pdb instance instead.

--

___
Python tracker 

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



[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-04-27 Thread Vladimir Matveev


Vladimir Matveev  added the comment:

Apologies for the delay in reply: in more concrete numbers for IG codebase 
enabling this optimization resulted in 0.2% CPU win.

--

___
Python tracker 

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



Re: Start Python programming

2021-04-27 Thread dn via Python-list
On 28/04/2021 05.32, Gazoo wrote:
> 
> 
> I'd like to start learning Python programming. What sites/tutorials
> could you recommend for beginner, please.


Start with the Python Tutorial
(https://docs.python.org/3/tutorial/index.html), thereafter there are
other 'docs' at the same site.

There are plenty of books and both $free and paid courses available
on-line, to suit many preferred ways of learning, and covering many
specialised applications of the language.
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43532] Add keyword-only fields to dataclasses

2021-04-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

> Will this close https://bugs.python.org/issue36077 ?

No, not directly, although I'm going to close that issue as "won't fix".

But you can specify that the child class requires all params as kw_only. 
Continuing the example:

>>> @dataclass(kw_only=True)
... class Child(Parent):
...   y: int
...
>>> Child(0, y=1)
Child(x=0, y=1)

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Pdb error source - 
https://github.com/python/cpython/blob/9aea31deddf7458be3546f72185740f3cd06687f/Lib/test/test_pdb.py#L1270

This is where the error in Pdb is originating from.

--

___
Python tracker 

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



[issue43956] C-API: Incorrect default value for Py_SetProgramName

2021-04-27 Thread Jouke Witteveen

New submission from Jouke Witteveen :

The default program name is hardcoded in 
Python/initconfig.c:config_init_program_name. It is "python" on Windows, and 
"python3" elsewhere. The documentation currently suggests that it is "python" 
everywhere.

Additionally, the documentation currently says:

> The argument should point to a zero-terminated wide character string in 
> static storage whose contents will not change for the duration of the 
> program’s execution.

The code, however, duplicates the string, so I am not sure this is true.

--
assignee: docs@python
components: Documentation
messages: 392113
nosy: docs@python, joukewitteveen
priority: normal
pull_requests: 24356
severity: normal
status: open
title: C-API: Incorrect default value for Py_SetProgramName
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24355
pull_request: https://github.com/python/cpython/pull/25666

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24354
pull_request: https://github.com/python/cpython/pull/25665

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread miss-islington


miss-islington  added the comment:


New changeset bf0736db455517412b0702b023dc71ed9de05d70 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-43492: Update macOS installer to use SQLite 3.35.5 (GH-25640) 
(GH-25662)
https://github.com/python/cpython/commit/bf0736db455517412b0702b023dc71ed9de05d70


--

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2021-04-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9aea31deddf7458be3546f72185740f3cd06687f by Anthony Sottile in 
branch 'master':
bpo-8978: improve tarfile.open error message when lzma / bz2 are missing 
(GH-24850)
https://github.com/python/cpython/commit/9aea31deddf7458be3546f72185740f3cd06687f


--
nosy: +miss-islington

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread miss-islington


miss-islington  added the comment:


New changeset e013d8df2c9b6ea5bc9ae92a10950157e6cb46d6 by Miss Islington (bot) 
in branch '3.8':
bpo-43492: Update macOS installer to use SQLite 3.35.5 (GH-25640)
https://github.com/python/cpython/commit/e013d8df2c9b6ea5bc9ae92a10950157e6cb46d6


--

___
Python tracker 

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



Start Python programming

2021-04-27 Thread Gazoo



I'd like to start learning Python programming. What sites/tutorials
could you recommend for beginner, please.


--
Gazoo


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I wonder if these four tests do something that affects all threads? The test 
driver module runs tests in parallel (if you ask it to run all or most tests, 
like the default).

--

___
Python tracker 

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



[issue43947] lambdas stored with assignment expressions are unoptimized

2021-04-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It was fixed in issue42282.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Constant folding is skipped in named expressions

___
Python tracker 

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



[issue19348] Building _testcapimodule as a builtin results in compile error

2021-04-27 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was fixed by 
https://github.com/python/cpython/commit/5c75f37d473140f0e0b7d9bf3a8c08343447ded1

which added "#undef Py_BUILD_CORE_MODULE" to _testcapimodule.c.

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 10.0 -> 11.0
pull_requests: +24352
pull_request: https://github.com/python/cpython/pull/25662

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset ce827816442613f982c356aa2f434c3c8a0c8917 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43492: Update macOS installer to use SQLite 3.35.5 (GH-25640)
https://github.com/python/cpython/commit/ce827816442613f982c356aa2f434c3c8a0c8917


--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24353
pull_request: https://github.com/python/cpython/pull/25663

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
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

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

See issue https://bugs.python.org/issue43955 for the test failures.

--

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy:  -erlendaasland

___
Python tracker 

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



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


New submission from Shreyan Avigyan :

Recent test failures have been noticed on Windows 10. The full test log has 
been attached. The tests test_distutils, test_pdb, test_signal and 
test_threading require a little bit of attention since there seems to be some 
kind of error.

--
components: Windows
files: tests_log.txt
messages: 392104
nosy: Guido.van.Rossum, Mark.Shannon, christian.heimes, corona10, 
erlendaasland, gvanrossum, pablogsal, paul.moore, serhiy.storchaka, shihai1991, 
shreyanavigyan, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Test Failures on Windows 10
versions: Python 3.10
Added file: https://bugs.python.org/file49995/tests_log.txt

___
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

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Since, these changes and the test failures are not related to each other at 
all, I'm opening a new issue addressing the test failures only. I'm adding 
everyone in this issue's nosy to the new issue's nosy as well.

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset bf0c7c0147b73738cac63eb27ef48430284ff121 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)
https://github.com/python/cpython/commit/bf0c7c0147b73738cac63eb27ef48430284ff121


--

___
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

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

There are no errors in apply-to-all.diff because I've ran the tests both with 
and without the changes and both give me the same output. It's safe to proceed 
with apply-to-all.diff. The only problem is why are the tests failing at all? I 
ran the tests a few days earlier on this machine only (Windows 10) and it was 
successful then.

--

___
Python tracker 

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



[issue43946] unpickling a subclass of list fails when it implements its own extend method

2021-04-27 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks, that makes sense.  And it at least less ugly than the __new__ hack I 
was thinking of as a workaround.  though similar in spirit.

presumably self.append should get the same treatment for completeness given the 
PEP 307 text.

I didn't notice a place in the Python pickle docs that mentioned this specific 
thing about listitems and the need for append/extend.  I didn't do a thorough 
read though, maybe I overlooked something?  If not, it'd be worth figuring out 
how to get this uninitialized class calling of append/extend/__setitem__ for 
list and dict objects detailed in the main docs rather than off in the PEP.

It's semi-mentioned 
https://docs.python.org/3/library/pickle.html#object.__reduce__ here which is 
what the PEP added I suppose, but given this code has no custom __reduce__, we 
need to explicitly mention that list and dict subclasses supporting 
pickling/copying may need to be prepared to handle this situation.  With a 
versionchanged:: 3.7 noting that it now always applies to list subclasses 
without their own __reduce__.

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Thank you, Steve!

--

___
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

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't think I've ever successfully managed to complete the test on my
Windows 10 box either (not even in "production" mode -- you seem to be
using debug mode). I recommend using creating a new PR and having the CI
machinery run the tests. It's more reliable that way.

--

___
Python tracker 

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



[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Ken Jin


Ken Jin  added the comment:

Guido, thanks so much for reviewing the docs for TypeGuard so thoroughly even 
with how busy you are. I hope you enjoy your upcoming vacation :).

I'm closing this issue as all PRs have landed. Please don't hesitate to re-open 
this if you feel something's amiss. Thanks!

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



  1   2   3   >