[issue44283] Add jump table for certain safe match-case statements

2021-06-02 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

FWIW PEP 603 includes a graph (Figure 2) of dict.get versus hamt.get 
performance as the mappings grow, and it seems the hamt is roughly 1.4x slower 
on inputs of sizes between 10 and 1000.

--

___
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-02 Thread Kshitiz Arya


Kshitiz Arya  added the comment:

I have timed the execution of if-else and match-case on Differ().compare from 
difflib module and here is what I got

When both strings are same

**

if-else: 2.504900476196781e-06, match-case: 2.587399649200961e-06, comparisions 
: 10
if-else: 2.222519979113713e-06, match-case: 1.7874199693324045e-06, 
comparisions : 100
if-else: 1.954343999386765e-06, match-case: 1.8695319959078916e-06, 
comparisions : 1000
if-else: 3.2847548005520366e-06, match-case: 1.928162499825703e-06, 
comparisions : 1
if-else: 1.2241538699890953e-06, match-case: 7.870903900038684e-07, 
comparisions : 10
if-else: 7.950048359998618e-07, match-case: 7.883418589990469e-07, comparisions 
: 100
if-else: 7.941918295000505e-07, match-case: 7.882559125006082e-07, comparisions 
: 1000
if-else: 7.928842861700104e-07, match-case: 7.855620772999828e-07, comparisions 
: 1

**

When strings have some difference

**

if-else: 2.7084999601356687e-06, match-case: 2.6756002625916154e-06, 
comparisions : 10
if-else: 2.207159996032715e-06, match-case: 1.8606500088935719e-06, 
comparisions : 100
if-else: 2.139014999556821e-06, match-case: 1.928671001223847e-06, comparisions 
: 1000
if-else: 2.682303600158775e-06, match-case: 2.626289399631787e-06, comparisions 
: 1
if-else: 1.1338948200136655e-06, match-case: 7.989683500636602e-07, 
comparisions : 10
if-else: 7.862168830033624e-07, match-case: 7.83532044995809e-07, comparisions 
: 100
if-else: 7.918311449997419e-07, match-case: 7.843428884996683e-07, comparisions 
: 1000
if-else: 7.843063791000168e-07, match-case: 7.842913352399773e-07, comparisions 
: 1

**

--

___
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-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

How did you do the timing?

--

___
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-02 Thread Kshitiz Arya


Kshitiz Arya  added the comment:

I have used timeit module. I have also attached the test file with this message

--
Added file: https://bugs.python.org/file50081/match_test.py

___
Python tracker 

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



[issue44225] stop() on a stopped loop inhibits the next run_forever

2021-06-02 Thread megahypex


megahypex  added the comment:

Can I be assigned this issue?

--
nosy: +WhosMega

___
Python tracker 

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



[issue44238] Unable to install Python 3.9.5 - Windows Server

2021-06-02 Thread Ricardo Daniel Fuentes

Ricardo Daniel Fuentes  added the comment:

Hi Steve,

I am attaching the latest log files I see on temp.

This is the first version of python I have installed on this server, we do
install and uninstall SW on this machine all the time. As we run the
operations and need to update sw there often.

Thanks,

Regards,
Ricardo

On Tue, Jun 1, 2021 at 10:19 PM Steve Dower  wrote:

