[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-01-23 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily


Change by Adam Meily :


--
pull_requests: +17546
pull_request: https://github.com/python/cpython/pull/18159

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily


Change by Adam Meily :


--
pull_requests: +17545
pull_request: https://github.com/python/cpython/pull/18158

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily


Change by Adam Meily :


--
pull_requests: +17544
pull_request: https://github.com/python/cpython/pull/18157

___
Python tracker 

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



[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+

2020-01-23 Thread Adam Meily


Change by Adam Meily :


--
pull_requests: +17543
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18157

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Eryk Sun


Eryk Sun  added the comment:

> can you confirm that the fix is to just change spawn.get_executable() 
> to return sys.executable, like it was prior to the PR mentioned in 
> the other ticket?

Yes, in spawn.py, change `_python_exe = sys._base_executable` to `_python_exe = 
sys.executable`. This is the value that gets returned by spawn.get_executable().

This will restore the operation of the following code in Popen.__init__ in 
popen_spawn_win32.py:

python_exe = spawn.get_executable()

# bpo-35797: When running in a venv, we bypass the redirect
# executor and launch our base Python.
if WINENV and _path_eq(python_exe, sys.executable):
python_exe = sys._base_executable
env = os.environ.copy()
env["__PYVENV_LAUNCHER__"] = sys.executable

This code switches to running the base executable in a virtual environment, 
which is required in order to support duplicating handles to the child or 
stealing handles from the parent. And the startup code in the child process is 
made aware of virtual environment via the "__PYVENV_LAUNCHER__" environment 
variable.

--

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily


Adam Meily  added the comment:

OK, that makes sense.

For 3.7, I can create a PR for that corrects the order of arguments passed into 
_winapi.CreateProcess

For 3.8 / master, the problem appears to be that the check in 
popen_spawn_win32.py to set the subprocess env is failing because 
sys.executable != spawn.get_executable() -- spawn.get_executable() is returning 
sys._base_executable. So, can you confirm that the fix is to just change 
spawn.get_executable() to return sys.executable, like it was prior to the PR 
mentioned in the other ticket?

--

___
Python tracker 

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



[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread edk


edk  added the comment:

It's not only sequences. But I didn't know this had come up before, sorry. 
Maybe the nature of the warning in the source code s a bit misleading?

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



[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Brandt Bucher


Change by Brandt Bucher :


--
resolution:  -> duplicate

___
Python tracker 

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



[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Brandt Bucher


Brandt Bucher  added the comment:

Prior discussion at https://bugs.python.org/issue18305. Note the final comment.

In short, this is a breaking semantic change, and the general consensus is that 
using sum for sequence concatenation is an anti-pattern.

--
nosy: +brandtbucher

___
Python tracker 

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



[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread Ammar Askar


Change by Ammar Askar :


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

___
Python tracker 

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



[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

thanks everyone!

--
resolution:  -> fixed
stage: patch review -> commit review
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



[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 61b3484cdf27ceca1c1069a351487d2db4b2b48c by Miss Islington (bot) 
(Alex Rebert) in branch '3.7':
[3.7] bpo-35182: fix communicate() crash after child closes its pipes 
(GH-18117) (GH-18151)
https://github.com/python/cpython/commit/61b3484cdf27ceca1c1069a351487d2db4b2b48c


--

___
Python tracker 

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



[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 5654f83b9706af88040f515791f1cdc5d81cd9d6 by Miss Islington (bot) 
(Alex Rebert) in branch '3.8':
[3.8] bpo-35182: fix communicate() crash after child closes its pipes 
(GH-18117) (GH-18148)
https://github.com/python/cpython/commit/5654f83b9706af88040f515791f1cdc5d81cd9d6


--
nosy: +miss-islington

___
Python tracker 

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



[issue39440] Use PyNumber_InPlaceAdd in sum() for the second iteration onward

2020-01-23 Thread edk


New submission from edk :

The C implementation of sum() contains this comment:

/* It's tempting to use PyNumber_InPlaceAdd instead of
   PyNumber_Add here, to avoid quadratic running time
   when doing 'sum(list_of_lists, [])'.  However, this
   would produce a change in behaviour: a snippet like
 empty = []
 sum([[x] for x in range(10)], empty)
   would change the value of empty. */

But that doesn't hold after PyNumber_Add has been called once,
because from that point onward the accumulator value is something
we got from an __add__, and the caller can't know if we reuse it.

The in-place version is substantially faster for some workloads--
the example in the comment is an obvious one, but the context in
which I ran into this was using a sum of Counters in a one-liner
a bit like this:

sum((Counter({line.split("|", 3): len(line)}) for line in sys.stdin), 
Counter())

in which significant time seems to be spent adding the contents
of the previous accumulator value to the new one.

# before
; ./python -m timeit 'sum(([x] for x in range(1000)), [])'
500 loops, best of 5: 888 usec per loop

# after
; ./python -m timeit 'sum(([x] for x in range(1000)), [])'
5000 loops, best of 5: 65.3 usec per loop


; cat test_.py 
from collections import Counter
import timeit
import random

data = [Counter({random.choice(['foo', 'bar', 'baz', 'qux']): 
random.randint(1,100)}) for _ in range(1)]

print(min(timeit.repeat('sum(data, Counter())', 'from collections import 
Counter', number=100, globals={'data': data})))
print(min(timeit.repeat('reduce(Counter.__iadd__, data, Counter())', 'from 
collections import Counter; from functools import reduce', number=100, 
globals={'data': data})))

# before
; ./python test_.py
1.8981186050223187
0.7094596439856105

# after
; ./python test_.py 
0.715508968976792
0.7050370009965263

--
messages: 360583
nosy: edk
priority: normal
severity: normal
status: open
title: Use PyNumber_InPlaceAdd in sum() for the second iteration onward
type: performance

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Eryk Sun


Eryk Sun  added the comment:

This is a duplicate of issue 38092. The required change to fix this is very 
simple, if you want to work on a PR.

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> environment variables not passed correctly using new virtualenv 
launching in windows and python3.7+
type:  -> behavior

___
Python tracker 

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



[issue39439] Windows Multiprocessing in Virtualenv: sys.prefix is incorrect

2020-01-23 Thread Adam Meily


New submission from Adam Meily :

I upgraded from Python 3.7.1 to 3.7.6 and began noticing a behavior that was 
breaking my code. My code detects if it's running in a virtualenv. This check 
worked in 3.7.1 but is broken in 3.7.6.

>From the documentation, sys.prefix and sys.exec_prefix should point to the 
>virtualenv when one is active. However, I'm seeing that both of these 
>constants are pointing to the system installation directory and not my 
>virtualenv when I am in a multiprocessing child. Here is an example output of 
>a test application running in 3.7.6 (I've attached the test script to this 
>ticket):

Parent process
=
sys.prefix:   C:\Users\user\project\venv
sys.exec_prefix:  C:\Users\user\project\venv
sys.base_prefix:  C:\Program Files\Python37
sys.base_exec_prefix: C:\Program Files\Python37
=

Subprocess
=
sys.prefix:   C:\Program Files\Python37
sys.exec_prefix:  C:\Program Files\Python37
sys.base_prefix:  C:\Program Files\Python37
sys.base_exec_prefix: C:\Program Files\Python37
=


I would expect that sys.prefix and sys.exec_prefix to be identical in the 
parent and child process.

I verified that this behavior is present in 3.7.5, 3.7.6, and 3.8.1. I am on a 
Windows 10 x64 system.

Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit 
(AMD64)] on win32

--
components: Windows
files: multiproc_venv_prefix.py
messages: 360581
nosy: meilyadam, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows Multiprocessing in Virtualenv: sys.prefix is incorrect
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48862/multiproc_venv_prefix.py

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2020-01-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 65ecc390c1fa5acdd6348ae3f9843bbdcd8870d1 by Pablo Galindo in 
branch 'master':
bpo-17005: Minor improvements to the documentation of TopologicalSorter 
(GH-18155)
https://github.com/python/cpython/commit/65ecc390c1fa5acdd6348ae3f9843bbdcd8870d1


--

___
Python tracker 

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



[issue39436] Strange behavior of comparing int and float numbers

2020-01-23 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Further to what Matthew said, this is not just a Python oddity. It applies to 
just about all programming languages, including C, C++, Java, Javascript, Ruby, 
etc. Some of them have even less precision by default.

Floats are not the same as the real numbers you learned about in school. There 
is a huge amount of resources about the limitations of floating point 
arithmetic on Stackoverflow etc which can be found by googling. A good place to 
start is the Python FAQs and tutorial:

https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate

https://docs.python.org/3/tutorial/floatingpoint.html#tut-fp-issues

--
nosy: +steven.daprano

___
Python tracker 

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



[issue39438] better handling of foreign signal handlers in signal.signal

2020-01-23 Thread Steven G. Johnson


New submission from Steven G. Johnson :

In embedded Python, if the embedding code sets a signal handler (e.g. for 
SIGINT), then signal.getsignal(SIGINT) returns None.   However, 
signal.signal(SIGINT, signal.getsignal(SIGINT)) throws a TypeError, even though 
it should logically be a no-op.   This behavior is all implemented in 
Modules/signalmodule.c and seems to have been around since 2.7 at least.

(Background: We observed this in Julia, which embeds Python in order to call 
Python code, where matplotlib code that temporarily set signal(SIGINT, SIG_DFL) 
led to an exception when it tried to restore the original signal handler.  See 
https://github.com/JuliaPy/PyPlot.jl/issues/459)

The C program below exhibits this problem [it sets its own SIGINT handler and 
then starts up Python to execute signal(SIGINT,getsignal)].   Running it 
results in "TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, 
or a callable object"

Recommended changes:

1) if Handlers[signalnum].func == NULL, then signal(signalnum, None) should be 
a no-op, returning None. This will allow signal(signalnum, 
getsignal(signalnum)) to always succeed (as a no-op).

2) if Handlers[signalnum].func == NULL, then signal(signalnum, SIG_DFL) should 
be a no-op, returning None.  That is, the default signal handler should be the 
foreign signal handler if one is installed.

3) The signal-handling documentation should warn against overriding the signal 
handler for any signalnum where getsignal(signalnum) returns None (i.e. a 
foreign signal handler), since there is no way to restore the original signal 
handler afterwards. Anyway, you should be cautious about overriding signal 
handlers that don't come from Python.   

test code that throws a TypeError (compile and link with libpython):

#include 
#include 
#include 
void myhandler(int sig) { printf("got signal %d\n", sig); }
int main(void)
{
signal(SIGINT, myhandler);
Py_InitializeEx(0);
PyRun_SimpleString("import signal\n"
   "old_signal = signal.getsignal(signal.SIGINT)\n"
   "signal.signal(signal.SIGINT, old_signal)\n"
   "print(old_signal)\n");
Py_Finalize();
return 0;
}

--
components: Library (Lib)
messages: 360578
nosy: Steven G. Johnson
priority: normal
severity: normal
status: open
title: better handling of foreign signal handlers in signal.signal
type: behavior
versions: Python 2.7, Python 3.5, 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



[issue17005] Add a topological sort algorithm

2020-01-23 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +17541
pull_request: https://github.com/python/cpython/pull/18155

___
Python tracker 

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



[issue39437] collections.Counter support multiplication

2020-01-23 Thread Ammar Askar


Ammar Askar  added the comment:

Duplicate of https://bugs.python.org/issue25478

See Raymond's open PR here: https://github.com/python/cpython/pull/6574

--
nosy: +ammar2
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Consider adding a normalize() method to collections.Counter()

___
Python tracker 

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



[issue39426] Pickler docstring misstates default and highest protocols

2020-01-23 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> patch review
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



[issue39437] collections.Counter support multiplication

2020-01-23 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17539
pull_request: https://github.com/python/cpython/pull/18153

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue39437] collections.Counter support multiplication

2020-01-23 Thread Dominick Johnson


New submission from Dominick Johnson :

I would love to see collections.Counter support scalar multiplication.

## My Use Case:

I am writing a python script to manage hardware selections for custom-build 
computers. Users are able to select various options from a web interface, and 
the script compiles a list of parts that need purchased.

Each option for user selection has a corresponding Counter object to keep track 
of what parts are needed for that selection. For example, the user option "i5 
Processor" would have a corresponding counter that might looks roughly like 
this: {"i5-": 1, "x Motherboard"}. A user option for "2 TB RAID 10" 
might have {"1 TB HDD": 4}.

The script adds all the counters for the selected options together to produce a 
counter detailing the full parts list for the build.

I'd like to add a feature to the script that allows the user to also specify a 
quantity for certain selections. (Maybe the user wants 2 1TB Storage Drives 
without any kind of RAID setup). It would be really convenient to be able to 
simply multiply the selection's counter by it's quantity before adding it to 
the main counter. e.g. `main_counter += secondary_counter * selection_quantity`

This seems like an extremely simple feature to add, and I would of course be 
willing to add it myself as long as the Python team is willing to accept a pull 
request from me adding this feature. However, I've never contributed to such a 
large project before, so I'm not sure what kind of procedures are in place to 
make it happen.

--
components: Library (Lib)
messages: 360573
nosy: Dominick Johnson
priority: normal
severity: normal
status: open
title: collections.Counter support multiplication
type: enhancement
versions: Python 3.5, 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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-01-23 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

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



[issue39436] Strange behavior of comparing int and float numbers

2020-01-23 Thread Matthew Barnett


Change by Matthew Barnett :


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



[issue39436] Strange behavior of comparing int and float numbers

2020-01-23 Thread Matthew Barnett


Matthew Barnett  added the comment:

Python floats have 53 bits of precision, so ints larger than 2**53 will lose 
their lower bits (assumed to be 0) when converted.

--
nosy: +mrabarnett
resolution:  -> not a bug

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 5a2356be1a3f4a9b2e509a16062016b7d9dee7e9 by Miss Islington (bot) 
in branch '3.8':
bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)
https://github.com/python/cpython/commit/5a2356be1a3f4a9b2e509a16062016b7d9dee7e9


--

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 0c12d70bfdedf85c62e1c2b8c55ef4e84e6ee461 by Miss Islington (bot) 
in branch '3.7':
bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)
https://github.com/python/cpython/commit/0c12d70bfdedf85c62e1c2b8c55ef4e84e6ee461


--
nosy: +miss-islington

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 7142df5ea23b4ce0efb72746b4b3b65414e8dcb1 by Terry Jan Reedy 
(Shanavas M) in branch 'master':
bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)
https://github.com/python/cpython/commit/7142df5ea23b4ce0efb72746b4b3b65414e8dcb1


--
nosy: +terry.reedy

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +17538
pull_request: https://github.com/python/cpython/pull/18152

___
Python tracker 

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



[issue39436] Strange behavior of comparing int and float numbers

2020-01-23 Thread Petr Pisl


New submission from Petr Pisl :

When python compares float and int created from the same int number should be 
equal like 

int(1) == float(1)

but from 9007199254740993 this is not true. 

int(9007199254740993) == float(9007199254740993) is not true. The same behavior 
is for bigger odd numbers. The even numbers are still equal. So it looks like:

int(9007199254740989) == float(9007199254740989) # True
int(9007199254740990) == float(9007199254740990) # True
int(9007199254740991) == float(9007199254740991) # True
int(9007199254740992) == float(9007199254740992) # True
int(9007199254740993) == float(9007199254740993) # False
int(9007199254740994) == float(9007199254740994) # True
int(9007199254740995) == float(9007199254740995) # False
int(9007199254740996) == float(9007199254740996) # True
int(9007199254740997) == float(9007199254740997) # False
int(9007199254740998) == float(9007199254740998) # True

--
messages: 360571
nosy: Petr Pisl
priority: normal
severity: normal
status: open
title: Strange behavior of comparing int and float numbers
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



[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2020-01-23 Thread Brett Cannon


Brett Cannon  added the comment:

Sorry, you're right; I forgot importlib got it "right" while import got it 
"wrong". :)

--

___
Python tracker 

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



[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-23 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-01-23 Thread Guido Imperiale


New submission from Guido Imperiale :

(1)
In the documentation for loads(), the name for the first argument of loads is 
'bytes_object'. The actual signature, both in pickle.py and _pickle.c, it is 
instead 'data'.

(2)
In the documentation and in pickle.py, the default value for the 'buffers' 
parameter is None. However, in _pickle.c, it is an empty tuple (); this is also 
reflected by running the interpreter:

In [1]: inspect.signature(pickle.loads).parameters['buffers']   


 
Out[1]: 

Thanks to @hauntsaninja for spotting these in 
https://github.com/python/typeshed/pull/3636

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 360569
nosy: crusaderky, docs@python
priority: normal
severity: normal
status: open
title: pickle: inconsistent arguments pickle.py vs _pickle.c vs docs
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



[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-23 Thread Dong-hee Na


Change by Dong-hee Na :


--
title: Add float __floordiv__ fast path -> Remove unnecessary logic of float 
__floordiv__

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

@mark.dickinson

I extract the common function.
Now maintainence cost is same as AS-IS.

optimization is still work :)

AS-IS: Mean +- std dev: 360 ns +- 19 ns
TO-BE: Mean +- std dev: 185 ns +- 8 ns

what do you think?

--

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2020-01-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 99e6c260d60655f3d2885af545cbc220b808d492 by Pablo Galindo in 
branch 'master':
bpo-17005: Add a class to perform topological sorting to the standard library 
(GH-11583)
https://github.com/python/cpython/commit/99e6c260d60655f3d2885af545cbc220b808d492


--

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

> (e.g., because someone decides to "fix" the floor float division)

Okay, what if we create a common divmod function except for creating a tuple?

--

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Mark Dickinson


Mark Dickinson  added the comment:

So the risk here is that by adding the floordiv fast path, the division code is 
duplicated, and that increases the risk of accidentally losing the invariant 
that `a // b` is interchangeable with `divmod(a, b)[0]` (e.g., because someone 
decides to "fix" the floor float division). That and the usual increased 
maintenance cost of more code.

Whether the optimization is worth the cost, I'm not sure. My gut feeling is 
not, but others may have different views.

--

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 993811ffe75c2573f97fb3fd1414b34609b8c8db by Miss Islington (bot) 
in branch '3.8':
bpo-39421: Fix posible crash in heapq with custom comparison operators 
(GH-18118)
https://github.com/python/cpython/commit/993811ffe75c2573f97fb3fd1414b34609b8c8db


--

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

And on the other side,

>>> 3.8 // 0.0
Traceback (most recent call last):
  File "", line 1, in 
ZeroDivisionError: float divmod()

I think that people expect 
ZeroDivisionError: float floor division by zero

not the current message.
I caught this optimization issue during I investigate about the error message.

--

___
Python tracker 

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



[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-23 Thread Alex Rebert


Change by Alex Rebert :


--
pull_requests: +17537
pull_request: https://github.com/python/cpython/pull/18151

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

> Is this worth optimizing? Floating-point floor division is a comparatively 
> rare operation.

1. I don't want to say that this should always be optimized.
2. However, this operation is a relatively primitive python operation. I think 
this optimization is easy to bring and worth it.
3. Besides, the relatively unchanged logic, so the maintenance cost is not 
expected to be large

--
nosy: +vstinner

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel


Change by Stefan Behnel :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel


Change by Stefan Behnel :


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

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17535
pull_request: https://github.com/python/cpython/pull/18149

___
Python tracker 

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



[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-23 Thread Alex Rebert


Change by Alex Rebert :


--
pull_requests: +17534
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/18148

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread Ned Deily


Ned Deily  added the comment:


New changeset c563f409ea30bcb0623d785428c9257917371b76 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
bpo-39421: Fix posible crash in heapq with custom comparison operators 
(GH-18118) (GH-18146)
https://github.com/python/cpython/commit/c563f409ea30bcb0623d785428c9257917371b76


--
nosy: +ned.deily

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Mark Dickinson


Mark Dickinson  added the comment:

Is this worth optimising? Floating-point floor division is a comparatively rare 
operation.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


Change by Dong-hee Na :


--
type:  -> performance

___
Python tracker 

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



[issue39434] Add float __floordiv__ fast path

2020-01-23 Thread Dong-hee Na


New submission from Dong-hee Na :

./python.exe -m pyperf timeit "a = 3.5" "b = a // 2"
AS-IS: Mean +- std dev: 377 ns +- 4 ns
my patch: Mean +- std dev: 204 ns +- 2 ns

--
assignee: corona10
messages: 360559
nosy: corona10
priority: normal
severity: normal
status: open
title: Add float __floordiv__ fast path

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


miss-islington  added the comment:


New changeset 958064f8d2b84062b0582bbae911df8ccfc11fd6 by Miss Islington (bot) 
in branch '3.7':
bpo-39421: Fix posible crash in heapq with custom comparison operators 
(GH-18118)
https://github.com/python/cpython/commit/958064f8d2b84062b0582bbae911df8ccfc11fd6


--
nosy: +miss-islington

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel


Change by Stefan Behnel :


--
nosy: +scoder

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel


Change by Stefan Behnel :


--
stage:  -> needs patch

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17530
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18144

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 79f89e6e5a659846d1068e8b1bd8e491ccdef861 by Pablo Galindo in 
branch 'master':
bpo-39421: Fix posible crash in heapq with custom comparison operators 
(GH-18118)
https://github.com/python/cpython/commit/79f89e6e5a659846d1068e8b1bd8e491ccdef861


--

___
Python tracker 

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



[issue39433] curses.setupterm can raise _curses.error

2020-01-23 Thread Julien Palard


New submission from Julien Palard :

Currently the curses module can raise some `_curses.error` exception directly 
inheriting `Exception`.

This make it non-trivial for a newcomer to catch (they think they need a `from 
_curses import error`, or an `except Exception`, but in fact `error` is 
imported, in `curses/__init__.py`, in an `_curses import *`).

The `curses.error` is documented, but it's not documented that 
`curses.setupterm` can raise it and what the user sees on the exception message 
is "_curses.error" not "curses.error".


Questions:

- Should we create a properly named curse.CurseException, inheriting from 
_curses.error, so people can slowly migrate to use a "properly" named exception 
class?
- Should we document that setupterm can raise it?
- Should we introduce a dedicated sphinx directive to document exceptions?

I know the third question opens a whole field of work in the doc, it's only an 
anecdote but a student of mine pointed out yesterday that the doc is *not* 
telling what `int()` raises when an invalid argument is given. It's obvious for 
"us", but not for everybody (Yes I can teach it, yes he can just try it, but 
I'm not behind everyone on earth learning Python, some are learning alone, and 
I also want them to succeed).

--
components: Library (Lib)
messages: 360556
nosy: mdk
priority: normal
severity: normal
status: open
title: curses.setupterm can raise _curses.error
type: behavior

___
Python tracker 

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



[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-23 Thread Alex Gaynor


Change by Alex Gaynor :


--
keywords: +security_issue
nosy: +alex

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread da-woods


New submission from da-woods :

Distuitls generates "export symbols" for extension modules to help ensure that 
they have have the correct linkage on Windows.

https://github.com/python/cpython/blob/0d30ae1a03102de07758650af9243fd31211325a/Lib/distutils/command/build_ext.py#L692

It generates the correct symbol in most causes, but if the filename contains 
unicode characters then it creates the wrong symbol, causing linkage errors.

The behaviour should be updated to reflect PEP-489: 
https://www.python.org/dev/peps/pep-0489/#export-hook-name

--
components: Distutils
messages: 360555
nosy: da-woods, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Distutils generates the wrong export symbol for unicode module names
type: behavior
versions: Python 3.5, 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



[issue17659] no way to determine First weekday (based on locale)

2020-01-23 Thread Cédric Krier

Cédric Krier  added the comment:

I submitted https://github.com/python/cpython/pull/18142 which implements 
(based on the initial patch) a function locale.getfirstweekday(). The 
implementation supports glibc (if _NL_TIME_FIRST_WEEKDAY is defined) and 
Windows (not yet tested).
I did not keep the nl_langinfo because I do not think it is good to have 
platform dependent definition.

--
nosy: +ced
versions: +Python 3.9 -Python 3.4

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2020-01-23 Thread Cédric Krier

Change by Cédric Krier :


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

___
Python tracker 

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



[issue39431] Mention nonlocal too in assignment quirk

2020-01-23 Thread Shanavas M


New submission from Shanavas M :

Doc says "A special quirk of Python is that -- if no :keyword:`global` 
statement is in  A special quirk of Python is that -- if no :keyword:`global` 
or :keyword:`nonlocal`
effect -- assignments to names always go into the innermost scope."

nonlocal should also be mentioned along with global

--
assignee: docs@python
components: Documentation
messages: 360553
nosy: docs@python, shanavasm
priority: normal
pull_requests: 17528
severity: normal
status: open
title: Mention nonlocal too in assignment quirk
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



[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol


Maciej Gol  added the comment:

Uploading fixed file (the former had a typo)

--
Added file: https://bugs.python.org/file48861/test.py

___
Python tracker 

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



[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol


Change by Maciej Gol :


Removed file: https://bugs.python.org/file48860/test.py

___
Python tracker 

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



[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-23 Thread Maciej Gol


New submission from Maciej Gol :

Hey guys,

We have a component that archives and unarchives multiple files in separate 
threads that started to
misbehave recently.

We have noticed a bunch of `AttributeError: module 'lzma' has no attribute 
'LZMAFile'` errors, which are
unexpected because our python is not compiled with LZMA support.

What is unfortunate, is that given the traceback:

Traceback (most recent call last):
  File "test.py", line 18, in 
list(pool.map(test_lzma, range(100)))
  File "/opt/lang/python37/lib/python3.7/concurrent/futures/_base.py", line 
598, in result_iterator
yield fs.pop().result()
  File "/opt/lang/python37/lib/python3.7/concurrent/futures/_base.py", line 
428, in result
return self.__get_result()
  File "/opt/lang/python37/lib/python3.7/concurrent/futures/_base.py", line 
384, in __get_result
raise self._exception
  File "/opt/lang/python37/lib/python3.7/concurrent/futures/thread.py", 
line 57, in run
result = self.fn(*self.args, **self.kwargs)
  File "test.py", line 14, in test_lzma
tarfile.open(fileobj=buf, mode="r")
  File "/opt/lang/python37/lib/python3.7/tarfile.py", line 1573, in open
return func(name, "r", fileobj, **kwargs)
  File "/opt/lang/python37/lib/python3.7/tarfile.py", line 1699, in xzopen
fileobj = lzma.LZMAFile(fileobj or name, mode, preset=preset)
AttributeError: module 'lzma' has no attribute 'LZMAFile'


the last line of the traceback is right AFTER this block (tarfile.py:1694):

try:
import lzma
except ImportError:
raise CompressionError("lzma module is not available")


Importing lzma in ipython fails properly:

In [2]: import lzma 
  
---
ModuleNotFoundError   Traceback (most recent call last)
 in 
> 1 import lzma

/opt/lang/python37/lib/python3.7/lzma.py in 
25 import io
26 import os
---> 27 from _lzma import *
28 from _lzma import _encode_filter_properties, 
_decode_filter_properties
29 import _compression

ModuleNotFoundError: No module named '_lzma'

When trying to debug the problem, we have noticed it's not deterministic. In 
order to reproduce it,
we have created a test python that repeatedly writes an archive to BytesIO and 
then reads from it.
Using it with 5 threads and 100 calls, gives very good chances of reproducing 
the issue. For us it
was almost every time.

Race condition occurs both on Python 3.7.3 and 3.7.6.
Test script used to reproduce it attached.

I know that the test script writes uncompressed archives and during opening 
tries to guess the compression.
But I guess this is a legitimate scenario and should not matter in this case.

--
files: test.py
messages: 360551
nosy: Maciej Gol
priority: normal
severity: normal
status: open
title: tarfile.open(mode="r") race condition when importing lzma
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48860/test.py

___
Python tracker 

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



[issue39279] Don't allow non-Ascii digits in platform.py

2020-01-23 Thread Xiang Zhang


Xiang Zhang  added the comment:

@Ezio, at least for my config they are all ASCII digits. But still I don't 
think there is any rush to change current behaviour.

--

___
Python tracker 

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



[issue39380] ftplib uses latin-1 as default encoding

2020-01-23 Thread Eric V. Smith


New submission from Eric V. Smith :

What's the reason behind this change? I love UTF-8 and all, but is there some 
standard (de facto or de jure) that discusses this?

What does this change fix? What's the implication to existing clients?

I'm not opposed to the change per se, but I'd like to understand the reasoning.

--
nosy: +eric.smith

___
Python tracker 

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



[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2020-01-23 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +17527
pull_request: https://github.com/python/cpython/pull/18141

___
Python tracker 

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



[issue39320] Handle unpacking of */** arguments and rvalues in the compiler

2020-01-23 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 13bc13960cc83dbd1cb5701d9a59ac9b9144b205 by Mark Shannon in 
branch 'master':
bpo-39320: Handle unpacking of *values in compiler (GH-17984)
https://github.com/python/cpython/commit/13bc13960cc83dbd1cb5701d9a59ac9b9144b205


--

___
Python tracker 

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