[issue39820] Bracketed paste mode for REPL

2020-03-04 Thread Marco Sulla


Marco Sulla  added the comment:

IMHO such a feature is useful for sysops that does not have a graphical 
interface, as Debian without an X. That's why vi is (unluckily) very popular 
also in 2020. IDLE can't be used in this cases.

Windows users can't remotely login without a GUI, so the feature for such 
platforms can be not implemented, since there's builtin solutions (IDLE)

--

___
Python tracker 

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



[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-03-04 Thread victorg


victorg  added the comment:

Allow negative indexes that could be usefull. 

Example: to compare 2 or more Path, if they come from the same top directory

from pathlib import Path
a = Path("/a/testpy/cpython/config.log")
b = Path("/b/testpy/cpython/config.log")
c = Path("/a/otherfolder/text.txt")
print(f"a.parents[-2] == b.parents[-2] -> {a.parents[-2] == b.parents[-2]}") # 
False
print(f"a.parents[-2] == c.parents[-2] -> {a.parents[-2] == c.parents[-2]}") # 
True 
# index = -2 because -1 is "/"

--
nosy: +victorg
Added file: https://bugs.python.org/file48949/allowNegativeIndexParents.patch

___
Python tracker 

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



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-04 Thread Evgeny Boytsov


Evgeny Boytsov  added the comment:

I checked both my test example and real production code with your patch. I'm 
unable to reproduce the bug, so I think it is fixed now. Thank you!

--

___
Python tracker 

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



[issue39845] Argparse on Python 3.7.1 (Windows) appends double quotes to string if it ends with backward slash

2020-03-04 Thread Ion Cebotari


New submission from Ion Cebotari :

I have this code for a tool that copies files from one directory to another:

parser = argparse.ArgumentParser()
parser.add_argument('src_dir')
parser.add_argument('dest_dir')
args = parser.parse_args()

It works fine on Unix, but on Windows, if the destination path ends with a 
backward slash, it seems that argparse parses the string as it would escape a 
double quote and returns the string with the double quote appended.

For example, calling the script:
(base) PS Z:\test> python.exe .\main.py -d Z:\tmp\test\DJI\ 'C:\unu doi\'
will create the destination path string: C:\unu doi"
The source path, even though it ends with the backslash as well, isn't modified 
by argparse.

I've worked around this issue by using this validation function for the 
arguments:

def is_valid_dir_path(string):
"""
Checks if the path is a valid path

:param string: The path that needs to be validated
:return: The validated path
"""
if sys.platform.startswith('win') and string.endswith('"'):
string = string[:-1]
if os.path.isdir(string):
return string
else:
raise NotADirectoryError(string)

parser = argparse.ArgumentParser()
parser.add_argument('src_dir', type=is_valid_dir_path)
parser.add_argument('dest_dir', type=is_valid_dir_path)
args = parser.parse_args()

--
messages: 363339
nosy: 888xray999
priority: normal
severity: normal
status: open
title: Argparse on Python 3.7.1 (Windows) appends double quotes to string if it 
ends with backward slash
type: behavior
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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Ned Deily


Ned Deily  added the comment:

Thank you for your report. I am unable to reproduce that behavior.  I suspect 
that the most likely explanation is that you are not actually using the 
python.org 3.8.2 but rather an IDLE and python from some other distributor 
(like Homebrew) that has a different version of Tk.  There is an easy way to 
check that.  From a Terminal.app window, enter the following commands to the 
Unix shell:

/usr/local/bin/python3.8 -c "import sys;print(sys.version)"

You should see:

3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)]

If not, you are not using Python 3.8.2 from python.org.
Otherwise, then try:

/usr/local/bin/python3.8 -m idlelib

and see if the Preferences window is still black.  If so, another possibility 
is that your saved IDLE preferences may be interfering.  Choose Quit IDLE from 
the IDLE menu then try moving your existing IDLE preferences out of the way so 
that IDLE will use the "factory defaults":

cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib

--

___
Python tracker 

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



[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18131
pull_request: https://github.com/python/cpython/pull/18736

___
Python tracker 

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



[issue39846] Register .whl as a unpack format in shutil unpack

2020-03-04 Thread Daniel Chimeno


New submission from Daniel Chimeno :

While working on project with Python wheels I found myself adding:


import shutil
shutil.register_unpack_format('whl', ['.whl'], shutil._unpack_zipfile)



Since PEP 427 explicitly says wheels are ZIP-format archive. 
https://www.python.org/dev/peps/pep-0427/

I wonder if it's loable to register the unpack format by default so the 
shutil.unpack_archive() function works without adding it.

--
components: Library (Lib)
messages: 363341
nosy: dchimeno
priority: normal
severity: normal
status: open
title: Register .whl as a unpack format in shutil unpack
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18132
pull_request: https://github.com/python/cpython/pull/18773

___
Python tracker 

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



[issue39826] logging HTTPHandler does not support proxy

2020-03-04 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 22a9a546ff3bf2a63d77ca1e5494e758bc59132f by l0rb in branch 
'master':
bpo-39826: add getConnection() hook to logging HTTPHandler (GH-18745)
https://github.com/python/cpython/commit/22a9a546ff3bf2a63d77ca1e5494e758bc59132f


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue39826] logging HTTPHandler does not support proxy

2020-03-04 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue36490] Modernize function signature in Archiving section of shutil doc

2020-03-04 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

Closing on grounds of apparently not really being an issue as opposed to a 
misunderstanding on my part, as mentioned above.

--
resolution:  -> not a bug
stage: needs patch -> 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



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-04 Thread STINNER Victor

STINNER Victor  added the comment:

Le mer. 4 mars 2020 à 03:01, Andrew Bartlett  a écrit :
> (...) but that a valid build script that operates correctly on Python 3.8 
> will no longer, without warning to us, (...)

Displaying warnings by default or not is an old debate.

I added the "Python Development Mode" (-X dev) to help the situation:

https://docs.python.org/dev/library/devmode.html#devmode

I just added a very explicit "You should check for DeprecationWarning in your 
code" section in What's New In Python 3.9:

https://docs.python.org/dev/whatsnew/3.9.html#you-should-check-for-deprecationwarning-in-your-code

Moreover, DeprecationWarning are now (Python 3.7) displayed *by default* in the 
__main__ module:
https://www.python.org/dev/peps/pep-0565/

--

___
Python tracker 

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



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

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dffe4c07095e0c693e094d3c140e85a68bd8128e by Andy Lester in branch 
'master':
bpo-39573: Finish converting to new Py_IS_TYPE() macro (GH-18601)
https://github.com/python/cpython/commit/dffe4c07095e0c693e094d3c140e85a68bd8128e


--

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days

2020-03-04 Thread And Clover


New submission from And Clover :

Since bpo-15038, waiting to acquire locks/events/etc from _thread/threading on 
Windows can fail to return long past the requested timeout. Cause:

https://github.com/python/cpython/blob/3.8/Python/thread_nt.h#L85

using 32-bit GetTickCount/DWORD, which will overflow at around 49.7 days of 
uptime.

If the WaitForSingleObjectEx call in PyCOND_TIMEDWAIT returns later than the 
'target' time, and the tick count overflows in that gap, 'milliseconds' will 
become very large (up to another 49.7 days) and the next PyCOND_TIMEDWAIT will 
be stuck for a long time.

Where we've seen it is where it's most likely to happen: when the machine is 
hibernated during the WaitForSingleObjectEx call. I believe the TickCount 
continues to increase during hibernation so there is a much bigger gap between 
'target' and 'now' for the overflow to happen in.

Simplest fix is probably to switch to GetTickCount64/ULONGLONG. We should be 
able to get away with using this now we no longer support WinXP.

--
components: Library (Lib), Windows
messages: 363346
nosy: aclover, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: EnterNonRecursiveMutex on win32 can hang for 49.7 days
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:

time.monotonic() is now always implemented with GetTickCount64() on Windows. 
Previously, there was a fallback on GetTickCount() when GetTickCount64() was 
not available. GetTickCount() call has been removed when we dropped support for 
old Windows versions.

Do you want to work on a fix? (PR)

--
nosy: +vstinner

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


--
title: EnterNonRecursiveMutex on win32 can hang for 49.7 days -> 
EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() 
rather than GetTickCount()

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2020-03-04 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

I'd be happy to submit a PR to resolve all the issues that I note here. Just 
say the word and I'll go right ahead.

I presume the Windows installer code [0a] should be updated to refuse to 
install on Windows <8 and given an informative warning instead letting the user 
know their system is not supported, as well as logging the appropriate messages 
in each case? Appropriate failure IDs would also be defined in the associated 
WXL [0b].

[0a] 
https://github.com/python/cpython/blob/master/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp#L3041
[0b] https://github.com/python/cpython/blob/master/Tools/msi/bundle/Default.wxl

The relevant Using Python on Windows docs [1a] should be updated to reflect 
this, along with PCBuild/readme.txt [1b]. Also, given it is dropping 2 major 
Windows versions, including one seeing widespread use, it should probably be 
mentioned in What's New; I don't see it there as it stands now.

[1a] https://github.com/python/cpython/blob/master/Doc/using/windows.rst
[1b] https://github.com/python/cpython/blob/master/PCbuild/readme.txt

As a more trivial docs change, references to "Vista's" UAC ([2a], [2b], [2c]) 
could be updated to simply refer to "Windows'" UAC to avoid confusion since it 
presumably applies to all >=Vista versions which have said feature.

[2a] 
https://github.com/python/cpython/blob/master/Lib/distutils/command/bdist_wininst.py#L52
[2b] 
https://github.com/python/cpython/blob/master/PC/bdist_wininst/install.c#L2187
[2c] 
https://github.com/python/cpython/blob/master/Doc/distutils/builtdist.rst#vista-user-access-control-uac

Finally, maybe this is stretching the scope a bit, but the relevant part of 
[1a], namely [3a], should also be updated to state that Windows CE is not 
supported (it currently states the opposite), as this was removed in 3.6.0b1 
[3ai], and additionally the Sourceforge (!) project it links to [3bii] is on an 
legacy archived CVS repo that hasn't been meaningfully updated since 2008 and 
the current versions of CE (5 and 6) at the time is long EoL now (in fact, 7 is 
coming up on its EoL in a year). Out of date references to Windows CE support 
could also be removed from the ctypes doc [3b] and the condavar code comments 
[3c], [3d].

[3a] https://github.com/python/cpython/blob/master/Doc/using/windows.rst#L1165
[3ai] 
https://github.com/python/cpython/blob/master/Misc/NEWS.d/3.6.0b1.rst#L217
[3aii] https://sourceforge.net/projects/pythonce/files/
[3b] https://github.com/python/cpython/blob/master/Doc/library/ctypes.rst 
[3c] 
https://github.com/python/cpython/blob/master/Include/internal/pycore_condvar.h#L30
[3d] https://github.com/python/cpython/blob/master/Python/condvar.h#L85

--
nosy: +CAM-Gerlach

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-04 Thread Day Barr


Change by Day Barr :


--
nosy: +Day Barr

___
Python tracker 

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



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18133
pull_request: https://github.com/python/cpython/pull/18776