>
> Steve Dower  added the comment:
>
> Unfortunately, I've got no idea whether it's failing to uninstall the MSI
> or if it's specific to removing the PATH environment variable. If you've
> still got the rest (no more than 2-3 I'd expect) of the uninstall log files
> in your %TEMP% directory that may show something.
>
> Have you successfully installed/uninstalled other versions of Python
> before on this machine/OS?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: https://bugs.python.org/file50082/archive (1).zip

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-06-02 Thread Michał Górny

Michał Górny  added the comment:

The test added for this bug is insufficient to verify the fix.  If I revert the 
Lib/http/client.py change, the test still passes.  This is because a subclass 
of client.HTTPException is still raised.

If I add an explicit begin() call to trigger the exception, then without the 
fix I get:

  File "/tmp/cpython/Lib/test/test_httplib.py", line 1189, in 
test_overflowing_header_limit_after_100
resp.begin()
  File "/tmp/cpython/Lib/http/client.py", line 308, in begin
version, status, reason = self._read_status()
  File "/tmp/cpython/Lib/http/client.py", line 277, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response


With the fix, I get (correctly):

test test_httplib failed -- Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_httplib.py", line 1189, in 
test_overflowing_header_limit_after_100
resp.begin()
  File "/tmp/cpython/Lib/http/client.py", line 321, in begin
skipped_headers = _read_headers(self.fp)
  File "/tmp/cpython/Lib/http/client.py", line 218, in _read_headers
raise HTTPException("got more than %d headers" % _MAXHEADERS)
http.client.HTTPException: got more than 100 headers


However, the test considers both exceptions to match.

--
nosy: +mgorny

___
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-02 Thread Irit Katriel

Irit Katriel  added the comment:

I see, that’s a good point. Any suggestion regarding the original confusion 
with warnings? (See PR 26428).

--
status: closed -> open

___
Python tracker 

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



[issue44225] stop() on a stopped loop inhibits the next run_forever

2021-06-02 Thread megahypex


Change by megahypex :


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

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a384b6c04054a2c5050a99059836175cf73e2016 by Erlend Egeberg 
Aasland in branch 'main':
bpo-44165: Optimise sqlite3 statement preparation by passing string size 
(GH-26206)
https://github.com/python/cpython/commit/a384b6c04054a2c5050a99059836175cf73e2016


--
nosy: +pablogsal

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Erlend, check out 
https://github.com/python/cpython/pull/26206#discussion_r643910263. After that 
we can close this issue

--

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25080
pull_request: https://github.com/python/cpython/pull/26484

___
Python tracker 

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



[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2021-06-02 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 7b1f527d5b37dc3aa085ebbe11a1a2dd29ef210f by Irit Katriel in 
branch 'main':
bpo-17792: more accurate error message for unbound variable access exceptions 
(GH-24976)
https://github.com/python/cpython/commit/7b1f527d5b37dc3aa085ebbe11a1a2dd29ef210f


--

___
Python tracker 

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



[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2021-06-02 Thread Irit Katriel


Irit Katriel  added the comment:

Following a discussion on PR24976 we opted for

"cannot access local variable 'x' where it is not associated with a value"

This is because binding it not always related to assignment.

I don't know whether this completely resolves this issue, or whether there is 
still something to change around the None-setting of except targets.

--

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset fbf25b8c0dd1e62db59117d53bbd2d4131a06867 by Erlend Egeberg 
Aasland in branch 'main':
bpo-44165: pysqlite_statement_create now returns a Py object, not an int 
(GH-26484)
https://github.com/python/cpython/commit/fbf25b8c0dd1e62db59117d53bbd2d4131a06867


--

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Erlend, check out 
> https://github.com/python/cpython/pull/26206#discussion_r643910263. After 
> that we can close this issue

See msg393857: I'll add a PR for _pysqlite_connection_begin as well. After 
that, we can close this.

--

___
Python tracker 

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



[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-06-02 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25081
pull_request: https://github.com/python/cpython/pull/26485

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Charalampos Stratakis


New submission from Charalampos Stratakis :

This is an issue as it seems with coverity as it's an error case where the file 
was not actually opened. This warning can be silenced and the code be made more 
explicit by adding an assertion.

Python-3.9.1/Modules/getpath.c:1264: alloc_arg: "calculate_open_pyenv" 
allocates memory that is stored into "env_file".
Python-3.9.1/Modules/getpath.c:1266: leaked_storage: Variable "env_file" going 
out of scope leaks the storage it points to.
# 1264|   status = calculate_open_pyenv(calculate, &env_file);
# 1265|   if (_PyStatus_EXCEPTION(status)) {
# 1266|-> return status;
# 1267|   }
# 1268|   if (env_file == NULL) {

--
messages: 394906
nosy: cstratak
priority: normal
severity: normal
status: open
title: Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates 
memory that is stored into "env_file".
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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


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

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Petr Viktorin


Petr Viktorin  added the comment:

+1, for adding the assertion. It's not trivial to see that env_file must be 
NULL here, even for me (a human).

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

I still plan to rewrite getpath.c C file in Python: 
https://bugs.python.org/issue42260 But it's an incompatible change and a low 
priority for me.

--
nosy: +vstinner
versions:  -Python 3.8

___
Python tracker 

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



[issue44283] Add jump table for certain safe match-case statements

2021-06-02 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj

___
Python tracker 

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



[issue44286] venv activate script would be good to show failure.

2021-06-02 Thread john kim


New submission from john kim :

I changed the path of the project using venv, so it didn't work properly.

I thought it worked successfully because there was a (venv) on the terminal 
line.

However, the __VENV_DIR__ in the 

set "VIRTUAL_ENV=__VENV_DIR__" 

in the activate script did not work properly because it was the PATH before the 
replacement.

How about adding a procedure to verify the __VENV_DIR__ is a valid PATH to the 
Activate Script?

--
components: Library (Lib)
messages: 394909
nosy: idle947
priority: normal
severity: normal
status: open
title: venv activate script would be good to show failure.
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue44284] Python references wrong line but correct line number in traceback

2021-06-02 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Unupdated source file in traceback

___
Python tracker 

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



[issue44280] unittest filters out too many assertion stack frames from context/cause chains

2021-06-02 Thread Irit Katriel


Irit Katriel  added the comment:

Agreed.

--
nosy: +iritkatriel
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> unittest swallows part of stack trace when raising 
AssertionError in a TestCase

___
Python tracker 

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



[issue20393] Docs: mark deprecated items in the TOC

2021-06-02 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue39170] Sqlite3 row_factory for attribute access: NamedRow

2021-06-02 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also bpo-13299

--

___
Python tracker 

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



[issue13299] namedtuple row factory for sqlite3

2021-06-02 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also bpo-39170

--

___
Python tracker 

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



[issue40199] Invalid escape sequence DeprecationWarnings don't trigger by default

2021-06-02 Thread Aaron Gallagher


Aaron Gallagher <_...@habnab.it> added the comment:

This is definitely not windows-specific. On macos:

$ python3.9
Python 3.9.4 (default, Apr  5 2021, 01:47:16)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '\s'
'\\s'

--
nosy: +habnabit

___
Python tracker 

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



[issue41611] IDLE: problems with completions on Mac

2021-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 7.0 -> 8.0
pull_requests: +25083
pull_request: https://github.com/python/cpython/pull/26487

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Buildbots are very unstable these days. I propose to revert the change to give 
more time to IDLE developers to investigate the issue, and to be able to 
identify other regressions on buildbots.
https://pythondev.readthedocs.io/ci.html#revert-on-fail

I created https://github.com/python/cpython/pull/26487 to revert

--
nosy: +vstinner

___
Python tracker 

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



[issue44287] test_asyncio: test_popen() failed on AMD64 Windows8.1 Refleaks 3.9

2021-06-02 Thread STINNER Victor

New submission from STINNER Victor :

AMD64 Windows8.1 Refleaks 3.9:
https://buildbot.python.org/all/#/builders/6/builds/31

2:16:22 load avg: 7.33 [364/425/2] test_asyncio crashed (Exit code 1) -- 
running: test_decimal (2 min 33 sec), test_dbm (2 min 53 sec), test_bufio (18 
min 18 sec)
["test_asyncio", 0, 268.7466852, null]
beginning 6 repetitions
123456
D:\buildarea\3.9.ware-win81-release.refleak\build\lib\subprocess.py:1052: 
ResourceWarning: subprocess 2724 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
D:\buildarea\3.9.ware-win81-release.refleak\build\lib\asyncio\windows_utils.py:112:
 ResourceWarning: unclosed 
  _warn(f"unclosed {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
D:\buildarea\3.9.ware-win81-release.refleak\build\lib\asyncio\windows_utils.py:112:
 ResourceWarning: unclosed 
  _warn(f"unclosed {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
D:\buildarea\3.9.ware-win81-release.refleak\build\lib\asyncio\windows_utils.py:112:
 ResourceWarning: unclosed 
  _warn(f"unclosed {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
test test_asyncio failed -- Traceback (most recent call last):
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\test_asyncio\test_windows_utils.py",
 line 111, in test_popen
self.assertEqual(res, _winapi.WAIT_OBJECT_0)
AssertionError: 258 != 0

Traceback (most recent call last):
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 906, in temp_dir
yield path
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 958, in temp_cwd
yield cwd_dir
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\libregrtest\main.py",
 line 638, in main
self._main(tests, kwargs)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\libregrtest\main.py",
 line 658, in _main
run_tests_worker(self.ns, self.worker_test_name)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\libregrtest\runtest_mp.py",
 line 86, in run_tests_worker
sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 329, in _force_run
return func(*args)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 
'D:\\buildarea\\3.9.ware-win81-release.refleak\\build\\build\\test_python_6648�\\test_python_worker_1760�'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\buildarea\3.9.ware-win81-release.refleak\build\lib\runpy.py", line 
197, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "D:\buildarea\3.9.ware-win81-release.refleak\build\lib\runpy.py", line 
87, in _run_code
exec(code, run_globals)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\regrtest.py", line 
47, in 
_main()
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\regrtest.py", line 
43, in _main
main()
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\libregrtest\main.py",
 line 716, in main
Regrtest().main(tests=tests, **kwargs)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\libregrtest\main.py",
 line 638, in main
self._main(tests, kwargs)
  File "D:\buildarea\3.9.ware-win81-release.refleak\build\lib\contextlib.py", 
line 135, in __exit__
self.gen.throw(type, value, traceback)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 958, in temp_cwd
yield cwd_dir
  File "D:\buildarea\3.9.ware-win81-release.refleak\build\lib\contextlib.py", 
line 135, in __exit__
self.gen.throw(type, value, traceback)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 911, in temp_dir
rmtree(path)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 452, in rmtree
_rmtree(path)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 393, in _rmtree
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 340, in _waitfor
func(pathname)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 393, in 
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
  File 
"D:\buildarea\3.9.ware-win81-release.refleak\build\lib\test\support\__init__.py",
 line 335, in _force_run
return 

[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

On the main branch, I can reproduce test_pha_required_nocert() failure:

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\main>python -m test test_ssl -u all 
-v -F -j5 -m test_pha_required_nocert

test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ...  server:  
new connection from ('127.0.0.1', 57456)
 client cert is None
 client did not provide a cert
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
TLS: (, 'write', 
TLSVersion.TLSv1_3, _TLSContentType.ALERT, _TLSAlertType.CERTIFICA
TE_REQUIRED, b'\x02t')
Test server failure:
Traceback (most recent call last):
   File "C:\vstinner\python\main\lib\test\test_ssl.py", line 2444, in run
msg = self.read()
   File "C:\vstinner\python\main\lib\test\test_ssl.py", line 2421, in read
return self.sslconn.read()
   File "C:\vstinner\python\main\lib\ssl.py", line 1131, in read
return self._sslobj.read(len)
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a 
certificate (_ssl.c:2522)
FAIL

==
FAIL: test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth)
--
Traceback (most recent call last):
  File "C:\vstinner\python\main\lib\test\test_ssl.py", line 4458, in 
test_pha_required_nocert
with self.assertRaisesRegex(
AssertionError: SSLError not raised

--

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset bdb56902a3bfe12b10f85a941d5dd0eae739f1a8 by stratakis in branch 
'main':
bpo-44285: getpath.c: Assert that env_file is NULL during an error check 
(GH-26486)
https://github.com/python/cpython/commit/bdb56902a3bfe12b10f85a941d5dd0eae739f1a8


--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

Please note that the referenced PR is not the correct one.

I'll add a link to the right one shortly.

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

The latest PR where changes were made to IDLE's colorizer and its tests, 
including specifically adding the problematic test, is GH-25851.

--

___
Python tracker 

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



[issue44288] unittest: _is_relevant_tb_level() fails because tb.tb_frame.f_globals=None

2021-06-02 Thread STINNER Victor


New submission from STINNER Victor :

Sometimes, when a test fails in the main branch, unittest fails with the 
following error:

...
  File "C:\vstinner\python\main\lib\unittest\result.py", line 205, in 
_is_relevant_tb_level
return '__unittest' in tb.tb_frame.f_globals
TypeError: argument of type 'NoneType' is not iterable

I only see this error in the main branch, so I suspect that it's a recent 
change.

Mark, Guido: can it be related to the recent optimization work?


Full log:

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\main>python -u -m test test_ssl -u 
all -v -m test_pha_required_nocert -F -j5
(...)
0:00:27 load avg: 15.68 [ 47/1] test_ssl failed
test_ssl: testing with 'OpenSSL 1.1.1k  25 Mar 2021' (1, 1, 1, 11, 15)
  under Windows ('10', '10.0.19043', 'SP0', 'Multiprocessor Free')
  HAS_SNI = True
  OP_ALL = 0x-7fac
  OP_NO_TLSv1_1 = 0x1000
test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ...  server:  
new connection from ('127.0.0.1', 57613)
 client cert is None
 client did not provide a cert
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
TLS: (, 'write', 
TLSVersion.TLSv1_3, _TLSContentType.ALERT, _TLSAlertType.CERTIFICA
TE_REQUIRED, b'\x02t')
Test server failure:
Traceback (most recent call last):
   File "C:\vstinner\python\main\lib\test\test_ssl.py", line 2444, in run
msg = self.read()
   File "C:\vstinner\python\main\lib\test\test_ssl.py", line 2421, in read
return self.sslconn.read()
   File "C:\vstinner\python\main\lib\ssl.py", line 1131, in read
return self._sslobj.read(len)
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a 
certificate (_ssl.c:2522)
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
2)
Warning -- Dangling thread: 
Warning -- Dangling thread: <_MainThread(MainThread, started 1592)>
Warning -- threading._dangling was modified by test_ssl
  Before: {}
  After:  {, }
test test_ssl crashed -- Traceback (most recent call last):
  File "C:\vstinner\python\main\lib\test\libregrtest\runtest.py", line 282, in 
_runtest_inner
refleak = _runtest_inner2(ns, test_name)
  File "C:\vstinner\python\main\lib\test\libregrtest\runtest.py", line 246, in 
_runtest_inner2
test_runner()
  File "C:\vstinner\python\main\lib\test\test_ssl.py", line 5010, in test_main
support.run_unittest(*tests)
  File "C:\vstinner\python\main\lib\test\support\__init__.py", line 1083, in 
run_unittest
_run_suite(suite)
  File "C:\vstinner\python\main\lib\test\support\__init__.py", line 960, in 
_run_suite
result = runner.run(suite)
  File "C:\vstinner\python\main\lib\unittest\runner.py", line 176, in run
test(result)
  File "C:\vstinner\python\main\lib\unittest\suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\main\lib\unittest\suite.py", line 122, in run
test(result)
  File "C:\vstinner\python\main\lib\unittest\suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\main\lib\unittest\suite.py", line 122, in run
test(result)
  File "C:\vstinner\python\main\lib\unittest\case.py", line 652, in __call__
return self.run(*args, **kwds)
  File "C:\vstinner\python\main\lib\unittest\case.py", line 600, in run
self._feedErrorsToResult(result, outcome.errors)
  File "C:\vstinner\python\main\lib\unittest\case.py", line 516, in 
_feedErrorsToResult
result.addFailure(test, exc_info)
  File "C:\vstinner\python\main\lib\test\support\testresult.py", line 123, in 
addFailure
super().addFailure(test, err)
  File "C:\vstinner\python\main\lib\unittest\runner.py", line 75, in addFailure
super(TextTestResult, self).addFailure(test, err)
  File "C:\vstinner\python\main\lib\unittest\result.py", line 17, in inner
return method(self, *args, **kw)
  File "C:\vstinner\python\main\lib\unittest\result.py", line 122, in addFailure
self.failures.append((test, self._exc_info_to_string(err, test)))
  File "C:\vstinner\python\main\lib\unittest\result.py", line 182, in 
_exc_info_to_string
length = self._count_relevant_tb_levels(tb)
  File "C:\vstinner\python\main\lib\unittest\result.py", line 209, in 
_count_relevant_tb_levels
while tb and not self._is_relevant_tb_level(tb):
  File "C:\vstinner\python\main\lib\unittest\result.py", line 205, in 
_is_relevant_tb_level
return '__unittest' in tb.tb_frame.f_globals
TypeError: argument of type 'NoneType' is not iterable

--
components: Interpreter Core
messages: 394920
nosy: gvanrossum, mark.dickinson, vstinner
priority: normal
severity: normal
status: open
title: unittest: _is_relevant_tb_level() fails because 
tb.tb_frame.f_globals=None
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
htt

[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

I'm investigating this now. If nothing obvious comes up, I'll revert that PR.

--

___
Python tracker 

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



[issue44289] tarfile.is_tarfile() modifies file object's current position

2021-06-02 Thread Andrzej Mateja


New submission from Andrzej Mateja :

Since Python 3.9 tarfile.is_tarfile accepts not only paths but also files and 
file-like objects (bpo-29435).

Verification if a file or file-like object is a tar file modifies file object's 
current position.

Imagine a function listing names of all tar archive members but checking first 
if this is a valid tar archive. When its argument is a str or pathlib.Path this 
is quite straightforward. If the argument is a file of file-like object then 
current position must be reset or TarFile.getmembers() returns empty list.

import tarfile


def list_tar(archive):
if tarfile.is_tarfile(archive):
kwargs = {'fileobj' if hasattr(archive, 'read') else 'name': archive}
t = tarfile.open(**kwargs)
return [member.name for member in t.getmembers()]
return []


if __name__ == '__main__':
path = 'archive.tar.gz'
print(list_tar(path))
print(list_tar(open(path, 'rb')))


['spam.py', 'ham.py', 'bacon.py', 'eggs.py']
[]

--
components: Library (Lib)
messages: 394922
nosy: mateja.and
priority: normal
severity: normal
status: open
title: tarfile.is_tarfile() modifies file object's current position
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



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

2021-06-02 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue44289] tarfile.is_tarfile() modifies file object's current position

2021-06-02 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +25084
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26488

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


STINNER Victor  added the comment:

> Refleak buildbots should get a longer timeout for the "test" step.

I changed buildbot Test step timeout from 3 hours to 4 hours:

* 
https://github.com/python/buildmaster-config/commit/9e0c812694d6fa599b4c8890045ed006fe7c1f6b
* https://github.com/python/buildmaster-config/pull/252

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25085
pull_request: https://github.com/python/cpython/pull/26489

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

> FAIL: test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth)

When this bug occurs, s.recv(1024) returns an empty byte string (b'').

I wrote PR 26489 to handle this case.

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

On Ubuntu 20.04, I've managed to occasionally get this issue to reproduce 
locally by running the test many times in parallel, repeatedly:

parallel -n8 -N0 './python -m test -ugui test_idle -m test_colorizer' ::: $(seq 
20)

This appears to be an issue with our new method of running tests with a Tk 
mainloop in the background, using the @run_in_tk_mainloop decorator.

Investigating further.

--

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread STINNER Victor


New submission from STINNER Victor :

x86-64 macOS 3.x:
https://buildbot.python.org/all/#/builders/366/builds/322

The build 322 is the first error. Build 320 was fine, 321 failed with "retry 
lost connection test (retry)".

(...)
gcc -c  -Wno-unused-result -Wsign-compare -g -O0 -Wall -Qunused-arguments  
-Qunused-arguments   -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Wstrict-prototypes 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal 
 -I. -I./Include-DPy_BUILD_CORE -o Modules/_math.o Modules/_math.c
 CC='gcc' LDSHARED='gcc -bundle -undefined dynamic_lookup' OPT='-g -O0 
-Wall'   _TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python.exe -E ./setup.py 
 build
running build
running build_ext
error: [Errno 2] No such file or directory: 
'/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'
make: *** [sharedmods] Error 1
program finished with exit code 2
elapsedTime=29.576823

--
components: Build
messages: 394926
nosy: ned.deily, ronaldoussoren, vstinner
priority: normal
severity: normal
status: open
title: x86-64 macOS 3.x buildbot build failed with: No such file or directory: 
'/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'
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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 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



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

2021-06-02 Thread Brandt Bucher


Brandt Bucher  added the comment:

Hm, that benchmark seems really noisy. Looking at your code, it appears that 
you aren't actually iterating over the results.

I've attached a version of your benchmark rewritten to use pyperf. Here are the 
results on a system with a fresh PGO/LTO build of CPython main, run with CPU 
isolation:

(py) bucher@is-bucher-p1:~/src/patmaperformance$ sudo $(which pyperf) system 
tune > /dev/null
(py) bucher@is-bucher-p1:~/src/patmaperformance$ sudo $(which python) 
if_match.py --rigorous
.
if: Mean +- std dev: 2.16 ms +- 0.13 ms
.
match: Mean +- std dev: 2.13 ms +- 0.07 ms

It appears that there is no significant difference between the two (which is 
what I expect, given the current implementation). With that said, our work in 
issue 44283 will likely have a significant impact for cases like this.

--
Added file: https://bugs.python.org/file50083/if_match.py

___
Python tracker 

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



[issue41611] IDLE: problems with completions on Mac

2021-06-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests:  -25083

___
Python tracker 

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



[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-06-02 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I'm not sure I understand why the discussion was focused on removing *all* 
empty values.

Consider this in a context of a cvs-like string:

1. 'a,b,c' => [a,b,c]# of course
2. ',,'=> ['','',''] # follows naturally from above
3. ''  => [] # arguably most intuitive
4. ''  => ['']   # less intuitive but can be correct

>From the point of view of intent of the initial string, the first two
are clear - 3 values are provided, in 2) they just happen to be empty.
It's up to the later logic to skip empty values if needed.

The empty string is ambiguous because the intent may be no values or a single 
empty value.

So ideally the new API would let me choose explicitly between 3) and 4). But I 
don't see why it would affect 2) !!

The processing of 2) is already not ambiguous. That's what I would want any 
version of split() to do, and later filter or skip empty values.

Current patch either forces me to choose 4) or to explicitly choose but
also break normal, "correct" handling of 2). 

