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

2020-03-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

I will take look at this issue :)

--

___
Python tracker 

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



[issue39859] set_herror should not throw away constness of hstrerror

2020-03-04 Thread Andy Lester


Change by Andy Lester :


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

___
Python tracker 

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



[issue39859] set_herror should not throw away constness of hstrerror

2020-03-04 Thread Andy Lester


New submission from Andy Lester :

set_herror builds a string by calling hstrerror but downcasts its return value 
to char *.  It should be const char *.

--
components: Interpreter Core
messages: 363418
nosy: petdance
priority: normal
severity: normal
status: open
title: set_herror should not throw away constness of hstrerror

___
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 Andy Lester


Change by Andy Lester :


--
pull_requests: +18146
pull_request: https://github.com/python/cpython/pull/18789

___
Python tracker 

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



[issue39858] bitfield layout wrong in ctypes

2020-03-04 Thread Sam Price


New submission from Sam Price :

if 8 1 byte fields are included in a ctype field, it allows an extra byte to be 
included in the packing when there is no room left for the next field.

If I put the bitfields in a child structure then I get expected results.
 
In [35]: run ctypeSizeTest.py
Size is  4 Expected 3
0 0x1 a0
0 0x10001 a1
0 0x10002 a2
0 0x10003 a3
0 0x10004 a4
0 0x10005 a5
0 0x10006 a6
0 0x10007 a7
0 0x40008 b0 <- Expected to be at offset 1, not 0.
2 0xc b1 <- Expected to be at offset 1, not 2
Size is  3 Expected 3
0 0x1 a
1 0x4 b0
1 0xc0004 b1

--
components: ctypes
files: ctypeSizeTest.py
messages: 363417
nosy: thesamprice
priority: normal
severity: normal
status: open
title: bitfield layout wrong in ctypes
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: https://bugs.python.org/file48954/ctypeSizeTest.py

___
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 Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This seems to be similar to issue9584. Below are the results in my zsh and bash 
in Mac.

bash

bash-3.2$ cd /tmp/
bash-3.2$ ls *py
hello_1.py  hello_2.py  hello_3.py
bash-3.2$ ls hell*{1-2}.*
ls: hell*{1-2}.*: No such file or directory
bash-3.2$ ls hell*[1-2].*
hello_1.py  hello_2.py

zsh

➜  /tmp ls *py
hello_1.py hello_2.py hello_3.py
➜  /tmp ls hell*{1-2}.*
zsh: no matches found: hell*{1-2}.*
➜  /tmp ls hell*[1-2].*
hello_1.py hello_2.py

Try using []

>>> import glob
>>> glob.glob("hell*[1-2].*")
['hello_2.py', 'hello_1.py']

--
nosy: +serhiy.storchaka, xtreak
type:  -> behavior

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

Screenshot showing results of turtle demo

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

___
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 Petr Viktorin


Petr Viktorin  added the comment:

No, in Python 2 the PyInt object (`int` in Python 2) always did fit into a C 
long -- that was the underlying storage. If it didn't fit, a PyLong object 
(`long` in Python 2) was used.

Python 3 doesn't have PyInt, it only has PyLong (`int` in Python 3).

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue39857] subprocess.run: add an extra_env kwarg to complement existing env kwarg

2020-03-04 Thread Mike Frysinger


New submission from Mike Frysinger :

a common idiom i run into is wanting to add/set one or two env vars when 
running a command via subprocess.  the only thing the API allows currently is 
inherting the current environment, or specifying the complete environment.  
this means a lot of copying & pasting of the pattern:

 env = os.environ.copy()
 env['FOO'] = ...
 env['BAR'] = ...
 subprocess.run(..., env=env, ...)

it would nice if we could simply express this incremental behavior:

 subprocess.run(..., extra_env={'FOO': ..., 'BAR': ...}, ...)

then the subprocess API would take care of copying & merging.

 if extra_env:
   assert env is None
   env = os.environ.copy()
   env.update(extra_env)

this is akin to subprocess.run's capture_output shortcut.

it's unclear to me whether this would be in both subprocess.Popen & 
subprocess.run, or only subprocess.run.  it seems like subprocess.Popen elides 
convenience APIs.

--
components: Library (Lib)
messages: 363413
nosy: vapier
priority: normal
severity: normal
status: open
title: subprocess.run: add an extra_env kwarg to complement existing env kwarg
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



[issue3548] subprocess.pipe function

2020-03-04 Thread Mike Frysinger


Mike Frysinger  added the comment:

this would have been nice to have more than once in my personal projects, and 
in build/infra tooling for Chromium OS.  our alternatives so far have been the 
obvious ones: use subprocess.run to capture & return the output, then manually 
feed that as the input to the next command, and so on.  we know it has obvious 
overhead so we've avoided with large output.

we strongly discourage/ban attempts to write shell code, so the vast majority 
of our commands are argv style (list of strings), so the pipes module wouldn't 
help us.

handling of SIGPIPE tends to be where things get tricky.  that'll have to be 
handled by the API explicitly i think.

--
nosy: +vapier

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

If anyone else has a way to reproduce this issue, please run your tests with a 
3.7/3.8/3.9 interpreter with the fix I committed applied and report back if you 
still see this failure on that line.

I believe this to be fixed based on my own testing so I am closing it out.

--
assignee: eric.araujo -> gregory.p.smith
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
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



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

2020-03-04 Thread miss-islington


miss-islington  added the comment:


New changeset 6b452ff97f70eca79ab956987cc04b6586feca00 by Miss Islington (bot) 
in branch '3.8':
bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. 
(GH-18786)
https://github.com/python/cpython/commit/6b452ff97f70eca79ab956987cc04b6586feca00


--

___
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 miss-islington


miss-islington  added the comment:


New changeset a12381233a243ba7d5151ebf060feb57dd540bef by Miss Islington (bot) 
in branch '3.7':
bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. 
(GH-18786)
https://github.com/python/cpython/commit/a12381233a243ba7d5151ebf060feb57dd540bef


--

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

Testing by changing list(sys.modules.items()) to sys.modules.copy().items() 
internally with a large integration test that was reliably flaky on this line 
before shows that the .copy().items() worked.  The test is reliable again.

So I've gone ahead and pushed those changes in.  PyDict_Copy()'s implementation 
at first ~5 minute glance did not appear to have calls to code I'd expect to 
re-enter Python releasing the GIL.  But I didn't try to do a deep dive.  It 
works for us and is logically equivalent.

--

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


New changeset 85cf1d514b84dc9a4bcb40e20a12e1d82ff19f20 by Gregory P. Smith in 
branch 'master':
bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. 
(GH-18786)
https://github.com/python/cpython/commit/85cf1d514b84dc9a4bcb40e20a12e1d82ff19f20


--

___
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 miss-islington


Change by miss-islington :


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

___
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 miss-islington


Change by miss-islington :


--
pull_requests: +18145
pull_request: https://github.com/python/cpython/pull/18788

___
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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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

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


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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



  1   2   >