___
Python tracker 

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



[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1ec63b62035e73111e204a0e03b83503e1c58f2e by Victor Stinner in 
branch 'master':
bpo-39763: distutils.spawn now uses subprocess (GH-18743)
https://github.com/python/cpython/commit/1ec63b62035e73111e204a0e03b83503e1c58f2e


--

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-04 Thread sparrowt


Change by sparrowt :


--
nosy: +sparrowt

___
Python tracker 

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



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a6d3546d003d9873de0f71b319ad79d203374bf0 by Victor Stinner in 
branch 'master':
bpo-39674: Fix typo in What's New In Python 3.9 (GH-18776)
https://github.com/python/cpython/commit/a6d3546d003d9873de0f71b319ad79d203374bf0


--

___
Python tracker 

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



[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18134
pull_request: https://github.com/python/cpython/pull/18778

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-04 Thread And Clover


And Clover  added the comment:

Yep, should be straightforward to fix (though not to test, as fifty-day test 
cases tend to be frowned upon...)

--

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2020-03-04 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

Here's a further conservative list of low-hanging https://github.com/python/cpython/blob/master/Lib/ntpath.py#L675
* multiprocesing/connection.py | >=Win 8 | Branch can be inlined and outdated 
comments removed: 
https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L866
* pathlib.py | >= Vista | Branch can be inlined and else block removed: 
https://github.com/python/cpython/blob/master/Lib/pathlib.py#L19


Tests:
* test_winreg.py | Vista | Multiple tests and constants (All the checks and 
tests requiring registry reflection/`HAS_REFLECTION`):  
https://github.com/python/cpython/blob/master/Lib/test/test_winreg.py
* test_winreg.py | https://github.com/python/cpython/blob/master/Lib/test/test_winreg.py#L309
* test/support/__init__ | <=Win 9x (!) | Test initialization branch can be 
inlined and out of date comments removed: 
https://github.com/python/cpython/blob/master/Lib/test/support/__init__.py#L987
* test_winconsoleio.py | <=Win7 | Test branch: 
https://github.com/python/cpython/blob/master/Lib/test/test_winconsoleio.py#L99
* test_winconsoleio.py | <=Vista | Skipif decorator : 
https://github.com/python/cpython/blob/master/Lib/test/test_winconsoleio.py#L99
* test_import/__init__.py | https://github.com/python/cpython/blob/master/Lib/test/test_import/__init__.py#L1025


Other:
* "Since we limit WINVER to Windows 7 anyway, it doesn't really matter which 
WinSDK version we use." -> can be updated to 8? 
https://github.com/python/cpython/blob/master/PCbuild/python.props#L101

--

___
Python tracker 

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



[issue39770] Remove unnecessary size calculation in array_modexec in Modules/arraymodule.c

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 702e09fd0ad72b248b5adfa0fcfdb58600be77f6 by Andy Lester in branch 
'master':
bpo-39770, array module: Remove unnecessary descriptor counting (GH-18675)
https://github.com/python/cpython/commit/702e09fd0ad72b248b5adfa0fcfdb58600be77f6


--
nosy: +vstinner

___
Python tracker 

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



[issue39770] Remove unnecessary size calculation in array_modexec in Modules/arraymodule.c

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue39848] Warning: 'classifiers' should be a list, got type 'tuple'

2020-03-04 Thread Marco Sulla


New submission from Marco Sulla :

I got this warning. I suppose that `distutils` can use any iterable.

--
components: Distutils
messages: 363354
nosy: Marco Sulla, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Warning: 'classifiers' should be a list, got type 'tuple'
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



[issue39849] Compiler warninig: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

2020-03-04 Thread Dong-hee Na

New submission from Dong-hee Na :

Modules/_testcapimodule.c:6808:15: warning: variable ‘res’ set but not used 
[-Wunused-but-set-variable]
 6808 | PyObject *res;

This warning is noticed after bpo-38913 is fixed.

My GCC version is 9.2.0 :)

--
messages: 363355
nosy: corona10, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Compiler warninig: warning: variable ‘res’ set but not used 
[-Wunused-but-set-variable]
type: enhancement
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



[issue39845] Argparse on Python 3.7.1 (Windows) appends double quotes to string if it ends with backward slash

2020-03-04 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2020-03-04 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

What Eryk said wrt Windows 8 seems sound, looking at some additional data.

Per Statcounter [0], Windows 8 market share has dropped to 1.32% from 2.20% of 
all Windows users over the past 12 months, or 1.75% -> 1.01% of all desktop 
users. Extrapolating a constant linear decrease, this would imply a usage share 
of 0.55-0.60% at Python 3.9 release, or considering a more conservative (and 
realistic) constant-percent decrease, this would put the amount at 0.75%. For 
comparison, by Statcounter's same metrics, Windows XP which was EoL 5 versions 
ago is still at 1.13% of the Windows or 0.90% of the total desktop market 
today, WinVista is at 0.41%/0.33%, Win8.1 at 4.7%/3.8% (~4x Win8) and of course 
the EoL and also dropped Windows 7 is at no less than 23.2%/18.5%, nearly 20 
times the amount of Win 8 today and dropping more slowly besides.

[0] https://gs.statcounter.com/os-version-market-share/windows/desktop/worldwide

Conducting a similar analysis with the NetMarketshare data [1], we see a 0.78% 
-> 0.66% year on year share for Win8, which extrapolates to a 0.57% share at 
Py2.9 release. Vista is much lower at only 0.15%, but XP is over 2x higher at 
1.35%, and Win8.1 well over 5x as large at 3.5%. Windows 7 is, again, at no 
less than 25.2%, nearly 40x the Win 8 marketshare.