It can lead to bugs as follows:

Let's say I have a csv-like string:

col1,col2,col3
1,2,3

a,b,c

I note that row 2 creates an empty col1 value, which is probably not what I 
want. I look at split() args and think that keepempty=False is designed for 
this use case. I use it in my code. Next time the code will break when someone 
adds a row:

a,,c

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
Removed message: https://bugs.python.org/msg394871

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Ned Deily


Ned Deily  added the comment:

I can't reproduce that failure with that checkout and I'm not even entirely 
sure where that error is coming from. My guess it that something went wrong 
during the previous build that resulted in the connection lost (a system crash 
perhaps?) that left the build area or the file system in an unusual state.

@mattbillenstein, could you check the buildbot and perhaps delete the build 
directory?

--
nosy: +mattbillenstein

___
Python tracker 

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



[issue44286] venv activate script would be good to show failure.

2021-06-02 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein


Matt Billenstein  added the comment:

I rebuilt it a while ago which could have caused this - can you re-run the
affected build?

thx

m

On Wed, Jun 02, 2021 at 06:08:16PM +, Ned Deily wrote:
> 
> Ned Deily  added the comment:
> 
> I can't reproduce that failure with that checkout and I'm not even entirely 
> sure where that error is coming from. My guess it that something went wrong 
> during the previous build that resulted in the connection lost (a system 
> crash perhaps?) that left the build area or the file system in an unusual 
> state.
> 
> @mattbillenstein, could you check the buildbot and perhaps delete the build 
> directory?
> 
> --
> nosy: +mattbillenstein
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Ned Deily


