[issue44402] Python 3.9 and 3.10 fails to install in WINE

2021-06-11 Thread Samuel Marks

New submission from Samuel Marks :

What works:
- python-3.7.9.exe  python-3.8.9.exe

What fails:
- python-3.10.0b2.exe  python-3.9.5.exe

(I'm debugging some regressions on my test suite… macOS and Linux [incl. in 
Docker] work, Windows fails)

How to reproduce (macOS):
0. Install WINE (crossover) 
https://github.com/Gcenx/homebrew-wine#how-to-install-using-brew
1. wine python-.exe /quiet /passive /log c:/p.log 
TargetDir=C:/python- InstallAllUsers=1 Include_doc=0 Include_debug=0 
Include_dev=0 Include_exe=1 Include_launcher=0 Include_lib=1 Include_pip=1 
Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0
2. curl https://bootstrap.pypa.io/get-pip.py -o http://get-pip.py
3. wine "C:\\python-\\python.exe" http://get-pip.py

(replacing ``; obviously)

Error:
```
000b:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
000d:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0010:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0017:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
001d:err:plugplay:process_IOService_Device object 0x9203
001d:err:plugplay:process_IOService_Device Unable to create plug in interface 
for USB deviceobject 0x9207
001f:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0009:fixme:heap:RtlSetHeapInformation 0x0 1 0x0 0 stub
0025:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0009:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
0009:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
0009:fixme:advapi:DecryptFileW 
(L"C:\\windows\\Temp\\{FDB2F91C-29EE-4A75-AAA5-39F402CF12ED}\\", ): stub
002b:fixme:heap:RtlSetHeapInformation 0x0 1 0x0 0 stub
002b:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
002b:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
002b:fixme:advapi:DecryptFileW 
(L"C:\\windows\\Temp\\{3F224591-5EEC-4431-8291-2450B9ECC110}\\", ): stub
002e:fixme:shell:SHAutoComplete stub
002b:fixme:ver:GetCurrentPackageId (0x31fd04 0x0): stub
0009:fixme:ver:GetCurrentPackageId (0x31fd04 0x0): stub
```