[1] https://netmarketshare.com/operating-system-market-share.aspx

Users likely to be most concerned with wanting or needing to use the latest and 
greatest version of Python are more than likely to be power users, enthusiasts 
and developers, a group that was particularly averse to adopting Windows 8 when 
it came out, was more likely to upgrade to 8.1 , and is more aware of EoL 
timeframes than the average consumer. This is empirically supported by the 
Steam survey [2], which samples a population substantially more similar to the 
profile of a developer than the average web user captured by the previous two 
surveys. Here, the numbers are much more stark: A mere 0.17% of their >96% 
Windows userbase runs Windows 8, vs. 2.10% (>10x) for Windows 8.1 and 12.4% for 
Windows 7 (~75x). Given an infinitesimal fraction of such remaining users are 
likely going to require upgrading to a bleeding-edge Python version but not 
their OS that would have been EoL for nearly 5 years, over a year longer than 
Vista itself  and 4 years longer than 7, I don't think supporting 
 that EoL OS per PEP 11 for another >5+ years with another new Python version 
need be a priority.

[2] 
https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam

--

___
Python tracker 

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



[issue39828] json.tool should catch BrokenPipeError

2020-03-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
nosy: +corona10
nosy_count: 3.0 -> 4.0
pull_requests: +18135
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18779

___
Python tracker 

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