Ned Deily  added the comment:

Hmm, I just tried to restart it from the builbot page but the build request is 
just sitting there ATM.

https://buildbot.python.org/all/#/builders/366

--

___
Python tracker 

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



[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-06-02 Thread Kirill Pinchuk


New submission from Kirill Pinchuk :

Probably we should make the behavior of SysLogHandler consistent with other 
Socket handlers.

Right now SocketHandler and DatagramHandler implement such behavior:

1) on `close` set `self.socket = None`
2) when trying to send - make socket when it is None


SysLogHandler doesn't implement this behavior and when you close the socket for 
some reason (eg. restart of uWSGI server on code change) it leaves it in the 
closed state, then raises an error when you try to send any message because it 
is closed

```
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.9/logging/handlers.py", line 959, in emit
self.socket.sendto(msg, self.address)
OSError: [Errno 9] Bad file descriptor

```

--
components: Library (Lib)
messages: 394932
nosy: Kirill Pinchuk
priority: normal
severity: normal
status: open
title: Unify logging.handlers.SysLogHandler behavior with SocketHandlers
type: enhancement
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



[issue40199] Invalid escape sequence DeprecationWarnings don't trigger by default

2021-06-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Ah, there is a difference between debug and regular builds. I tested with the 
debug build.

--
components: +Interpreter Core -Windows
nosy: +ncoghlan, vstinner -paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein


Matt Billenstein  added the comment:

Hmm, digging, afaict the buildbot-worker is up and running - something on the
master? I just updated my setup to use python3 instead of python2...

On Wed, Jun 02, 2021 at 06:24:23PM +, Ned Deily wrote:
> 
> Ned Deily  added the comment:
> 
> Hmm, I just tried to restart it from the builbot page but the build request 
> is just sitting there ATM.
> 
> https://buildbot.python.org/all/#/builders/366
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-06-02 Thread Kirill Pinchuk


Kirill Pinchuk  added the comment:

UPD: right now it has reconnection logic for unixsocket but not for tcp/udp

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The confusion is my fault: PR-26404 is where I first saw this failure, for the 
previously added tests, not where the test was added.  I unlinked the erroneous 
message.

Running 12 duplicate tests in parallel on Windows on a 6 core (12 CPU) machine 
with

f:\dev\3x>python -m test -j12  -ugui -m test_incremental_editing test_idle 
test_idle test_idle test_idle test_idle test_idle test_idle test_idle test_idle 
test_idle test_idle test_idle

resulted in nearly all failing.  Half or less failed with -j6, usually one with 
-j3, none without -j.  Are the processess failing because of interaction with 
each other?  Or from be switched with other processes?

Back with -j12: increasing the after delay in run_in_tk_mainloop from 1 to 5 
cut the failures down to 0-4 in 12.  Increasing further to 8 resulting in no 
failures.  Note that human keystrokes are at least, say, 50 milliseconds (1/20 
second) apart.