Expected (`uniq` output of a successful install of 3.8):
```
000b:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
000d:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0010:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0017:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
001d:err:plugplay:process_IOService_Device object 0x6a03
001d:err:plugplay:process_IOService_Device Unable to create plug in interface 
for USB deviceobject 0x6a07
001f:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0009:fixme:heap:RtlSetHeapInformation 0x0 1 0x0 0 stub
0025:fixme:thread:create_user_shared_data_thread Creating user shared data 
update thread.
0009:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
0009:fixme:advapi:DecryptFileW 
(L"C:\\windows\\Temp\\{86717C64-3933-4B4D-9283-CEA5CD0F5EBB}\\", ): stub
002b:fixme:heap:RtlSetHeapInformation 0x0 1 0x0 0 stub
002b:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
002b:fixme:advapi:DecryptFileW 
(L"C:\\windows\\Temp\\{9A024DD0-BF6A-4DF1-A034-C61E89E6F711}\\", ): stub
002e:fixme:shell:SHAutoComplete stub
002b:fixme:advapi:DecryptFileW 
(L"C:\\windows\\Temp\\{9A024DD0-BF6A-4DF1-A034-C61E89E6F711}\\", ): stub
002b:fixme:exec:SHELL_execute flags ignored: 0x0100
0030:fixme:heap:RtlSetHeapInformation 0x0 1 0x0 0 stub
0030:fixme:ntdll:NtQueryInformationToken QueryInformationToken( ..., 
TokenElevation, ...) semi-stub
0030:fixme:ole:CoInitializeSecurity 
(0031F458,-1,,,6,2,,12288,) - stub!
0030:fixme:wuapi:automatic_updates_Pause 
0030:fixme:sfc:SRSetRestorePointW 0031F320 0031F530
0033:fixme:advapi:DecryptFileW (L"C:\\ProgramData\\Package 
Cache\\{3854F8D0-6FA6-4227-8047-8DE95B0A7DE7}v3.8.9150.0\\core.msi", ): 
stub
0030:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0033:fixme:advapi:DecryptFileW (L"C:\\ProgramData\\Package 
Cache\\{A3ED59F7-FC59-4793-AEBC-9D3813922BE1}v3.8.9150.0\\exe.msi", ): 
stub
0030:fixme:ntdll:NtQuerySystemInformation info_class 
SYSTEM_PERFORMANCE_INFORMATION
0030:err:mscoree:LoadLibraryShim error reading registry key for installroot
0033:fixme:advapi:DecryptFileW (L"C:\\ProgramData\\Package 
Cache\\{D12B4386-129A-4C17-AB8D-45FD90C6EB0D}v3.8.9150.0\\lib.msi", ): 
stub
0033:fixme:advapi:DecryptFileW (L"C:\\ProgramData\\Package 

[issue41611] IDLE: problems with completions on Mac

2021-06-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue41611] IDLE: problems with completions on Mac

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#40128, which inserted update_idletasks in a different place, fixed completions 
for me in installed 3.9.5.  They already worked fine for me in installed 
3.10.0b2.

#41859 is another report by Raymond of a 'random' ValueError connected with 
completions.  Closed as a duplicate of this.

I opened #44398 about 'cntl+space' being changed to the currently 
non-functional '^S' as the shortcut for Show completions on the macOS Edit 
menu.  ^space does work.  Nearly the same issue as cntl+backslash for Show 
calltip be displayed as the non-functional ^B.

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open
type: behavior -> 

___
Python tracker 

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



[issue44400] Propose random.randbool()

2021-06-11 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Not every one line expression needs to be a function in a library. 
`bool(getrandbits(1))` is self-explanatory enough, and it is doubtful that any 
implementation would be faster.

Using getrandbits(1) to return 0 or 1 is fine; if you need a bool, call bool on 
the result.

Aside: the name getrandbits is a bit sad, there's no setrandbits and we don't 
name the other random functions with a leading "get" prefix:

getrandint(1, 6)


Raymond, would you consider providing an alias randbits and depreciating the 
getrandbits name? We don't have to remove it, just document it as depreciated 
to be removed in Python 5000 :-)

--
nosy: +steven.daprano

___
Python tracker 

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



[issue19094] urljoin should raise a TypeError if URL is not a string

2021-06-11 Thread Jacob Walls


Change by Jacob Walls :


--
pull_requests: +25276
pull_request: https://github.com/python/cpython/pull/26687

___
Python tracker 

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



[issue44401] const kwlist for PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords

2021-06-11 Thread Richard


Change by Richard :


--
keywords: +patch
nosy: +immortalplants
nosy_count: 1.0 -> 2.0
pull_requests: +25274
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26686

___
Python tracker 

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



[issue44401] const kwlist for PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords

2021-06-11 Thread Richard Barnes


New submission from Richard Barnes :

PyArg_ParseTupleAndKeywords and PyArg_VaParseTupleAndKeywords currently accept 
`kwlist` as `char **`; however, is not modified by either function. Therefore, 
a `const char **` might be better since this allows calling code to take 
advantage of `const` safety.

--
components: C API
messages: 395674
nosy: r-barnes
priority: normal
severity: normal
status: open
title: const kwlist for PyArg_ParseTupleAndKeywords and 
PyArg_VaParseTupleAndKeywords
type: security

___
Python tracker 

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



[issue44395] email.message as_string() not writing unixfrom

2021-06-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue44395] email.message as_string() not writing unixfrom

2021-06-11 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue44395] email.message as_string() not writing unixfrom

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



[issue44328] time.monotonic() should use a different clock source on Windows

2021-06-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +belopolsky, p-ganssle, vstinner
versions:  -Python 3.10, 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



[issue44323] install module fail on windows 10

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This tracker is for patching Python doc and CPython implementation.  As near as 
I can tell, you are not reporting a CPython bug.  If so, this issue should be 
closed as 'not a bug'.  Questions about using Python should go to more 
appropriate places, such as python-list.

--
nosy: +terry.reedy

___
Python tracker 

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



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

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I think you should propose this for discussion on python-ideas list to try for 
more support. If you can, say more about why reconsider.

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



[issue44400] Propose random.randbool()

2021-06-11 Thread Dong-hee Na


New submission from Dong-hee Na :

I noticed that the random library does not provide `random.randbool()`.
Generating bool value is quite common in the use-case when we generated faked 
data
(unittest, machine learning training, etc)

Somebody can say write your own library but it's too common use-case and in 
physically some isolated environments is hard to use 3rd party library.

Since the bool value is the built-in type of python, I think that is very 
useful when we provide this function.

I would like to get opinions from Raymond and then proceed with this issue.

Here is the candidate implementation:

def randbool():
return bool(getrandbits(1))

--
components: Library (Lib)
messages: 395671
nosy: corona10, rhettinger
priority: normal
severity: normal
status: open
title: Propose random.randbool()
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for the fix.

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset a9e20cf7bbf3ba39260fca112938f95e4f317efc by Miss Islington (bot) 
in branch '3.9':
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
https://github.com/python/cpython/commit/a9e20cf7bbf3ba39260fca112938f95e4f317efc


--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b441e99d89a3f05210cc36ade57699384986ca00 by Miss Islington (bot) 
in branch '3.10':
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
https://github.com/python/cpython/commit/b441e99d89a3f05210cc36ade57699384986ca00


--

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25272
pull_request: https://github.com/python/cpython/pull/26684

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 3ec3ee7d2e9b45b586e486e429b412d6d0ca530f by Kaustubh J in branch 
'main':
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
https://github.com/python/cpython/commit/3ec3ee7d2e9b45b586e486e429b412d6d0ca530f


--

___
Python tracker 

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



[issue43298] Windows build cannot detect missing Windows SDK

2021-06-11 Thread Steve Dower


Steve Dower  added the comment:

Jason - I think your -add and -remove options need work. I'm pretty sure the 
AzureBuildTools component doesn't bring in the C++ compilers or the WinSDK.

If you configure it manually and interactively, you should be able to export a 
JSON configuration and then you can use that later to recreate the install 
elsewhere.

--

___
Python tracker 

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



[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-11 Thread miss-islington


miss-islington  added the comment:


New changeset 57b3ca7f0aef4d180038d475398f809d3fcdd8be by Miss Islington (bot) 
in branch '3.9':
bpo-41299: Reduce lag in Windows threading timeouts by using a higher precision 
time source (GH-26568)
https://github.com/python/cpython/commit/57b3ca7f0aef4d180038d475398f809d3fcdd8be


--

___
Python tracker 

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



[issue44399] log rotator cookbook example might waste disk space

2021-06-11 Thread mori-b


mori-b  added the comment:

Additional precision : this issue can happen when the log file is shared 
between multiple threads. And naturally also between different processes, which 
is not recommended but can happen by mistake.

--

___
Python tracker 

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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread Steve Dower


Change by Steve Dower :


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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread miss-islington


miss-islington  added the comment:


New changeset 42612db10792dd069149063f67a3b1db700bc7ee by Miss Islington (bot) 
in branch '3.10':
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
https://github.com/python/cpython/commit/42612db10792dd069149063f67a3b1db700bc7ee


--

___
Python tracker 

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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9580d3894ad158ae909e7573a02dcd087de0b673 by Miss Islington (bot) 
in branch '3.9':
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
https://github.com/python/cpython/commit/9580d3894ad158ae909e7573a02dcd087de0b673


--

___
Python tracker 

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



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

2021-06-11 Thread Jack DeVries


Change by Jack DeVries :


--
nosy: +jack__d
nosy_count: 10.0 -> 11.0
pull_requests: +25270
pull_request: https://github.com/python/cpython/pull/26643

___
Python tracker 

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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25269
pull_request: https://github.com/python/cpython/pull/26682

___
Python tracker 

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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44381] Allow enabling control flow guard in Windows build

2021-06-11 Thread Steve Dower


Steve Dower  added the comment:


New changeset 5af56c6f2a0d11df37fed7ecaaf321cf6926ba13 by Steve Dower in branch 
'main':
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
https://github.com/python/cpython/commit/5af56c6f2a0d11df37fed7ecaaf321cf6926ba13


--

___
Python tracker 

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



[issue44398] IDLE: On macOS, cntl-space/backslash display as ^S/^B

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

^B would work as an alternate binding for <> as it is not 
used otherwise, but I prefer not to have to do this.

These are the only named keys other than the 'F#'s.

--

___
Python tracker 

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



[issue44399] log rotator cookbook example might waste disk space

2021-06-11 Thread mori-b


mori-b  added the comment:

In 
https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing,
 the log rotator example deletes the original log file after compressing it. 
However, running on Linux the command "lsof +L1" shows that the deleted 
original log file might still hold the same disk space, and keep growing.
Replacing the command "os.remove(source)" with "os.truncate(source,0)" seems to 
solve the issue by freeing the original log file disk space at each rotation.

--

___
Python tracker 

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



[issue44399] log rotator cookbook example might waste disk space

2021-06-11 Thread mori-b


New submission from mori-b :

In 
https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing,
 the log rotator example deletes the original log file after compressing it. 
However, running on Linux the command "lsof +S1" shows that the deleted 
original log file might still hold the same disk space, and keep growing.
Replacing the command "os.remove(source)" with "os.truncate(source,0)" seems to 
solve the issue by freeing the original log file disk space at each rotation.

--
assignee: docs@python
components: Documentation
messages: 395658
nosy: docs@python, mori-b
priority: normal
severity: normal
status: open
title: log rotator cookbook example might waste disk space
type: resource usage

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Kaustubh J


Change by Kaustubh J :


--
keywords: +patch
nosy: +thsubaku9
nosy_count: 5.0 -> 6.0
pull_requests: +25267
pull_request: https://github.com/python/cpython/pull/26672

___
Python tracker 

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



[issue40128] IDLE Show completions pop-up not working on macOS

2021-06-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

With 3.10.0b2 on my MacBook Air, completions work as far as I tested, with Edit 
=> Show completions, Tab, and ^-Space.

i
i<^-Space>
int.(configered pause)
int.<^-Space, after dismissing box with Esc key>

3.9.5, without the patch, remains buggy.  I attribute the difference to using 
tcl/tk 8.6.11 in 3.10 versus 8.6.8 in 3.9 (and 3.8 and worse previously).

3.9.5, with the patch, the above work.  I will apply the patch in main and then 
backport because other Mac installers may have not switched to 8.6.11, I am not 
sure it never helps with 8.6.11, I prefer to keep active versions in sync, and 
it should not hurt except for a micro slowdown.

I opened #44398 for the hotkey issue.

--
stage:  -> patch review
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue44398] IDLE: On macOS, cntl-space/backslash display as ^S/^B

2021-06-11 Thread Terry J. Reedy


New submission from Terry J. Reedy :

(Related to the more general macOS hotkey issue 18444.)
'Edit => Show completions' invokes pseudoevent <>.  In 
all built-in keysets, the latter is bound to Control-space.  This includes on 
macOS, as can be seen on the Settings Keys tab.

On Windows, and I presume *nix, this is displayed on the menu as 'Cntl+space'.  
On macOS, the menu hotkeys are displayed differently than on other systems 
(how?).  'Cntl+' is condensed to '^', which is fine and which would be okay 
elsewhere.  However, 'space' is condensed to 'S', which is a bug.  Can this be 
fixed?  If not, we could add ^S as an alternate hotkey on macOS.

'^S' causes 'Edit' to flash, indicating, I believe, that it is recognized as an 
Edit menu hotkey.  But nothing happens as IDLE/tk does not recognize it on 
macOS.  (On Windows, it means 'save'.)

^space, currently works to show completions with 3.10.0b2.  The same will be 
true after the PR for #40128 is merged and backported.

The situation is the same for Edit => Show calltip, <>, and 
control-backslash, except that 'backslash' is visible as '\'.  If the hotkey 
were displayed on Windows as 'Cntl+\', perhaps the result on macOS would be the 
correct '^\'.

--
assignee: terry.reedy
components: IDLE, macOS
messages: 395656
nosy: ned.deily, ronaldoussoren, taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: On macOS, cntl-space/backslash display as ^S/^B
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



[issue32275] SSL socket methods don't retry on EINTR?

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



[issue44395] email.message as_string() not writing unixfrom

2021-06-11 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



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

2021-06-11 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



[issue44389] Modules/_ssl.c, repeated 'SSL_OP_NO_TLSv1_2'

2021-06-11 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
keywords: +patch
nosy: +erlendaasland
nosy_count: 1.0 -> 2.0
pull_requests: +25266
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26680

___
Python tracker 

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



[issue44372] Can't install Python3.8, 3.9, 3.10 various errors including 0x80070643

2021-06-11 Thread Steve Dower


Steve Dower  added the comment:

Sorry, you've reported a range of issues here and it's not clear what the 
problem is.

Many many people (literally millions) have successfully installed Python on 
Windows with these installers, and even more (including most Microsoft 
products) use the installer toolkit that we use. Fundamentally, it works 
correctly. Most issues are due to problems or configuration settings on the 
target machine.

The installer file registration is handled by Windows, and is not ours to 
manage. If the OS is choosing to leave them there after removing the files, 
you'll have to report it to them.

Perhaps you could reproduce the issue, and then send all the Python log files 
from your %TEMP% directory? That should show us why your install is failing.

--

___
Python tracker 

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



[issue42044] Running Python in unbuffered mode may not write all contents to the console

2021-06-11 Thread Fabio Zadrozny


Fabio Zadrozny  added the comment:

Seems fair. I just did a pull request to remove those limits. 

Please let me know if you think something else is needed there.

--

___
Python tracker 

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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +25265
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26679

___
Python tracker 

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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is an error in the Python implementation of Decimal.__hash__. It calls 
super().__hash__(), but the C implementation calls object.__hash__().

Also, the documentation for floating point hash has the same error.

--
stage: resolved -> 
status: closed -> open
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



[issue42044] Running Python in unbuffered mode may not write all contents to the console

2021-06-11 Thread Fabio Zadrozny


Change by Fabio Zadrozny :


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

___
Python tracker 

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



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

2021-06-11 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue44397] Add Linked Linked module

2021-06-11 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Closing as a duplicate of issue42575. Adding a linked list data structure to 
Python is in any case probably better discussed on the python-ideas mailing 
list and then in a PEP.

--
nosy: +Jelle Zijlstra
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, found the problem, we are not resetting the multi-line-start pointer when 
we are reallocating the tokenizer buffers.

--
stage: patch review -> 

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-06-11 Thread sping


Change by sping :


--
title: [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: 
Updated to vendoed copy to expat 2.4.1 -> [security] CVE-2013-0340 "Billion 
Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

___
Python tracker 

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



[issue44397] Add Linked Linked module

2021-06-11 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

This issue is probably a duplicate of https://bugs.python.org/issue42575 .

In almost all use cases, a linked list can be replaced by a collections.deque, 
which already uses a double linked list of blocks internally. Is there 
something you need a linked list to do that you can't do already with a deque?

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Updated to vendoed copy to expat 2.4.1

2021-06-11 Thread sping


sping  added the comment:

FTR that^^ Sebastian is me :)

--
nosy: +sping

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This affects 3.10 as well

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think this should fix the issue, but someone should validate this:

diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 6002f3e05a..1c28737183 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1084,17 +1084,16 @@ syntaxerror(struct tok_state *tok, const char *format, 
...)
 goto error;
 }

-errtext = PyUnicode_DecodeUTF8(tok->line_start, tok->cur - tok->line_start,
+errtext = PyUnicode_DecodeUTF8(tok->buf, tok->inp - tok->buf,
"replace");
 if (!errtext) {
 goto error;
 }
 int offset = (int)PyUnicode_GET_LENGTH(errtext);
-Py_ssize_t line_len = strcspn(tok->line_start, "\n");
-if (line_len != tok->cur - tok->line_start) {
+Py_ssize_t line_len = strcspn(tok->buf, "\n");
+if (line_len != tok->buf - tok->inp) {
 Py_DECREF(errtext);
-errtext = PyUnicode_DecodeUTF8(tok->line_start, line_len,
-   "replace");
+errtext = PyUnicode_DecodeUTF8(tok->buf, line_len, "replace");
 }
 if (!errtext) {
 goto error;

--

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Here is a smaller reproducer:

x = "ijosdfsd\
def blech():
pass

This seems to be an error with:

commit a698d52c3975c80b45b139b2f08402ec514dce75
Author: Batuhan Taskaya 
Date:   Thu Jan 21 00:38:47 2021 +0300

bpo-40176: Improve error messages for unclosed string literals (GH-19346)



Automerge-Triggered-By: GH:isidentical

Batuhan, can you take a look?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 6df926f1c46eb6db7b5dcd0227c6b532c78525c9 by Miss Islington (bot) 
in branch '3.9':
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints 
(GH-24646) (GH-26675)
https://github.com/python/cpython/commit/6df926f1c46eb6db7b5dcd0227c6b532c78525c9


--

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 9c0180ae7761b352116a2528aae61eea10e31045 by Miss Islington (bot) 
in branch '3.10':
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints 
(GH-24646) (GH-26674)
https://github.com/python/cpython/commit/9c0180ae7761b352116a2528aae61eea10e31045


--

___
Python tracker 

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



[issue42516] Add function to get caller's name

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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-06-11 Thread realead


realead  added the comment:

This change makes life harder for people trying to get sane behavior with sets 
for float-, complex- and tuple-objects containing NaNs. With "sane" meaning, 
that 

set([nan, nan, nan]) => {nan}

Until now, one has only to override the equal-comparison for these types but 
now also hash-function needs to be overriden (which is more complicated e.g. 
for tuple).



On a more abstract level: there are multiple possible equivalence relations. 

The one used right now for floats is Py_EQ and results in 
float("nan)!=float("nan") due to IEEE 754.

In hash-set/dict we would like to use an equivalence relation for which all 
NaNs would be in the same equivalence class. Maybe a new comparator is called 
for (like PY_EQ_FOR_HASH_COLLECTION), which would yield float("nan") equivalent 
to float("nan") and which should be used in hash-set/dict?

--
nosy: +realead

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Updated to vendoed copy to expat 2.4.1

2021-06-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

(From PSRT list, Sebastian:)

 Please note that the vulnerability fix also added two new functions to
the API that would be great to have xml.parsers.expat expose to the
users for full control.  These are:

- XML_SetBillionLaughsAttackProtectionMaximumAmplification and
- XML_SetBillionLaughsAttackProtectionActivationThreshold

Module xml.parsers.expat.errors and its docs also needs 6 new error code
entries to be complete:

  /* Added in 2.0. */
  38 XML_ERROR_RESERVED_PREFIX_XML
  39 XML_ERROR_RESERVED_PREFIX_XMLNS
  40 XML_ERROR_RESERVED_NAMESPACE_URI

  /* Added in 2.2.1. */
  41 XML_ERROR_INVALID_ARGUMENT

  /* Added in 2.3.0. */
  42 XML_ERROR_NO_BUFFER

  /* Added in 2.4.0. */
  43 XML_ERROR_AMPLIFICATION_LIMIT_BREACH

With regard to the table of vulnerabilities mentioned in the ticket,
please note that vulnerability "quadratic blowup" is also fixed by
>=2.4.0.  Personally, I consider it a flavor of Billion Laughs and all
know variations are covered, including that one.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Lysandros and Pablo, this *only* occurs when the lexer is reading directly from 
a file, not when it's reading the same source code from a (bytes) string. All 
examples are syntax errors (some raise ValueError in the parser).

--

___
Python tracker 

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



[issue44397] Add Linked Linked module

2021-06-11 Thread Ajith Ramachandran


New submission from Ajith Ramachandran :

There is a module present for queue which can also be used for a stack like 
LIFO structure. But there is none for linked list.

--
components: Library (Lib)
messages: 395640
nosy: AjithRamachandran
priority: normal
severity: normal
status: open
title: Add Linked Linked module
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25261
pull_request: https://github.com/python/cpython/pull/26675

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +25260
pull_request: https://github.com/python/cpython/pull/26674

___
Python tracker 

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



[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-11 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 4cb6ba14325cff98589c2660d1d2c65f4aacfee4 by huzhaojie in branch 
'main':
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints 
(GH-24646)
https://github.com/python/cpython/commit/4cb6ba14325cff98589c2660d1d2c65f4aacfee4


--

___
Python tracker 

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



[issue44396] pegen _PyParser_ASTFromFile(): Use-After-Free in syntaxerror()

2021-06-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +gvanrossum, lys.nikolaou, pablogsal
title: Use-After-Free -> pegen _PyParser_ASTFromFile(): Use-After-Free in 
syntaxerror()

___
Python tracker 

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



[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-11 Thread Petr Viktorin

Petr Viktorin  added the comment:


New changeset fc98266ff627ba0f56f8ae241245b66bc983baa3 by Lumír 'Frenzy' Balhar 
in branch 'main':
bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637)
https://github.com/python/cpython/commit/fc98266ff627ba0f56f8ae241245b66bc983baa3


--

___
Python tracker 

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



[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10

2021-06-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44396] Use-After-Free

2021-06-11 Thread alessandro mantovani


New submission from alessandro mantovani :

Use After Free in python3.11 (commit  2ab27c4af4ddf752)
Steps to reproduce:

1) ./configure --with-address-sanitizer
2) make
3) ./python 

I attach some of the input  that lead to the undefined behavior

For the complete description you can find the asan report here:

==1082579==ERROR: AddressSanitizer: heap-use-after-free on address 
0x62645a40 at pc 0x00735155 bp 0x7fffbed0 sp 0x7fffbec8
READ of size 8 at 0x62645a40 thread T0
#0 0x735154 in ascii_decode 
/home/elmanto/ddg/other_targets/cpython/Objects/unicodeobject.c:5091:28
#1 0x735154 in unicode_decode_utf8 
/home/elmanto/ddg/other_targets/cpython/Objects/unicodeobject.c:5158:10
#2 0xc98381 in syntaxerror 
/home/elmanto/ddg/other_targets/cpython/Parser/tokenizer.c:1087:15
#3 0xc8d616 in tok_get 
/home/elmanto/ddg/other_targets/cpython/Parser/tokenizer.c
#4 0xc8696b in PyTokenizer_Get 
/home/elmanto/ddg/other_targets/cpython/Parser/tokenizer.c:1884:18
#5 0xead74c in _PyPegen_check_tokenizer_errors 
/home/elmanto/ddg/other_targets/cpython/Parser/pegen.c:1260:17
#6 0xead74c in _PyPegen_run_parser 
/home/elmanto/ddg/other_targets/cpython/Parser/pegen.c:1292:17
#7 0xeaebca in _PyPegen_run_parser_from_file_pointer 
/home/elmanto/ddg/other_targets/cpython/Parser/pegen.c:1377:14
#8 0xc83a91 in _PyParser_ASTFromFile 
/home/elmanto/ddg/other_targets/cpython/Parser/peg_api.c:26:12
#9 0xa0abf1 in pyrun_file 
/home/elmanto/ddg/other_targets/cpython/Python/pythonrun.c:1197:11
#10 0xa0abf1 in _PyRun_SimpleFileObject 
/home/elmanto/ddg/other_targets/cpython/Python/pythonrun.c:455:13
#11 0xa09b19 in _PyRun_AnyFileObject 
/home/elmanto/ddg/other_targets/cpython/Python/pythonrun.c:89:15
#12 0x4dfe94 in pymain_run_file_obj 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:353:15
#13 0x4dfe94 in pymain_run_file 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:372:15
#14 0x4dfe94 in pymain_run_python 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:587:21
#15 0x4dfe94 in Py_RunMain 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:666:5
#16 0x4e154c in pymain_main 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:696:12
#17 0x4e1874 in Py_BytesMain 
/home/elmanto/ddg/other_targets/cpython/Modules/main.c:720:12
#18 0x77a2e0b2 in __libc_start_main 
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#19 0x43501d in _start 
(/home/elmanto/ddg/other_targets/cpython/python+0x43501d)

0x62645a40 is located 2368 bytes inside of 10560-byte region 
[0x62645100,0x62647a40)
freed by thread T0 here:
#0 0x4ada79 in realloc 
(/home/elmanto/ddg/other_targets/cpython/python+0x4ada79)
#1 0x638e61 in PyMem_RawRealloc 
/home/elmanto/ddg/other_targets/cpython/Objects/obmalloc.c:602:12
#2 0x638e61 in _PyObject_Realloc 
/home/elmanto/ddg/other_targets/cpython/Objects/obmalloc.c:2339:12

previously allocated by thread T0 here:
#0 0x4ada79 in realloc 
(/home/elmanto/ddg/other_targets/cpython/python+0x4ada79)
#1 0x638e61 in PyMem_RawRealloc 
/home/elmanto/ddg/other_targets/cpython/Objects/obmalloc.c:602:12
#2 0x638e61 in _PyObject_Realloc 
/home/elmanto/ddg/other_targets/cpython/Objects/obmalloc.c:2339:12

SUMMARY: AddressSanitizer: heap-use-after-free 
/home/elmanto/ddg/other_targets/cpython/Objects/unicodeobject.c:5091:28 in 
ascii_decode
Shadow bytes around the buggy address:
  0x0c4c8af0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b30: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c4c8b40: fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd
  0x0c4c8b50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b60: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b70: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4c8b90: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:   fa
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
  Shadow gap:  cc
==1082579==ABORTING

--
components: C API
files: crashes.tgz
messages: 395637
nosy: elmanto
priority: normal
severity: normal
status: 

[issue18767] csv documentation does not note default quote constant

2021-06-11 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

The docs do say that now:

.. attribute:: Dialect.quoting

   Controls when quotes should be generated by the writer and recognised by the
   reader.  It can take on any of the :const:`QUOTE_\*` constants (see section
   :ref:`csv-contents`) and defaults to :const:`QUOTE_MINIMAL`.


.. so this issue can be closed.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44395] email.message as_string() not writing unixfrom

2021-06-11 Thread Konstantin Ryabitsev


New submission from Konstantin Ryabitsev :

When using as_string(unixfrom=True), the "From " line is not always printed. 
The behaviour is correct for as_bytes().

Test case:


import email.message

msg = email.message.EmailMessage()
msg.set_payload('Hello World\n')
msg.set_unixfrom('From foo@bar Thu Jan  1 00:00:00 1970')
msg['Subject'] = 'Hello'
msg['From'] = 'Me '
print('as_string:')
print(msg.as_string(unixfrom=True))
print('as_bytes:')
print(msg.as_bytes(unixfrom=True).decode())


Results (3.5 and 3.9):

as_string:
Subject: Hello
From: Me 

Hello World

as_bytes:
>From foo@bar Thu Jan  1 00:00:00 1970
Subject: Hello
From: Me 

Hello World

--
components: email
messages: 395635
nosy: barry, konstantin2, r.david.murray
priority: normal
severity: normal
status: open
title: email.message as_string() not writing unixfrom
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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Updated to vendoed copy to expat 2.4.1

2021-06-11 Thread STINNER Victor


New submission from STINNER Victor :

Our vendored copy of Modules/expat/ should be updated to Expat 2.4.1 to 
retrieve the fix for the security vulnerabily CVE-2013-0340 "Billion Laughs":
https://blog.hartwork.org/posts/cve-2013-0340-billion-laughs-fixed-in-expat-2-4-0/

The table of vulnerabilities in Python XML parsers should be updated as well:
https://docs.python.org/dev/library/xml.html#xml-vulnerabilities

My outdated notes on Modules/expat/: copy of libexpat

* ./configure --with-system-expat
* Rationale: https://mail.python.org/pipermail/python-dev/2017-June/148287.html
* Used on Windows and macOS, Linux distributions use system libexpat
* Version: search for XML_MAJOR_VERSION in Modules/expat/expat.h
* Script to update it: see attached script to https://bugs.python.org/issue30947
* Recent update: https://bugs.python.org/issue30947
* Python 2.7, 3.3-3.6 use libexpat 2.2.1

https://pythondev.readthedocs.io/files.html

--
components: Extension Modules
messages: 395634
nosy: vstinner
priority: normal
severity: normal
status: open
title: [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: 
Updated to vendoed copy to expat 2.4.1
type: security
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



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2021-06-11 Thread Kyle Altendorf


Change by Kyle Altendorf :


--
nosy: +altendky

___
Python tracker 

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



[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-11 Thread Mike Kaganski


Mike Kaganski  added the comment:

@Eryk Sun: yes, of course you are right - but please see the date of the 
commit; I didn't know what you kindly explained me in your reply yesterday :-) 
Thank you again.

--

___
Python tracker 

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



[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

That's the documented behavior: "A user may need to set the limit higher when 
they have a program that requires deep recursion and a platform that supports a 
higher limit. This should be done with care, because a too-high limit can lead 
to a crash."

https://docs.python.org/3.8/library/sys.html#sys.setrecursionlimit

Also, please don't post images. Copy and paste the text instead. Images aren't 
friendly to visually impaired people, and they can't be copy and pasted.

--
nosy: +eric.smith
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



[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-11 Thread Eryk Sun


Eryk Sun  added the comment:

Note that this explanation in your commit is wrong and unhelpful: "likely 
because datetime.datetime.now in the native Windows Python takes into account 
both system timezone data and the TZ environment variable". When TZ is set, 
localtime() is based only on the TZ value, and daylight saving time uses only 
U.S. rules (e.g. beginning 2021-03-14 and ending 2021-11-07). The value must be 
of the form "tzn [+|-]hh[:mm[:ss] ][dzn]", but there is no validation. So 
"Europe/Moscow" is invalid and gets parsed as UTC with U.S. DST. I recommend 
clearing the TZ variable because the value format is non-standard, and its DST 
support is U.S.-centric nonsense.

--

___
Python tracker 

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



[issue19094] urljoin should raise a TypeError if URL is not a string

2021-06-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue44359] test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-06-11 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue44392] Py_GenericAlias is not documented

2021-06-11 Thread Ken Jin


Ken Jin  added the comment:

Ronald, may I take this please? Or are you working on something already?

--
nosy: +gvanrossum, kj

___
Python tracker 

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



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

2021-06-11 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 0a186b1ec1fd094d825f08a4eb39fa83ef57067a by Miss Islington (bot) 
in branch '3.10':
bpo-44242: [Enum] improve error messages (GH-26669)
https://github.com/python/cpython/commit/0a186b1ec1fd094d825f08a4eb39fa83ef57067a


--

___
Python tracker 

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



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

2021-06-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 9.0 -> 10.0
pull_requests: +25258
pull_request: https://github.com/python/cpython/pull/26671

___
Python tracker 

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



[issue44378] Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer target type

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



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

2021-06-11 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset c956734d7af83ad31f847d31d0d26df087add9a4 by Ethan Furman in 
branch 'main':
bpo-44242: [Enum] improve error messages (GH-26669)
https://github.com/python/cpython/commit/c956734d7af83ad31f847d31d0d26df087add9a4


--

___
Python tracker 

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



[issue44359] test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-06-11 Thread STINNER Victor


STINNER Victor  added the comment:

Another example on PPC64LE Fedora Stable LTO 3.10:
https://buildbot.python.org/all/#/builders/644/builds/98

0:00:38 load avg: 7.51 [ 78/427/1] test_ftplib failed (env changed) -- running: 
test_signal (39.0 sec), test_nntplib (35.2 sec)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-34:
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asyncore.py",
 line 83, in read
obj.handle_read_event()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asyncore.py",
 line 420, in handle_read_event
self.handle_read()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asynchat.py",
 line 171, in handle_read
self.found_terminator()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_ftplib.py",
 line 129, in found_terminator
method(arg)
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_ftplib.py",
 line 154, in cmd_pasv
conn, addr = sock.accept()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/socket.py",
 line 293, in accept
fd, addr = self._accept()
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/threading.py",
 line 1006, in _bootstrap_inner
self.run()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_ftplib.py",
 line 292, in run
asyncore.loop(timeout=0.1, count=1)
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asyncore.py",
 line 207, in loop
poll_fun(timeout, map)
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asyncore.py",
 line 150, in poll
read(obj)
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/asyncore.py",
 line 87, in read
obj.handle_error()
  File 
"/home/buildbot/buildarea/3.10.cstratak-fedora-stable-ppc64le.lto/build/Lib/test/test_ftplib.py",
 line 134, in handle_error
raise Exception
Exception

--

___
Python tracker 

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



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

2021-06-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25257
pull_request: https://github.com/python/cpython/pull/26670

___
Python tracker 

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



[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Alex Hall


New submission from Alex Hall :

Found on:
Python 3.9.5
GCC 11.1 on Linux (x86_64)
Reproduced on:
Python 3.9.5
Clang 9.0.8 Linux (arm)

When setting the recursion limit to a high enough amount, trying to reach that 
recursion limit ends in a segmentation fault (stack overflow?)

code:
```py
import sys