[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-04 Thread Nathan Michaels


Change by Nathan Michaels :


--
components: Library (Lib)
nosy: nmichaels
priority: normal
severity: normal
status: open
title: multiprocessing.connection.Listener fails to close with null byte in 
AF_UNIX socket name.
type: crash
versions: Python 3.6

___
Python tracker 

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



[issue39639] Remove Suite node from AST

2020-03-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset d82e469048e0e034d8c0020cd33b733be1adf68b by Batuhan Taşkaya in 
branch 'master':
bpo-39639: Remove the AST "Suite" node and associated code (GH-18513)
https://github.com/python/cpython/commit/d82e469048e0e034d8c0020cd33b733be1adf68b


--

___
Python tracker 

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



[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-04 Thread Nathan Michaels


New submission from Nathan Michaels :

>>> from multiprocessing.connection import Listener
>>> listener = Listener('\0conntest', family='AF_UNIX')
>>> listener.close()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.6/multiprocessing/connection.py", line 466, in close
listener.close()
  File "/usr/lib64/python3.6/multiprocessing/connection.py", line 604, in close
unlink()
  File "/usr/lib64/python3.6/multiprocessing/util.py", line 186, in __call__
res = self._callback(*self._args, **self._kwargs)
ValueError: embedded null byte

Linux has a handy feature where if the first byte of a unix domain socket's 
name is the null character, it won't put it in the filesystem. The socket 
interface works fine with it, but when SocketListener is wrapped around a 
socket, it throws this exception.

--

___
Python tracker 

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



[issue39639] Remove Suite node from AST

2020-03-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue39848] Warning: 'classifiers' should be a list, got type 'tuple'

2020-03-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also discussion at https://bugs.python.org/issue19610

--
nosy: +xtreak

___
Python tracker 

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



[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-04 Thread And Clover


Change by And Clover :


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

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Jacin Ferreira


Jacin Ferreira  added the comment:

Thank you so much Ned.  I appreciate it.  What you said makes sense.

I went ahead and did what you suggested and validated that I am indeed running 
Python 3.8.2 but I'm still getting the black screens.

bin % /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) 
[Clang 6.0 (clang-600.0.57)]

bin % /usr/local/bin/python3.8 -m idlelib
 
bin % cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib

So weird.

--

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Jacin Ferreira


Jacin Ferreira  added the comment:

which -a python python3

/usr/bin/python
/usr/local/bin/python3
/usr/bin/python3

--

___
Python tracker 

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



[issue39845] Argparse on Python 3.7.1 (Windows) appends double quotes to string if it ends with backward slash

2020-03-04 Thread paul j3


paul j3  added the comment:

Could you show the sys.argv (for both the linux and windows cases)?

print(args) (without your correction) might also help, just to see the 'raw' 
Namespace.

(I'd have to restart my computer to explore the Windows behavior myself).

--

___
Python tracker 

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



[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 00c77ae55a82548a6b45af73cdf712ea34910645 by Victor Stinner in 
branch 'master':
bpo-39763: Refactor setup.py (GH-18778)
https://github.com/python/cpython/commit/00c77ae55a82548a6b45af73cdf712ea34910645


--

___
Python tracker 

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



[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread Mark Dickinson


Change by Mark Dickinson :


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



[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thank you for reviewing!

--

___
Python tracker 

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



[issue39762] PyLong_AS_LONG missing from longobject.h

2020-03-04 Thread Enji Cooper


Enji Cooper  added the comment:

> The reason why there was the PyInt_AS_LONG macro is that it is very simple 
> and efficient. It never fails, because the value of the int object always 
> fits in the C long. PyInt_AsLong is much slower. If you know that the object 
> is int, you can use PyInt_AS_LONG for performance and simplicity.

Another note: this assertion holds generally true with contemporary hardware 
architectures (sizeof(long long) != sizeof(int)), but there are still 32-bit 
hardware/software architectures (ex: non-ARM64 capable ARM arches, i386, 
powerpc 32-bit, etc) that violate this constraint. 32-bit architectures are at 
risk of overflow with 32-bit values.

--

___
Python tracker 

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



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 942f7a2dea2e95a0fa848329565c0d0288d92e47 by Victor Stinner in 
branch 'master':
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode 
(GH-16959)" (GH-18767)
https://github.com/python/cpython/commit/942f7a2dea2e95a0fa848329565c0d0288d92e47


--

___
Python tracker 

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



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 942f7a2dea2e95a0fa848329565c0d0288d92e47 by Victor Stinner in 
branch 'master':
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode 
(GH-16959)" (GH-18767)
https://github.com/python/cpython/commit/942f7a2dea2e95a0fa848329565c0d0288d92e47


--

___
Python tracker 

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



[issue39851] tarfile: Exception ignored in (... stdout ...) BrokenPipeError

2020-03-04 Thread STINNER Victor


New submission from STINNER Victor :

When a stdout pipe is closed on the consumer side, Python logs an exception at 
exit:

$ ./python -m tarfile -l archive.tar|true
Exception ignored in: <_io.TextIOWrapper name='' mode='w' 
encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

I tried to flush explicitly stdout at exit: it allows to catch 
BrokenPipeError... but Python still logs the exception, since it triggered by 
the TextIOWrapper finalizer which tries to flush the file again.

See also bpo-39828: "json.tool should catch BrokenPipeError".

--
components: Library (Lib)
messages: 363368
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: tarfile: Exception ignored in (... stdout ...) BrokenPipeError
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



[issue39828] json.tool should catch BrokenPipeError

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-39851: "tarfile: Exception ignored in (... stdout ...) 
BrokenPipeError" which is a different but similar issue.

--

___
Python tracker 

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



[issue39851] tarfile: Exception ignored in (... stdout ...) BrokenPipeError

2020-03-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue39852] IDLE: Copy/Paste behaves like Cut/Paste

2020-03-04 Thread Dave Liptack


New submission from Dave Liptack :

Python 3.8.1
IDLE 3.8.1

When COPYing text in IDLE, right-click and PASTE behaves like CUT/PASTE

This also occurs with COPY -> Go to Line -> PASTE

This does not occur with COPY -> left-click -> PASTE

--
assignee: terry.reedy
components: IDLE
messages: 363370
nosy: Dave Liptack, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Copy/Paste behaves like Cut/Paste
type: behavior
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



[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2020-03-04 Thread Till Korten


Till Korten  added the comment:

I just found the following code in lines 314-320 of 
[tkinter/ttk.py](https://github.com/python/cpython/blob/master/Lib/tkinter/ttk.py),
 which are clearly not localization-aware:
```
def _to_number(x):
if isinstance(x, str):
if '.' in x:
x = float(x)
else:
x = int(x)
return x
```

I'll keep looking for similar stuff and add a pull request once I think I have 
nailed down the issue
I'll look for something similar in

--

___
Python tracker 

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



[issue35632] support unparse for Suite ast

2020-03-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

I just removed Suite node in GH-18513, so I guess this can be closed.

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Ned Deily

Ned Deily  added the comment:

Hmm, intersting!  I have seen problems with black screens before when using 
some newer versions of Tk which is the main reason we are using Tk 8.6.8 on 
macOS.  Let's try getting some more info:

/usr/local/bin/python3.8 -m test.pythoninfo

Also, which macOS Appearance are you using ( -> System Preferences -> 
General)?  If Dark or Auto, does switching to Light and restarting IDLE make a 
difference?  Any other unusual screen settings or third-party extensions?

--

___
Python tracker 

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



[issue39853] Segmentation fault with urllib.request.urlopen and threads

2020-03-04 Thread Anne Archibald


New submission from Anne Archibald :

This was discovered in the astropy test suite, where ThreadPoolExecutor is used 
to concurrently launch a lot of urllib.request.urlopen. This occurs when the 
URLs are local files; I'm not sure about other URL schemes.

The problem appears to occur in python 3.7 but not python 3.8 or python 3.6 (on 
a different machine).

$ python urllib_segfault.py
Linux-5.3.0-29-generic-x86_64-with-Ubuntu-19.10-eoan
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.3.0]
Segmentation fault (core dumped)
$ python3.8 urllib_segfault.py
Linux-5.3.0-29-generic-x86_64-with-glibc2.29
Python 3.8.0 (default, Oct 28 2019, 16:14:01) 
[GCC 9.2.1 20191008]
$ python3 urllib_segfault.py 
Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0]
$

The Astropy bug report: https://github.com/astropy/astropy/issues/10008

--
components: Library (Lib)
files: urllib_segfault.py
messages: 363374
nosy: Anne Archibald
priority: normal
severity: normal
status: open
title: Segmentation fault with urllib.request.urlopen and threads
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48950/urllib_segfault.py

___
Python tracker 

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



[issue39854] f-strings with format specifiers have wrong col_offset

2020-03-04 Thread Aaron Meurer


New submission from Aaron Meurer :

This is tested in CPython master. The issue also occurs in older versions of 
Python. 

>>> ast.dump(ast.parse('f"{x}"'))
"Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', 
ctx=Load()), conversion=-1, format_spec=None)]))], type_ignores=[])"
>>> ast.dump(ast.parse('f"{x!r}"'))
"Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', 
ctx=Load()), conversion=114, format_spec=None)]))], type_ignores=[])"
>>> ast.parse('f"{x}"').body[0].value.values[0].value.col_offset
3
>>> ast.parse('f"{x!r}"').body[0].value.values[0].value.col_offset
1

The col_offset for the variable x should be 3 in both instances.

--
messages: 363375
nosy: asmeurer
priority: normal
severity: normal
status: open
title: f-strings with format specifiers have wrong col_offset
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



[issue39854] f-strings with format specifiers have wrong col_offset

2020-03-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

Do you have some concrete use case for this, or is this a speculative feature 
request?