I am reluctant to add a delay that is mostly not needed, so i tried the 
uploaded 'adaptive' code to only add a long delay if needed.  Uploaded.  But 
when a tested failed once, it failed again even with the delay, and contrary to 
the results above.

--
Added file: https://bugs.python.org/file50084/tkinter_testing_utils.py

___
Python tracker 

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



[issue44291] Unify logging.handlers.SysLogHandler behavior with SocketHandlers

2021-06-02 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +25086
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26490

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The other thing I thought is parameterizing the decorator to pass in a delay 
only for this test, but that require another layer of wrapping, which I cannot 
do right now.

So I think we should just add skiptest for now.  In fact, we only need to run 
it when editing colordelagator.

--

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Ned Deily


Ned Deily  added the comment:

Can you say at what point you did the upgrade, i.e. between which two builds 
here?

https://buildbot.python.org/all/#/builders/366

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

> Running 12 duplicate tests in parallel on Windows on a 6 core (12 CPU) 
> machine with [...] resulted in nearly all failing.

Yes, running test_idle in parallel with itself usually causes some failures due 
to UI focus being stolen from one instance by another.  That's why I just ran 
this test rather than the whole test suite.

> I am reluctant to add a delay that is mostly not needed, so i tried the 
> uploaded 'adaptive' code to only add a long delay if needed.  Uploaded.  But 
> when a tested failed once, it failed again even with the delay, and contrary 
> to the results above.

The delay needs to be placed carefully.  Changing root.after(1, ...) to use 50 
rather than 1 (these are milliseconds) seems to resolve the issue entirely on 
my machine, at the cost of this single test taking 0.4 seconds to run rather 
than about 0.045 seconds.

> The other thing I thought is parameterizing the decorator to pass in a delay 
> only for this test, but that require another layer of wrapping, which I 
> cannot do right now.

I can do that.  Though I fear this may happen for other such tests as well...  
Worth a shot I guess.

--

___
Python tracker 

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



[issue44277] cpython forks are spammed with dependabot PRs

2021-06-02 Thread Dominic Davis-Foster


Dominic Davis-Foster  added the comment:

There's an open issue on GitHub, but it hasn't gone anywhere.

https://github.com/dependabot/dependabot-core/issues/2804

--
nosy: +domdfcoding

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

On my machine it running the test many times with parallelization no longer 
causes any failures with this change.  Also, running other tests which us the 
@run_in_tk_mainloop decorator, with the same 1ms delay as before, doesn't cause 
any such failures.  PR forthcoming.

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +25087
pull_request: https://github.com/python/cpython/pull/26491

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread Tal Einat


Tal Einat  added the comment:

See PR GH-26491.

--

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Matt Billenstein


Matt Billenstein  added the comment:

Probably at 321 where it lost connection - I would have shut it down and wiped
the buildarea.

I'm not sure what's going on now, I'm walking back versions of buildbot-worker
and they seem to never connect to the master...

m

On Wed, Jun 02, 2021 at 07:25:49PM +, Ned Deily wrote:
> 
> Ned Deily  added the comment:
> 
> Can you say at what point you did the upgrade, i.e. between which two builds 
> here?
> 
> https://buildbot.python.org/all/#/builders/366
> 
> --
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 320eaa7f42b413cd5e5436ec92d4dc5ba150395f by Victor Stinner in 
branch 'main':
bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
https://github.com/python/cpython/commit/320eaa7f42b413cd5e5436ec92d4dc5ba150395f


--

___
Python tracker 

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



[issue44277] cpython forks are spammed with dependabot PRs

2021-06-02 Thread Zachary Ware


Zachary Ware  added the comment:

In that case, closing as third-party.

--
resolution:  -> third party
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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Ned Deily


Ned Deily  added the comment:

Perhaps one of the buildbot experts can help?  Zach? Pablo? Victor?

--
nosy: +pablogsal, zach.ware

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-06-02 Thread Brandon Weeks


Change by Brandon Weeks :


--
nosy: +bweeks

___
Python tracker 

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



[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-06-02 Thread jakirkham


jakirkham  added the comment:

Would it be possible to check for these newer OpenSSL symbols during the builds 
of Python 3.8 & 3.9 (using them when available and otherwise falling back to 
the older API otherwise)? This would allow people to build Python 3.8 & 3.9 
with the newer OpenSSL benefiting from the fix

That said, not sure if there are other obstacles to using OpenSSL 1.1.1 with 
Python 3.8 & 3.9

--
nosy: +jakirkham

___
Python tracker 

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



[issue44292] contextmanager + ExitStack.pop_all()

2021-06-02 Thread Luca Mattiello

New submission from Luca Mattiello :

Reading the contextlib documentation, one might assume the following to be 
functionally equivalent, when used in a with statement:

@contextlib.contextmanager
def managed_resource():
  resource = acquire()
  try:
yield resource
  finally:
resource.release()

class ManagedResource:
  def __init__(self):
self.resource = acquire()
  def __enter__(self):
return self.resource
  def __exit__(self, *args):
self.resource.release()

However, the first version has a seemingly unexpected behavior when used in 
conjunction with an ExitStack, and pop_all().

with contextlib.ExitStack() as es:
  r = es.enter_context(managed_resource())
  es.pop_all()
  # Uh-oh, r gets released anyway

with contextlib.ExitStack() as es:
  r = es.enter_context(ManagedResource())
  es.pop_all()
  # Works as expected

I think the reason is 
https://docs.python.org/3/reference/expressions.html#yield-expressions, in 
particular

> Yield expressions are allowed anywhere in a try construct.
> If the generator is not resumed before it is finalized (by
> reaching a zero reference count or by being garbage collected),
> the generator-iterator’s close() method will be called,
> allowing any pending finally clauses to execute.

I guess this is working according to the specs, but I found it very 
counter-intuitive. Could we improve the documentation to point out this subtle 
difference?

Full repro:

import contextlib

@contextlib.contextmanager
def cm():
  print("acquire cm")
  try:
yield 1
  finally:
print("release cm")

class CM:
  def __init__(self):
print("acquire CM")
  def __enter__(self):
return 1
  def __exit__(self, *args):
print("release CM")

def f1():
  with contextlib.ExitStack() as es:
es.enter_context(cm())
es.pop_all()

def f2():
  with contextlib.ExitStack() as es:
es.enter_context(CM())
es.pop_all()

f1()
f2()

Output:

acquire cm
release cm
acquire CM

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 394948
nosy: docs@python, lucae.mattiello
priority: normal
severity: normal
status: open
title: contextmanager + ExitStack.pop_all()
versions: 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



[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm not sure the original version needs improving.

This sounds like a problem understanding how warnings work.

Do you really want to say that for warnings, they're sometimes handled by the 
warning machinery and therefore don't get passed along to the calling code? It 
seems to me that you'd need to explain that everywhere the documents discuss 
handling exceptions. I don't think this one place is more special than others.

--

___
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-02 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue44293] PEP 585 breaks inspect.isclass

2021-06-02 Thread Joseph Perez


New submission from Joseph Perez :

PEP 585 has the side-effect of making `list[int]` an instance of `type`. This 
is not the case for other generic aliases.

It also implies that `inspect.isclass(list[int]) is True`, while `list[int]` is 
not a class; as a proof of this statement `issubclass(list[int], 
collections.abc.Collection)` raises `TypeError: issubclass() arg 1 must be a 
class`.

By the way, there is the awkward thing of having `isinstance(list[int], type) 
is True` while `issubclass(type(list[int]), type) is False`.

--
messages: 394950
nosy: joperez
priority: normal
severity: normal
status: open
title: PEP 585 breaks inspect.isclass
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



[issue44294] 3.9.5 Windows 64-bit installer says v3.8.10 in startup window.

2021-06-02 Thread Sunny Jamshedji


New submission from Sunny Jamshedji :

Downloaded Windows 64 bit installer from:

https://www.python.org/downloads/windows/

Link said:

https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe

It downloaded what appears to be 3.8.10 installer. I launched it and I got the 
attached screenshot with 3.8.10 installer.

Tested it out 4 times. First 2 times it did the same thing. While testing the 
third time, acquiring screenshots so it took longer, it gave me the correct 
file! IDK what happened, unless you guys fixed it in between!

--
components: Installation
files: 1. Python for Windows Download Page.png
messages: 394951
nosy: sunnyjamshedji
priority: normal
severity: normal
status: open
title: 3.9.5 Windows 64-bit installer says v3.8.10 in startup window.
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50085/1. Python for Windows Download 
Page.png

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I don't see anything relevant in the logs. These are the last messages 
regarding this worker:

2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS 3.7
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS custom
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS 3.8
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS 3.10
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS PR
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS 3.9
2021-06-02 18:38:26+ [-] Worker billenstein-macos detached from x86-64 
macOS 3.x

--

___
Python tracker 

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



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

2021-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25089
pull_request: https://github.com/python/cpython/pull/26493

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +25091
pull_request: https://github.com/python/cpython/pull/26495

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25092
pull_request: https://github.com/python/cpython/pull/26496

___
Python tracker 

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



[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-06-02 Thread Anthony Sottile


New submission from Anthony Sottile :

it's missing stacklevel= -- mostly creating a bpo issue to link to

--
messages: 394953
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: self.assertDictContainsSubset warning is unhelpful
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



[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-06-02 Thread Anthony Sottile


Change by Anthony Sottile :


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

___
Python tracker 

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



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

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Most projects broken by Py_TYPE and Py_SIZE changes have been fixed since last 
year. I succeeded to use my new pythoncapi_compat project on multiple C 
extensions. So I propose again to convert Py_TYPE and Py_SIZE macros to static 
inline functions: https://github.com/python/cpython/pull/26493

I also proposed to promote the pythoncapi_compat project in the "C API: Porting 
to Python 3.10" section of "What's New In Python 3.10?" on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/KHDZGCNOYEDUTSPAATUDP55ZSSQM5RRC/

I already announced the pythoncapi_compat project on the capi-sig last December:
https://mail.python.org/archives/list/capi-...@python.org/thread/LFLXFMKMZ77UCDUFD5EQCONSAFFWJWOZ/

--

___
Python tracker 

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



[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-06-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25094
pull_request: https://github.com/python/cpython/pull/26498

___
Python tracker 

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



[issue43921] test_ssl fails on Windows buildbots

2021-06-02 Thread miss-islington


miss-islington  added the comment:


New changeset e5e93e6145090a636e67766a53b758d7ac78e3ad by Miss Islington (bot) 
in branch '3.10':
bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
https://github.com/python/cpython/commit/e5e93e6145090a636e67766a53b758d7ac78e3ad


--

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread miss-islington


miss-islington  added the comment:


New changeset 0e9af8cae314e4b0e770fe48d5f7b5f540c0b257 by Miss Islington (bot) 
in branch '3.10':
bpo-44285: getpath.c: Assert that env_file is NULL during an error check 
(GH-26486)
https://github.com/python/cpython/commit/0e9af8cae314e4b0e770fe48d5f7b5f540c0b257


--

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 85b587a38dcf5d0ef1e275510001e22425d65977 by Miss Islington (bot) 
in branch '3.9':
bpo-44285: getpath.c: Assert that env_file is NULL during an error check 
(GH-26486) (GH-26496)
https://github.com/python/cpython/commit/85b587a38dcf5d0ef1e275510001e22425d65977


--

___
Python tracker 

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



[issue44285] Coverity scan: Modules/getpath.c. "calculate_open_pyenv" allocates memory that is stored into "env_file".

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Charalampos, it's now fixed in 3.9, 3.10 and main branches.

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset adef445dc34685648bd0ea1c125df2ef143912ed by Tal Einat in branch 
'main':
bpo-44282: Fix occasional test_incremental_editing failures on buildbots 
(GH-26491)
https://github.com/python/cpython/commit/adef445dc34685648bd0ea1c125df2ef143912ed


--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +25095
pull_request: https://github.com/python/cpython/pull/26499

___
Python tracker 

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



[issue44296] Should warnings.warn default to stacklevel=2?

2021-06-02 Thread Anthony Sottile


New submission from Anthony Sottile :

I have yet to come across a usecase where `stacklevel=1` makes sense -- usually 
it is more helpful to point at the calling code than the function which is 
itself warning

my proposal is to update the default for `stacklevel=` from `1` to `2`

an example bpo where this is relevant is bpo-44295

--
components: Library (Lib)
messages: 394960
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: Should warnings.warn default to stacklevel=2?
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue44290] x86-64 macOS 3.x buildbot build failed with: No such file or directory: '/Users/buildbot/buildarea/3.x.billenstein-macos/build/target/include/python3.11d/pyconfig.h'

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

> Hmm, I just tried to restart it from the builbot page but the build request 
> is just sitting there ATM.
> https://buildbot.python.org/all/#/builders/366

Not sure what happened. I restarted the buildbot server manually. I cancelled 
the old manual build and scheduled a new manual build which is now running.

--

___
Python tracker 

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



[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9c89d62073fa0bcfe68e59add5b55fbcbf7672ab by Miss Islington (bot) 
in branch '3.10':
bpo-44282: Fix occasional test_incremental_editing failures on buildbots 
(GH-26491) (GH-26499)
https://github.com/python/cpython/commit/9c89d62073fa0bcfe68e59add5b55fbcbf7672ab


--

___
Python tracker 

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



[issue44293] PEP 585 breaks inspect.isclass

2021-06-02 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

The reason for this is that types.GenericAlias.__getattribute__ delegates to 
the alias's origin (in the `ga_getattro` function). As a result, 
`list[int].__class__` calls `list.__class__` and returns `type`. And the 
implementation of `isinstance(obj, type)` ultimately calls 
`issubclass(obj.__class__, type)`. (That's in `object_isinstance()` in 
abstract.c. It's news to me; I didn't know you could customize isinstance() 
behavior on the object side.)

To fix this, we could make `ga_getattro` not delegate for `__class__`, so that 
`list[int].__class__` would return `GenericAlias` instead of `type`. The 
current implementation of GenericAlias has been around for a few releases by 
now, though, so that change might break some use cases.

> This is not the case for other generic aliases.

This is not true; it is the same for e.g. `set[int]`. Unless you meant 
something else here.

--
nosy: +Jelle Zijlstra, gvanrossum, kj, levkivskyi

___
Python tracker 

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



[issue43568] Drop support for Mac OS X < 10.3 module linking

2021-06-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 991693a217363243b0bd33887852d6b3959b99a1 by Joshua Root in branch 
'3.9':
[3.9] bpo-43568: Relax distutils MACOSX_DEPLOYMENT_TARGET check (GH-25827) 
(GH-26001)
https://github.com/python/cpython/commit/991693a217363243b0bd33887852d6b3959b99a1


--

___
Python tracker 

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



[issue37741] importlib.metadata docs not showing up in the module index

2021-06-02 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +25096
pull_request: https://github.com/python/cpython/pull/26500

___
Python tracker 

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



  1   2   >