def recurse(n: int) -> int:
recurse(n)

sys.setrecursionlimit(2**16-1)

recurse(100)
```

--
components: Library (Lib)
files: segpy.png
messages: 395626
nosy: ultrabear
priority: normal
severity: normal
status: open
title: segfault with sys.setrecursionlimit
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50104/segpy.png

___
Python tracker 

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



[issue44392] Py_GenericAlias is not documented

2021-06-11 Thread Ronald Oussoren


New submission from Ronald Oussoren :

Py_GenericAlias seems to be a public API given its name and is mention in the 
stable ABI list for 3.10 
(https://docs.python.org/3.10/c-api/stable.html?highlight=py_genericalias), but 
the API is not documented. 

Likewise for Py_GenericAliasType.

--
assignee: docs@python
components: Documentation
messages: 395625
nosy: docs@python, ronaldoussoren
priority: normal
severity: normal
status: open
title: Py_GenericAlias is not documented
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



[issue44370] Inconsistent results for min() and max() with math.nan as argument

2021-06-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Maybe add two key functions for making NaN either the smallest or the largest 
number?

min(1, NAN, key=nan_is_smallest) -> NAN
max(1, NAN, key=nan_is_smallest) -> 1
sorted([1, NAN, 2], key=nan_is_smallest) -> [NAN, 1, 2]
min(1, NAN, key=nan_is_largest) -> 1
max(1, NAN, key=nan_is_largest) -> NAN
sorted([1, NAN, 2], key=nan_is_largest) -> [1, 2, NAN]

--

___
Python tracker 

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



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

2021-06-11 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +25256
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26669

___
Python tracker 

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



[issue44370] Inconsistent results for min() and max() with math.nan as argument

2021-06-11 Thread Mark Dickinson


Mark Dickinson  added the comment:

> That is, do we want NaNs to sort to the beginning of the list, or the end?

FWIW, NumPy chooses to sort NaNs to the end of the list: 
https://numpy.org/doc/stable/reference/generated/numpy.sort.html

--

___
Python tracker 

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



[issue44378] Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer target type

2021-06-11 Thread miss-islington


miss-islington  added the comment:


New changeset e6d28a1a6ad22125fc3a6df2d611d79aa8d6f67e by Miss Islington (bot) 
in branch '3.10':
bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)
https://github.com/python/cpython/commit/e6d28a1a6ad22125fc3a6df2d611d79aa8d6f67e


--

___
Python tracker 

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



[issue44370] Inconsistent results for min() and max() with math.nan as argument

2021-06-11 Thread Mark Dickinson


Mark Dickinson  added the comment:

> We should consider biting the bullet and revising the default NaN sort order.

If we went that route, I think we wouldn't need to consider payload or 
identity. We could just do:

NaN < NaN  ->  False
NaN < non-NaN  ->  True
non-NaN < NaN  ->  False
non-NaN < non-NaN  ->  usual numeric comparison

That then satisfies the axioms for a total ordering, albeit that the implied 
equality isn't Python's == (and it can't be, if we're going to keep the 
property that NaN != NaN): all NaNs compare equal for the equality determined 
by the above order, and the stability of the sort means that those NaNs will 
retain their order relative to each other in the sorted output.

Making `NaN < non-NaN` return `True` (which happens under both the proposal 
above and Raymond's more elaborate proposal) _would_ be a break with IEEE 754, 
though.

There's also a somewhat arbitrary choice to be made here: do we consider NaNs 
to be negative or positive? That is, do we want NaNs to sort to the beginning 
of the list, or the end?

--

___
Python tracker 

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



[issue44391] PC/launcher.c,one more argument than required

2021-06-11 Thread Brother Beer

New submission from Brother Beer :

cpython-3.10.0b2/PC/launcher.c, line 347

One more argument than required?

 345 else if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
 346 debug(L"locate_pythons_for_key: '%ls' is a directory\n",
 347   ip->executable, attrs);
 348 }

--
messages: 395620
nosy: brotherbeer
priority: normal
severity: normal
status: open
title: PC/launcher.c,one more argument than required
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



[issue44390] PC/frozen_dllmain.c, some expressions have no side effects

2021-06-11 Thread Brother Beer


New submission from Brother Beer :

cpython-3.10.0b2/PC/frozen_dllmain.c, line 66

 63 void PyWinFreeze_ExeInit(void)
 64 {
 65 char **modName;
 66 for (modName = possibleModules;*modName;*modName++) {
 67 /*  printf("Initialising '%s'\n", *modName); */
 68 CallModuleDllMain(*modName, DLL_PROCESS_ATTACH);
 69 }
 70 }

'*' in '*modName++' is redundant? Line 82 has the same problem

 76 void PyWinFreeze_ExeTerm(void)
 77 {
 78 // Must go backwards
 79 char **modName;
 80 for (modName = possibleModules+Py_ARRAY_LENGTH(possibleModules)-2;
 81  modName >= possibleModules;
 82  *modName--) {
 83 /*  printf("Terminating '%s'\n", *modName);*/
 84 CallModuleDllMain(*modName, DLL_PROCESS_DETACH);
 85 }
 86 }

--
messages: 395619
nosy: brotherbeer
priority: normal
severity: normal
status: open
title: PC/frozen_dllmain.c, some expressions have no side effects
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



[issue40213] contextlib.aclosing()

2021-06-11 Thread John Belmonte


John Belmonte  added the comment:

merged for Python 3.10

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



[issue44378] Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer target type

2021-06-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +25255
pull_request: https://github.com/python/cpython/pull/26668

___
Python tracker 

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



[issue44378] Py_IS_TYPE(): cast discards ‘const’ qualifier from pointer target type

2021-06-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 304dfec8d3c0763734ea8b5fa2af1d9e1ce69ffa by Victor Stinner in 
branch 'main':
bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)
https://github.com/python/cpython/commit/304dfec8d3c0763734ea8b5fa2af1d9e1ce69ffa


--

___
Python tracker 

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



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

2021-06-11 Thread Ethan Furman


Ethan Furman  added the comment:

Also changing error reporting to be less susceptible to DOS attacks.

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

___
Python tracker 

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



  1   2   >