This will do what you want, although it uses some undocumented internals of the 
_string module. I've only tested it a little, and I've done especially little 
testing for the error conditions:

from _string import formatter_parser, formatter_field_name_split

def partial_format(spec, *args, **kwargs):
idx = 0
auto_number = False
manual_number = False
result = []
for literal_text, field_name, format_spec, conversion in 
formatter_parser(spec):
result.append(literal_text)

found = False

if field_name is None:
# We're at the end of the input.
break

if not field_name:
# Auto-numbering fields.
if manual_number:
raise ValueError(
"cannot switch from manual field specification to automatic 
field numbering"
)
auto_number = True
try:
value = args[idx]
idx += 1
found = True
except IndexError:
pass
elif isinstance(field_name, int):
# Numbered fields.
if auto_number:
raise ValueError(
"cannot switch from automatic field number to manual field 
specification"
)
manual_number = True
try:
value = args[field_name]
found = True
except IndexError:
pass
else:
# Named fields.
try:
value = kwargs[field_name]
found = True
except KeyError:
pass

spec = f":{format_spec}" if format_spec else ""
conv = f"!{conversion}" if conversion else ""

if found:
s = f"{{{conv}{spec}}}"
result.append(s.format(value))
else:
result.append(f"{{{field_name}{conv}{spec}}}")

return "".join(result)

--
nosy: +eric.smith

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Marco Sulla


Marco Sulla  added the comment:

> Do you have some concrete use case for this?

Yes, for EWA:
https://marco-sulla.github.io/ewa/

Since it's a code generator, it uses templates a lot, and much times I feel the 
need for a partial substitution. In the end I solved with some ugly tricks.

Furthermore, if the method exists in the stdlib for `string.Template`, I 
suppose it was created because it was of some utility.

--

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I suggest using the version I posted here and see if it meets your needs. It 
uses the str.format parser to break the string into pieces, so it should be 
accurate as far as that goes.

--

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What would "{} {}".partial_format({}) return?

It is not possible to implement a "safe" variant of str.format(), because in 
difference to Template it can call arbitrary code and allows easily to produce 
arbitrary large strings. Template is more appropriate if the template came from 
untrusted source or if it is composed by inexperienced user.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39855] test.test_subprocess.POSIXProcessTestCase.test_user fails in the limited build environment

2020-03-04 Thread Matej Cepl

New submission from Matej Cepl :

When testing Python from Python-3.9.0a3.tar.xz two test cases file in the 
limited build environment for openSUSE. We have very limited number of users 
there:

stitny:/home/abuild/rpmbuild/BUILD/Python-3.9.0a3 # cat /etc/passwd 
root:x:0:0:root:/root:/bin/bash
abuild:x:399:399:Autobuild:/home/abuild:/bin/bash
stitny:/home/abuild/rpmbuild/BUILD/Python-3.9.0a3 #

So, tests which expect existence of the user 'nobody' fail:

[  747s] ==
[  747s] ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) 
(user='nobody', close_fds=False)
[  747s] --
[  747s] Traceback (most recent call last):
[  747s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/test/test_subprocess.py", line 
1805, in test_user
[  747s] output = subprocess.check_output(
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 419, in check_output
[  747s] return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 510, in run
[  747s] with Popen(*popenargs, **kwargs) as process:
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 929, in __init__
[  747s] uid = pwd.getpwnam(user).pw_uid
[  747s] KeyError: "getpwnam(): name not found: 'nobody'"
[  747s] 
[  747s] ==
[  747s] ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) 
(user='nobody', close_fds=True)
[  747s] --
[  747s] Traceback (most recent call last):
[  747s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/test/test_subprocess.py", line 
1805, in test_user
[  747s] output = subprocess.check_output(
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 419, in check_output
[  747s] return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 510, in run
[  747s] with Popen(*popenargs, **kwargs) as process:
[  747s]   File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", 
line 929, in __init__
[  747s] uid = pwd.getpwnam(user).pw_uid
[  747s] KeyError: "getpwnam(): name not found: 'nobody'"
[  747s] 
[  747s] --
[  747s]

I am not sure what is the proper solution here. Whether test should be skipped 
if nobody doesn’t exist, or the test should switch to user 0, or the current 
user?

--
components: Tests
messages: 363380
nosy: mcepl, vstinner
priority: normal
severity: normal
status: open
title: test.test_subprocess.POSIXProcessTestCase.test_user fails in the limited 
build environment
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



[issue39854] f-strings with format specifiers have wrong col_offset

2020-03-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This looks like a duplicate of issue 35212

--
nosy: +BTaskaya, pablogsal

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-04 Thread Brett Cannon


Brett Cannon  added the comment:

Yes, I can do it.

And to answer Victor's question on the PR that he closed, we can make any 
individual status check required. So probably:

- Docs
- Ubuntu
- Windows x86
- Windows x64

Just let me know when we are ready to merge a PR and I will switch off Azure 
Pipelines and make these checks required.

--

___
Python tracker 

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



[issue39682] pathlib.Path objects can be used as context managers

2020-03-04 Thread Brett Cannon


Brett Cannon  added the comment:

@Antoine I just quite follow what you mean. Are you saying ditch _closed and 
just leave the context manager to be a no-op?

--

___
Python tracker 

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



[issue39520] AST Unparser can't unparse ext slices correctly

2020-03-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-04 Thread Steve Dower


Steve Dower  added the comment:

There's no PR required. We need to change the required check so when I disable 
new builds from running it won't break existing PRs.

As for actually changing the files in the repo, I don't see any hurry there. We 
can clean up a few of them, and maybe I can move the release build scripts into 
the PC folder (though would have to backport that through to 3.7).

But I'm ready to disable the builds from running as soon as they're not a 
required check.

--

___
Python tracker 

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



[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2020-03-04 Thread Marco Sulla


Marco Sulla  added the comment:

This is IMHO broken.

1. _ensure_list() allows strings, because, documentation says, they are split 
in finalize_options(). But finalize_options() does only split keywords and 
platforms. It does _not_ split classifiers.

2. there's no need that keywords, platforms and classifiers must be a list. 
keywords and platforms can be any iterable, and classifiers can be any non 
text-like iterable. 

Indeed, keywords are written to file using ','.join(), and platforms and 
classifiers are written using DistributionMetadata._write_list(). They both 
accepts any iterable, so I do not understand why such a strict requirement.

--
nosy: +Marco Sulla

___
Python tracker 

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



[issue39848] Warning: 'classifiers' should be a list, got type 'tuple'

2020-03-04 Thread Marco Sulla


Change by Marco Sulla :


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

___
Python tracker 

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



[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-03-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya
versions: +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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is almost certainly a tcl/tk/tkinter on Catalina issue, not an IDLE issue. 
 Screenshots are missing headlight colors, and that should be impossible to 
cause from Python.  In standard python, try

>>> import tkinter as tk
>>> r = tk.Tk()

Should see small (about 2"x2") box.  If not, add
>>> r.mainloop()

And/or, try $ python3 -m turtledemo

--
assignee: terry.reedy -> 
components: +Tkinter -IDLE

___
Python tracker 

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



[issue39809] argparse: add max_text_width parameter to ArgumentParser

2020-03-04 Thread Luca


Luca  added the comment:

I opened two issues regarding the mypy error, I understand it is going to be 
fixed in typeshed:

https://github.com/python/mypy/issues/8487

https://github.com/python/typeshed/issues/3806

--

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Marco Sulla


Marco Sulla  added the comment:

> What would "{} {}".partial_format({}) return?
`str.partial_format()` was proposed exactly to avoid such tricks.

> It is not possible to implement a "safe" variant of str.format(),
> because in difference to Template it can call arbitrary code

If you read the documentation of `Template.safe_substitute()`, you can read 
also this function is not safe at all.

But Python, for example, does not implement private class attributes. Because 
Python is for adult and consciousness people, no?

--

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Marco Sulla


Marco Sulla  added the comment:

@Eric V. Smith: that you for your effort, but I'll never use an API marked as 
private, that is furthermore undocumented.

--

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I just upgraded to 10.14.6 and 3.8.2 and python/IDLE is normal.  (I have so far 
closed the every login 'upgrade to Catalina' box because of reports like this.)

Ned, is current 8.6.10 any better than 8.6.9?

--

___
Python tracker 

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



[issue39842] partial_format()

2020-03-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

Well, I'm the one who made them private, I can make them public if they're 
useful. But I won't do that if you're not willing to look at it.

--

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue39852] IDLE: Copy/Paste behaves like Cut/Paste

2020-03-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The standard and expected behavior is that pasting *without* a selection 
inserts, pasting *with* a selection replaces.  Pasting with key, Edit menu, or 
context menu should be the same.  This is what I see and what I *think* you are 
describing.  If so, please close.  If not, please specify OS and version, how 
you installed Python, and more concretely what you did and whether line numbers 
or code context were present.

--

___
Python tracker 

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



[issue39851] tarfile: Exception ignored in (... stdout ...) BrokenPipeError

2020-03-04 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue39855] test.test_subprocess.POSIXProcessTestCase.test_user fails in the limited build environment

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2020-03-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10
nosy_count: 10.0 -> 11.0
pull_requests: +18140
pull_request: https://github.com/python/cpython/pull/18779

___
Python tracker 

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



[issue27793] Double underscore variables in module are mangled when used in class

2020-03-04 Thread Jan Christoph


Jan Christoph  added the comment:

I would argue to reopen this. Seeing I and other people run into that issue 
(e.g. https://stackoverflow.com/q/40883083/789308) quiet frequently.

Especially since it breaks the `global` keyword, e.g.:

__superprivate = "mahog"

class AClass(object):
def __init__(self, value):
global __superprivate
__superprivate = value

@staticmethod
def get_sp():
return __superprivate

if __name__ == "__main__":
print(__superprivate)  # mahog
try:
print(AClass.get_sp()) 
except NameError as e:
print(e)   # NameError: name '_AClass__superprivate' is not 
defined'
cl = AClass("bla")
print(cl.get_sp()) # bla
__superprivate = 1
print(cl.get_sp()) # bla
print(AClass.get_sp()) # bla

--
nosy: +con-f-use

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-04 Thread STINNER Victor


STINNER Victor  added the comment:

> And to answer Victor's question on the PR that he closed, we can make any 
> individual status check required.

Great! I saw a macOS failure this week which was caused by an internal CI 
error. I hope that it will be fixed soon. In the meanwhile, I would suggest to 
not make the macOS job mandatory, but pay attention manually to its status ;-) 
Apart of macOS, other jobs look reliable.

--

___
Python tracker 

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



[issue27793] Double underscore variables in module are mangled when used in class

2020-03-04 Thread Jan Christoph


Jan Christoph  added the comment:

Just because it is documented, doesn't mean it's not a bug or illogical and 
unexpected.

--

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2020-03-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue39856] glob : some 'unix style' glob items are not supported

2020-03-04 Thread Je GeVa


New submission from Je GeVa :

some common Unix style pathname pattern expansions are not supported :

~/ for $HOME
~user/ for $HOME of user
{1,abc,999} for enumeration

ex:

lets say
$ls ~
hello1.a hello2.a helli3.c

then :
$echo ~/hell*{1,3}.*
hello1.a helli3.c

while
>> glob.glob("~/hel*")
[]
>> glob.glob("/home/jegeva/hel*")
['hello1.a','hello2.a','helli3.c
>> glob.glob("/home/jegeva/hell*{1,3}.*")
[]

--
components: Library (Lib)
messages: 363396
nosy: Je GeVa
priority: normal
severity: normal
status: open
title: glob : some 'unix style' glob items are not supported
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



[issue39298] add BLAKE3 to hashlib

2020-03-04 Thread Jack O'Connor


Jack O'Connor  added the comment:

I've just published some Python bindings for the Rust implementation on PyPI: 
https://pypi.org/project/blake3

> I'm guessing Python is gonna hold off until BLAKE3 reaches 1.0.

That's very fair. The spec and test vectors are set in stone at this point, but 
the implementations are new, and I don't see any reason to rush things out. 
(Especially since early adopters can now use the library above.) That said, 
there aren't really any expected implementation changes that would be a natural 
moment for the implementations to tag 1.0. I'll probably end up tagging 1.0 as 
soon as a caller appears who needs it to be tagged to meet their own stability 
requirements.

--

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Jacin Ferreira


Jacin Ferreira  added the comment:

tk window showing black

--
Added file: https://bugs.python.org/file48952/Screen Shot 2020-03-04 at 2.42.10 
PM.png

___
Python tracker 

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



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-04 Thread Jacin Ferreira


Jacin Ferreira  added the comment:

I've attached the output of the test.pythoninfo as requested.

I am in Dark mode all the time.  I did try Light mode first thing as sometimes 
apps aren't updated to work in Dark mode but the same exact issue happened.

---
bin % /usr/local/bin/python3
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> r = tk.Tk()
>>> ^D

--
Added file: https://bugs.python.org/file48951/test.pythoninfo.output.log

___
Python tracker 

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



[issue39808] pathlib: reword docs for stat()

2020-03-04 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 67152d0ed670227b61b5df683655b196ab04ca1a by Brett Cannon in 
branch 'master':
bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719)
https://github.com/python/cpython/commit/67152d0ed670227b61b5df683655b196ab04ca1a


--
nosy: +brett.cannon

___
Python tracker 

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



[issue39808] pathlib: reword docs for stat()

2020-03-04 Thread Brett Cannon


Brett Cannon  added the comment:

Thanks!

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

___
Python tracker 

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



[issue39808] pathlib: reword docs for stat()

2020-03-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18142
pull_request: https://github.com/python/cpython/pull/18783

___
Python tracker 

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



[issue39808] pathlib: reword docs for stat()

2020-03-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fyi - we just had a test run into this (in a flaky manner - definitely a race 
condition) at work:

```
...
for f in inspect.stack(context=0)
  File "/inspect.py", line 1499, in stack
return getouterframes(sys._getframe(1), context)
  File "/inspect.py", line 1476, in getouterframes
frameinfo = (frame,) + getframeinfo(frame, context)
  File "/inspect.py", line 1446, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
  File "/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/inspect.py", line 732, in getmodule
for modname, module in list(sys.modules.items()):
RuntimeError: dictionary changed size during iteration
```

We haven't diagnosed what was leading to it though.  Trust in the ability to 
use inspect.stack() -> ... -> inspect.getmodule() in multithreaded code is on 
the way out as a workaround.

(this was on 3.6.7)

A workaround we could checkin without consequences should be to change

list(sys.modules.items())  into  list(sys.modules.copy().items()).

I was a bit surprised to see this happen at all, list(dict.items()) seems like 
it should've been done entirely in C with the GIL held the entire time.  but 
maybe I'm just missing where the GIL would be released in the calls to exhause 
the iterator made by 
https://github.com/python/cpython/blob/master/Objects/listobject.c ?

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Serhiy: Why is dict.copy() not thread safe?

if what you say of list(dict) being safe, iterating over that and looking up 
the keys would work.  But all of this is entirely non-obvious to the reader of 
the code.  all of these _look_ like they should be safe.

We should make dict.copy() safe and document the guarantee as such as that one 
could at least be explained when used for that purpose.

--

___
Python tracker 

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



[issue39503] [security][CVE-2020-8492] Denial of service in urllib.request.AbstractBasicAuthHandler

2020-03-04 Thread Ryan Ware


Change by Ryan Ware :


--
nosy: +ware

___
Python tracker 

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



[issue39808] pathlib: reword docs for stat()

2020-03-04 Thread miss-islington


miss-islington  added the comment:


New changeset 6bb67452d4f21e2d948dafce7644b1d66e5efcb8 by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719) (GH-18782)
https://github.com/python/cpython/commit/6bb67452d4f21e2d948dafce7644b1d66e5efcb8


--

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-04 Thread Brett Cannon


Brett Cannon  added the comment:

Actually, I just realized we can't make these status checks required because 
they don't always run. :) Our Actions are smart enough to not run when they 
aren't necessary, i.e. doc changes don't run the rest of the checks. And so 
making the OS-specific tests required would block doc tests.

Basically we would either have to waste runs on things that aren't really 
necessary but then be able to require runs, or we have to just rely on people 
paying attention to failures.

I'm personally for the latter.

--

___
Python tracker 

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



[issue13487] inspect.getmodule fails when module imports change sys.modules

2020-03-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-04 Thread Yury Selivanov


Yury Selivanov  added the comment:

Thank you so much, Stefan, for looking into this. Really appreciate the help.

--

___
Python tracker 

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



  1   2   >