[issue33113] Query performance is very low and can even lead to denial of service

2018-03-20 Thread guohui

New submission from guohui :

I found a issue in regex (findall search)function, when seaching some content 
by some pattern, the function return for a long long time, match performance is 
very low.
I think this issue could lead to too low query performance, or a attacker may 
exploit the issue to cause a denail of service condition.


system:  python 2.7.14  regex(2018.2.21)
poc:

import re
pat = r'^(\(?[\w\d\-\.\\]{3,}\|?){1,}[\w\d\-\.\\]{3,}\)?$'
#plaintext content
content = 
r'(ftp\x3a\x2f\x2f|http\x3a\x2f\x2f|https\x3a\x2f\x2f|c\x3a\x2f\x2f|d\x3a\x2f\x2f|e\x3a\x2f\x2f)a'
result = re.findall(pat, content)
print result

--
components: Regular Expressions
files: test_performance.py
messages: 314187
nosy: ezio.melotti, ghi5107, mrabarnett
priority: normal
severity: normal
status: open
title: Query performance is very low and can even lead to denial of service
type: security
versions: Python 2.7
Added file: https://bugs.python.org/file47495/test_performance.py

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread Guido van Rossum

Guido van Rossum  added the comment:

Hmm... That is actually a not entirely imaginary risk, right? Can you come
up with a test program that would fail that way?

--

___
Python tracker 

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



[issue32941] mmap should expose madvise()

2018-03-20 Thread Zackery Spytz

Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +5927
stage:  -> patch review

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread INADA Naoki

INADA Naoki  added the comment:

If there are some code which depend on ABC.__subclasscheck__() allow class-like 
object, we'll have to revert it in 3.7b4 or rc.
I think it's the only risk.

--

___
Python tracker 

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



[issue33093] Fatal error on SSL transport

2018-03-20 Thread kyuupichan

kyuupichan  added the comment:

Looks like https://bugs.python.org/issue33037

--
nosy: +kyuupichan

___
Python tracker 

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



[issue28577] ipaddress.ip_network(...).hosts() returns nothing for an IPv4 /32

2018-03-20 Thread Xiang Zhang

Xiang Zhang  added the comment:

I fixed #27683 since it looks more like an oversight and regression to me 
instead of a deliberate change. I'd like the behaviour to be consistent across 
versions. As for "/32", it needs discussion or some expert makes a choice.

--
resolution: not a bug -> 
stage: resolved -> 
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5926

___
Python tracker 

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



[issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory

2018-03-20 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset 8f6eccdc64cab735c47620fea948e64b19f83684 by Eric V. Smith in 
branch 'master':
bpo-32896: Fix error when subclassing a dataclass with a field that uses a 
default_factory (GH-6170)
https://github.com/python/cpython/commit/8f6eccdc64cab735c47620fea948e64b19f83684


--

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread Xiang Zhang

Change by Xiang Zhang :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue18802] ipaddress documentation errors

2018-03-20 Thread Xiang Zhang

Change by Xiang Zhang :


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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset ae2feb32e7eff328199ce7d527593b3c2aa1fcab by Miss Islington (bot) 
in branch '3.6':
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
https://github.com/python/cpython/commit/ae2feb32e7eff328199ce7d527593b3c2aa1fcab


--

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread Guido van Rossum

Guido van Rossum  added the comment:

While we're in feature freeze mode, we're not in release candidate mode
yet. I presume the code that would be patched in 3.7 is no different from
master? What's the concern? It doesn't seem anyone thinks it's risky?

--

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-03-20 Thread Tim Peters

Tim Peters  added the comment:

factorial(float) was obviously intended to work the way it does, so I'd leave 
it alone in whatever changes are made to resolve _this_ issue.  I view it as a 
harmless-enough quirk, but, regardless, if people want to deprecate it that 
should be a different issue.

What the code ends up doing for Decimal and Fraction and 
god-only-knows-what-else is just as obviously confused.  So clean that up and 
declare victory ;-)

--
nosy: +tim.peters

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset 3326c9267f9df15fa77094b8a740be4eaa4b9374 by Miss Islington (bot) 
in branch '3.7':
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
https://github.com/python/cpython/commit/3326c9267f9df15fa77094b8a740be4eaa4b9374


--
nosy: +miss-islington

___
Python tracker 

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



[issue18802] ipaddress documentation errors

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset 481cbe8d6202658a7908d97f19f7e9e6061e3df3 by Miss Islington (bot) 
in branch '3.6':
bpo-18802: Add more details to ipaddress documentation (GH-6083)
https://github.com/python/cpython/commit/481cbe8d6202658a7908d97f19f7e9e6061e3df3


--

___
Python tracker 

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



[issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory

2018-03-20 Thread Eric V. Smith

Change by Eric V. Smith :


--
keywords: +patch
pull_requests: +5925
stage:  -> patch review

___
Python tracker 

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



[issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory

2018-03-20 Thread Eric V. Smith

Change by Eric V. Smith :


--
priority: deferred blocker -> release blocker
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



[issue18802] ipaddress documentation errors

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset a323eee4c481c88f2b4030bbb224d9bc6bc14c9c by Miss Islington (bot) 
in branch '3.7':
bpo-18802: Add more details to ipaddress documentation (GH-6083)
https://github.com/python/cpython/commit/a323eee4c481c88f2b4030bbb224d9bc6bc14c9c


--
nosy: +miss-islington

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5924

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5923

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2018-03-20 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 10b134a07c898c2fbc5fd3582503680a54ed80a2 by Xiang Zhang in branch 
'master':
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
https://github.com/python/cpython/commit/10b134a07c898c2fbc5fd3582503680a54ed80a2


--

___
Python tracker 

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



[issue18802] ipaddress documentation errors

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5922

___
Python tracker 

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



[issue18802] ipaddress documentation errors

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5921

___
Python tracker 

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



[issue18802] ipaddress documentation errors

2018-03-20 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 5609b78392d59c7362ef8aa5c4a4529325f01f27 by Xiang Zhang (Cheryl 
Sabella) in branch 'master':
 bpo-18802: Add more details to ipaddress documentation (GH-6083)
https://github.com/python/cpython/commit/5609b78392d59c7362ef8aa5c4a4529325f01f27


--

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset 47a0e64ccf711e8d6d0c497d565ca7e2e82de7d4 by Miss Islington (bot) 
in branch '3.6':
bpo-28247: Document Windows executable creation in zipapp (GH-6158)
https://github.com/python/cpython/commit/47a0e64ccf711e8d6d0c497d565ca7e2e82de7d4


--

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread miss-islington

miss-islington  added the comment:


New changeset a70b8f593657f563116001f654587620271eb9ae by Miss Islington (bot) 
in branch '3.7':
bpo-28247: Document Windows executable creation in zipapp (GH-6158)
https://github.com/python/cpython/commit/a70b8f593657f563116001f654587620271eb9ae


--
nosy: +miss-islington

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5920

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5919

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread Paul Moore

Paul Moore  added the comment:


New changeset 4be79f29463f632cd8b48486feadc2ed308fb520 by Paul Moore (Cheryl 
Sabella) in branch 'master':
bpo-28247: Document Windows executable creation in zipapp (GH-6158)
https://github.com/python/cpython/commit/4be79f29463f632cd8b48486feadc2ed308fb520


--

___
Python tracker 

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



[issue33061] NoReturn missing from __all__ in typing.py

2018-03-20 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
pull_requests: +5918

___
Python tracker 

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



[issue33061] NoReturn missing from __all__ in typing.py

2018-03-20 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I think it makes sense to also fix this in 3.7. I will prepare a backport now.

--

___
Python tracker 

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



[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-20 Thread Ned Deily

Ned Deily  added the comment:

Are you by any chance trying to run this under IDLE?

--
nosy: +ned.deily

___
Python tracker 

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



[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

2018-03-20 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> Would it be worthwhile to show an example of a subclass that overrides or 
> extends  __new__?

I think yes. I would actually add few examples what could (and maybe also 
couldn't) be done with named tuples.

--

___
Python tracker 

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



[issue33018] Improve issubclass() error checking and message

2018-03-20 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I am still -1 on changing this in Python 3.7, unless Guido wants this in 3.7, 
if yes, then we can go ahead. Otherwise, I think we can consider just merging 
this into master, in this case I would switch to the PR to discuss the details.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-20 Thread Eric V. Smith

Change by Eric V. Smith :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-20 Thread Adrian Stachlewski

Adrian Stachlewski  added the comment:

There's nothing to do, thanks for help one more again.

--
status: pending -> open

___
Python tracker 

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



[issue33112] SequenceMatcher bug

2018-03-20 Thread Tim Peters

Tim Peters  added the comment:

Please see the response to issue31889.  Short course:  you need to pass 
`autojunk=False` to the SequenceMatcher constructor.

--
nosy: +tim.peters
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-03-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Nofar,

Are you still interested in working on this issue?  Thanks!

--
nosy: +csabella

___
Python tracker 

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



[issue33112] SequenceMatcher bug

2018-03-20 Thread Martin

New submission from Martin :

difflib.SequenceMatcher fails to make a proper alignment between 2 sequences 
with only 3 single letter changes. Its performance is completely off with a 
similarity ratio of 0.16, in stead of the more accurate 0.99.

Here is a snippet to replicate the failure:
>>> aa_ref = 
>>> 'MTLFTTLLVLIFERLFKLGEHWQLDHRLEAFFRRVKHFSLGRTLGMTIIAMGVTFLLLRALQGVLFNVPTLLVWLLIGLLCIGAGKVRLHYHAYLTAASRNDSHARATMAGELTMIHGVPAGCDEREYLRELQNALLWINFRFYLAPLFWLIVGGTWGPVTLMGYAFLRAWQYWLARYQTPHHRLQSGIDAVLHVLDWVPVRLAGVVYALIGHGEKALPAWFASLGDFHTSQYQVLTRLAQFSLAREPHVDKVETPKAAVSMAKKTSFVIALLTIYGALV'
>>> aa_seq = 
>>> 'MTLFTTLLVLIFERLFKLGEHWQLDHRLEAFFRRVKHFSLGRTLCMTIIAMGVTFLLLRALQGVLFNVPTLLVWLLIGLLCIGAGKVRLHYHAYLTAASRNDSHAHATMAGELTMIHGVPAGCDEREYLRELQNALLWINFRFYLAPLFWLIVGGTWGPVTLMGYAFLRAWQYWLARYQTPHHRLQSGIDAVLHALDWVPVRLAGVVYALIGHGEKALPAWFASLGDFHTSQYQVLTRLAQFSLAREPHVDKVETPKAAVSMAKKTSFVIALLTIYGALV'
>>> sum(a!=b for a, b in zip(aa_ref, aa_seq))
3
>>> match = SequenceMatcher(a=aa_ref, b=aa_seq)
>>> match.ratio()
0.1619718309859155
>>> match.get_opcodes()
[('equal', 0, 43, 0, 43), ('delete', 43, 79, 43, 43), ('equal', 79, 81, 43, 
45), ('replace', 81, 122, 45, 80), ('equal', 122, 123, 80, 81), ('replace', 
123, 284, 81, 284)]

--
messages: 314163
nosy: mcft
priority: normal
severity: normal
status: open
title: SequenceMatcher bug
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue33082] multiprocessing docs bury very important 'callback=' args

2018-03-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't really agree that "callbacks are really important in multiprocessing" 
(I think I've hardly ever used them).  I agree with the other doc changes in 
the PR.

--

___
Python tracker 

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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread Antoine Pitrou

Change by Antoine Pitrou :


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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset f3e6eadbcf4f3e0fe53f4784485b1c8464c7d282 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6160)
https://github.com/python/cpython/commit/f3e6eadbcf4f3e0fe53f4784485b1c8464c7d282


--

___
Python tracker 

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



[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-20 Thread Ethan Welty

Change by Ethan Welty :


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



[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-20 Thread Ethan Welty

New submission from Ethan Welty :

Merely importing tkinter breaks the use of parallel code on my system (Mac OSX 
10.11.6, tested on Python 2.7.13 / 2.7.14 / 3.5.0 / 3.6.4, all barebones 
distributions installed with pyenv). I've tested this with both multiprocessing 
and sharedmem (see minimal scripts below).

The issue seems to apply only to functions that evoke multithreading within 
their respective package (e.g. `numpy.matmul()`, 
`cv2.SIFT.detectAndCompute()`). If I make the matrix in the scripts below much 
smaller (e.g. change `5000` to `5`), avoiding internal multithreading, the 
scripts work.

## with `multiprocessing`

```python
import numpy as np
import multiprocessing
import _tkinter

def parallel_matmul(x):
R = np.random.randn(3, 3)
return np.matmul(R, x)

pool = multiprocessing.Pool(4)
results = pool.map(parallel_matmul, [np.random.randn(3, 5000) for i in 
range(2)])
```

> *Code never exits and Python has to be force quit*

## with `sharedmem`

```python
import numpy as np
import sharedmem
import _tkinter

def parallel_matmul(x):
R = np.random.randn(3, 3)
return np.matmul(R, x)

with sharedmem.MapReduce() as pool:
results = pool.map(parallel_matmul,
[np.random.randn(3, 5000) for i in range(2)])
```

> sharedmem.sharedmem.SlaveException: slave process 1 killed by signal 11

--
components: Tkinter
messages: 314160
nosy: ezwelty
priority: normal
severity: normal
status: open
title: Merely importing tkinter breaks parallel code (multiprocessing, 
sharedmem)
type: crash
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.8

___
Python tracker 

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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 56cce1ca84344f519f7ed01024434c083031d354 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)
https://github.com/python/cpython/commit/56cce1ca84344f519f7ed01024434c083031d354


--

___
Python tracker 

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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5917

___
Python tracker 

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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5916
stage: resolved -> patch review

___
Python tracker 

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



[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Reopening for 3.x backports, as per Robert's advice.

--
status: closed -> open
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Paul,

Thanks for your response.  I've made the pull request from your patch, so it 
would great if you could review it.  Thanks!

--

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +5915

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Wolfgang Maier

Wolfgang Maier  added the comment:

_wants_ is a bit a strong word, but, at least, you can do a bit a nicer job 
than the default error, like printing a nicely formatted list of subcommands as 
you would get it with the main parsers help.
In fact, in my own code I'm actually catching the missing subparser situation, 
then calling parse_args again with ['--help'] :)

--

___
Python tracker 

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



[issue25345] Unable to install Python 3.5 on Windows 10

2018-03-20 Thread Steve Dower

Steve Dower  added the comment:

Yeah, very strange that only some MSIs are being affected by this error. They 
no doubt have something in common.

If by clean boot you mean reinstalling Windows, then yes, that fixes most 
issues, but it is pretty drastic :)

I don't actually have any good recommendations for fixing Windows Installer 
problems... there used to be a troubleshooting tool available, but I'm not sure 
where it's gone. All the best advice I can find online these days basically 
just says to reinstall, but you could try System Restore first (and it may even 
help to create a new restore point and then restore to it - I suspect that will 
reset some state without losing anything you installed recently).

Without full access to your machine and much better installer diagnostic skills 
than I have there's nothing else I can offer, sorry.

--

___
Python tracker 

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



[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Guido van Rossum

Guido van Rossum  added the comment:

Such a mechanism exists, and is called Protocols. See PEP 544 
(https://www.python.org/dev/peps/pep-0544/). While the PEP is still in draft, 
it is supported by mypy. You need to import the 'Protocol' base class from 
typing_extensions (which is a PyPI module, so use `pip install 
typing_extensions`).

--
resolution:  -> works for me
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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile

Anthony Sottile  added the comment:

Yeah, I picked the default value `True` because I couldn't actually find a user 
of subparsers that _wanted_ optional subparsers. ¯\_(ツ)_/¯

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Wolfgang Maier

Wolfgang Maier  added the comment:

On 03/20/2018 04:38 PM, Anthony Sottile wrote:
> 
> Anthony Sottile  added the comment:
> 
> The intention of the change in issue 26510 was to pick the least surprising 
> behaviour for the default value of subparsers -- the compatiblity with the 
> behaviour before the regression was introduced in 3.3 was a nice side-effect. 
>  As with the rest of positional arguments in argparse, the positional 
> subparsers were changed to required by default.
> 

Since the 3.3 change happened a long time ago and has been kept through 
the next three releases, I never considered it a regression, but rather 
thought the original behavior was an oddity of early Python 3s (I've 
never written an argparse-based parser in Python 2), so it's interesting 
to see this in the larger historical context.

Overall, I think "least surprising" is in the eye of the beholder here 
and I want to emphasize that I'm all for your change of adding the 
keyword argument, just not so convinced about your choice of the default.

My main argument for a default of False and against True: having True as 
the default will only lead people used to the Python 2 and pre-3.3 way 
of things to think that they have code working for Python 3, when, in 
fact, that code will break under 3.3-3.6, and, at least, 3.6 will stay 
in widespread use for a long time (even Ubuntu 18.04 will still ship 
with it as the default python3, so Python3.6 will outlast the life cycle 
of Python 2 by a good measure).
Conversely, most projects are dropping Python 3.2 support these days or 
have done so already, so nobody really cares about how things worked in 
this version (I think it's telling along these lines that your - 
corrected - SO link dates back from 2013). So I think, it is
a rather unnecessary incompatibility you are introducing for project 
maintainers even if the original issue was a regression.

> The main issue addressing the 3.3 regression I believe is 
> https://bugs.python.org/issue9253 and not the one linked.
> 
> When I revived the patch, I surveyed a number of open source tools using 
> subparsers (~10-20) and they all fell into the following categories:
> 
> - Used the workaround (part of this SO post: 
> https://stackoverflow.com/a/23354355/812183) (most fell into this category)
> - crashed with some sort of TypeError (NoneType has no attribute startswith, 
> KeyeError: None, etc.) due to not handling "optional" subparsers
> - Manually handled when the subparser was `None` to raise an argparse error

As yet another option, and similar to the third one on your list, I'm 
using the set_defaults method of the subparser, and I'm checking whether 
the corresponding key is present in the Namespace.

> 
> You can enable a 3.3-3.7 compatible "always optional subparsers" with a 
> similar pattern that was used to manually restore the pre-regression 
> behaviour:
> 
> subparsers = parser.add_subparsers(...)
> subparsers.required = False
> 

Ah, right! That's a good option. Didn't realize it would work this way, 
too :)

But a still think you should consider my above argument.

> I believe the error message issue is already tracked: 
> https://bugs.python.org/issue29298
> 

I see, that looks as if it would fix this part. It would be great if it 
could get merged into Python 3.7 still.

> --
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2018-03-20 Thread Sam Martin

New submission from Sam Martin :

Whilst working with concurrent.futures and ThreadPoolExecutors, my colleague 
and I have noted some undocumented behaviour.

When adding a done_callback to a future that has already completed, we note 
that that callback is executed directly, outside of any try...except statement. 
 However, both the docs and the _invoke_callbacks methods will wrap any 
done_callbacks in a try...except statement which logs the result and returns.

Could we either update the documentation to mention that callback behaviour may 
raise if added to an already completed future, or simply add the same 
try...except wrapping that the _invoke_callback method already uses please? 
(Preferably the latter)

The two pieces of the futures library I am referring to can be viewed here:
_invoke_callbacks: 
https://github.com/python/cpython/blob/master/Lib/concurrent/futures/_base.py#L323

add_done_callback: 
https://github.com/python/cpython/blob/master/Lib/concurrent/futures/_base.py#L403

I would note, that the test code which covers this area of the code, doesn't 
currently exercise this particular condition.  The closest test I could find is 
test_done_callback_already_failed, which checks that a callback can retrieve an 
exception from a future, but it does not validate what happens when a callback 
raises when the future it is attached to is already complete.
Source: 
https://github.com/python/cpython/blob/c3d9508ff22ece9a96892b628dd5813e2fb0cd80/Lib/test/test_concurrent_futures.py#L1012

The other test closely related is test_done_callback_raises, however this 
doesn't check the behaviour of a callback when added to an already completed 
future.  We should be able to simulate this by moving the f.set_result line to 
above the f.add_done_callback lines?

Source: 
https://github.com/python/cpython/blob/c3d9508ff22ece9a96892b628dd5813e2fb0cd80/Lib/test/test_concurrent_futures.py#L990

--
components: Library (Lib)
messages: 314151
nosy: samm
priority: normal
severity: normal
status: open
title: Adding a done callback to a concurrent.futures Future once it has 
already completed, may raise an exception, contrary to docs
type: behavior
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



[issue33108] Unicode char 304 in lowercase has len = 2

2018-03-20 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

It has never been the case that upper() or lower() are guaranteed to preserve 
string length in Unicode. For example, some characters decompose into a base 
plus combining characters. Ligatures are another example. See here for more 
details:

https://unicode.org/faq/casemap_charprop.html


However, this example surprises me. In Python 2, I get the result I expected:

py> c = unichr(304)
py> unicodedata.name(c)
'LATIN CAPITAL LETTER I WITH DOT ABOVE'
py> unicodedata.name(c.lower())
'LATIN SMALL LETTER I'


If I am reading the UnicodeData.txt file correctly, I think that the right 
behaviour is for LATIN CAPITAL LETTER I WITH DOT ABOVE to lowercase to LATIN 
SMALL LETTER I, as it did in Python 2.

ftp://ftp.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt

--
nosy: +steven.daprano

___
Python tracker 

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



[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-20 Thread Nathan Henrie

Nathan Henrie  added the comment:

I've continued looking into this.

If you have your limits configured higher than default, as I did (and which 
seems to be working fine):

```
sudo launchctl limit maxfiles 64000 524288
ulimit -Sn 64000
```

then you'll find that having a soft limit (`NUM_FDS`, prior to the `-=32`) 
greater than 10273 causes the error I was seeing.

First, I found this number by passing in NUM_FDS as an envvar to the unittest 
and looping in a bash script, but I have since extracted some of the relevant 
portions to a separate python script:

```python
import selectors
import socket
import sys

def main(NUM_FDS):
s = selectors.PollSelector()

NUM_FDS -= 32

sockets = []

try:
for i in range(NUM_FDS // 2):
try:
rd, wr = socket.socketpair()
sockets.extend([rd, wr])
except OSError as e:
print(f"err 2: {type(e)} {e}")
# too many FDs, skip - note that we should only catch EMFILE
# here, but apparently *BSD and Solaris can fail upon connect()
# or bind() with EADDRNOTAVAIL, so let's be safe
print("FD limit reached")

try:
s.register(rd, selectors.EVENT_READ)
s.register(wr, selectors.EVENT_WRITE)
except OSError as e:
print(f"err 3: {type(e)} {e}")
if e.errno == errno.ENOSPC:
# this can be raised by epoll if we go over
# fs.epoll.max_user_watches sysctl
print("FD limit reached")
raise

try:
slen = len(s.select())
except OSError as e:
print(f"err 4: {type(e)} {e}")
raise
print(f"asserting {NUM_FDS // 2} == {slen}")
assert NUM_FDS // 2 == slen

finally:
for sock in sockets:
sock.close()
s.close()
print("Closed")

if __name__ == "__main__":
main(int(sys.argv[1]))
```


```shellsession
$ ./python.exe tester.py 10273
asserting 5120 == 5120
Closed
$ ./python.exe tester.py 10274
err 4:  [Errno 22] Invalid argument
Closed
Traceback (most recent call last):
  File "tester.py", line 50, in 
main(int(sys.argv[1]))
  File "tester.py", line 36, in main
slen = len(s.select())
  File "cpython/Lib/selectors.py", line 376, in select
fd_event_list = self._poll.poll(timeout)
OSError: [Errno 22] Invalid argument
```

Tested and confirmed that I can provoke the error with the above launchctl / 
ulimit settings on my wife's Macbook Air.

I wonder if the 10273 limit I'm running up against has something to do with the 
10240 number I keep running into as a default kern.maxfilesperproc 
(https://unix.stackexchange.com/a/350824/77904), given the `NUM_FDS -= 32` in 
the test.

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile

Anthony Sottile  added the comment:

Grabbed the wrong SO link, I believe this is the one I meant to link to: 
https://stackoverflow.com/a/18283730/812183

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile

Anthony Sottile  added the comment:

The intention of the change in issue 26510 was to pick the least surprising 
behaviour for the default value of subparsers -- the compatiblity with the 
behaviour before the regression was introduced in 3.3 was a nice side-effect.  
As with the rest of positional arguments in argparse, the positional subparsers 
were changed to required by default.

The main issue addressing the 3.3 regression I believe is 
https://bugs.python.org/issue9253 and not the one linked.

When I revived the patch, I surveyed a number of open source tools using 
subparsers (~10-20) and they all fell into the following categories:

- Used the workaround (part of this SO post: 
https://stackoverflow.com/a/23354355/812183) (most fell into this category)
- crashed with some sort of TypeError (NoneType has no attribute startswith, 
KeyeError: None, etc.) due to not handling "optional" subparsers
- Manually handled when the subparser was `None` to raise an argparse error

You can enable a 3.3-3.7 compatible "always optional subparsers" with a similar 
pattern that was used to manually restore the pre-regression behaviour:

subparsers = parser.add_subparsers(...)
subparsers.required = False

I believe the error message issue is already tracked: 
https://bugs.python.org/issue29298

--

___
Python tracker 

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



[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Ned Deily

Change by Ned Deily :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue33108] Unicode char 304 in lowercase has len = 2

2018-03-20 Thread Kiril Dimitrov

Kiril Dimitrov  added the comment:

This is roughly my use case:
zip( "ßx", [0.5, 0.3]) is [('ß', 0.5), ('x', 0.3)]
zip("ßx".upper(), [0.5, 0.3])  will be [('S', 0.5), ('S', 0.3)] in later
case you never get to see the value for 'x'.

At least my expectation was that lower and upper should preserve text
length. At least this seemed to be the case in python2.7

2018-03-20 15:28 GMT+02:00 INADA Naoki :

>
> INADA Naoki  added the comment:
>
> Another example:
>
> >>> s = "ß"
> >>> len(s)
> 1
> >>> len(s.upper())
> 2
> >>> s.upper()
> 'SS'
> >>> ord(s)
> 223
>
>
> > This breaks unicode text matching.
>
> What do you talking about? re module?
>
> --
> nosy: +inada.naoki
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Wolfgang Maier

New submission from Wolfgang Maier :

I find the True default for 'required' quite cumbersome introduced as a result 
of issue 26510.

With existing parsers it can unnecessarily break compatibility between 
Python3.x versions only to make porting a bit easier for Python2 users.
I think, this late in the life cycle of Python2, within Python3 compatibility 
should be ranked higher than py2to3 portability.

Command line parsing of a package of mine has long used optional subparsers 
(without me even thinking much about the fact). Now in 3.7, running

python3.7 -m MyPackage

without arguments (the parser is in __main__.py) I get the ill-formatted error 
message:

__main__.py: error: the following arguments are required: 

while my code in 3.3 - 3.6 was catching the empty Namespace returned and 
printed a help message.

Because the 'required' keyword argument did not exist in < 3.7 there was no 
simple way for me to write code that is compatible between all 3.x versions. 
What I ended up doing now is to check sys.argv before trying to parse things, 
then print the help message, when that only has a single item, just to keep my 
existing code working.

OTOH, everything would be just fine with a default value of False.
Also that truncated error message should be fixed before 3.7 gets released.

--
components: Library (Lib)
messages: 314145
nosy: Anthony Sottile, bethard, eric.araujo, memeplex, paul.j3, wolma
priority: normal
severity: normal
status: open
title: argparse: make new 'required' argument to add_subparsers default to 
False instead of True
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-20 Thread Paul Ganssle

Paul Ganssle  added the comment:

> Donald made an interesting suggestion over on 
> https://github.com/pypa/packaging-problems/issues/127#issuecomment-374401331, 
> which was to have distutils stop overwriting the Author metadata with the 
> Maintainer metadata when both are specified and instead emit a warning about 
> an unknown keyword argument.

To be honest, that would not have helped in this situation. I didn't encounter 
this bug in distutils, I encountered it in setuptools, and I tried fixing it in 
both places because the comments on issue 962772 indicated that this *should* 
have been supported in distutils.

In the end I think it's fair to either freeze the distutils API and add a 
DeprecationWarning to indicate that this is no longer supported and everyone 
should move to setuptools or modernize it completely.

--

___
Python tracker 

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



[issue33108] Unicode char 304 in lowercase has len = 2

2018-03-20 Thread INADA Naoki

INADA Naoki  added the comment:

Another example:

>>> s = "ß"
>>> len(s)
1
>>> len(s.upper())
2
>>> s.upper()
'SS'
>>> ord(s)
223


> This breaks unicode text matching.

What do you talking about? re module?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue33108] Unicode char 304 in lowercase has len = 2

2018-03-20 Thread Kiril Dimitrov

Change by Kiril Dimitrov :


--
title: Unicode char 304 in lowercase has len 2 -> Unicode char 304 in lowercase 
has len = 2

___
Python tracker 

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



[issue33108] Unicode char 304 in lowercase has len 2

2018-03-20 Thread Kiril Dimitrov

New submission from Kiril Dimitrov :

>>> chr(304)
'İ'
>>> chr(304).lower()
'i̇'
>>> len(chr(304).lower())
2

This breaks unicode text matching. There is no other unicode character with the 
same behaviour (in 3.6.2 and 3.6.4).

--
components: Unicode
messages: 314142
nosy: Kiril Dimitrov, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Unicode char 304 in lowercase has len 2
type: behavior
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



[issue33107] Feature request: more typing.SupportsXXX

2018-03-20 Thread Siyuan Ren

New submission from Siyuan Ren :

Currently in module `typing` we have the following classes

* SupportsInt
* SupportsFloat
* SupportsComplex
* SupportsBytes
* SupportsRound

There is no reason that people only need these classes. They may need, say, 
`SupportsIndex` to denote all integer like types, `SupportsAdd` for arithmetic 
types, etc. It is best that the list of `SupportsXXX` are expanded to be as 
complete as possible, and even better, a mechanism for user specified 
`SupportsXXX` be provided.

--
components: Library (Lib)
messages: 314141
nosy: Siyuan Ren
priority: normal
severity: normal
status: open
title: Feature request: more typing.SupportsXXX
type: enhancement
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



[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-20 Thread Matt Eaton

Matt Eaton  added the comment:

Berker and Eric, thank you very much.  I really like the idea of introducing a 
new API with more strict parsing rules for this situation. I would be willing 
to put some ideas down on a first pass at this.

--

___
Python tracker 

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



[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-20 Thread Berker Peksag

Berker Peksag  added the comment:

The problem with adding a port_validation argument is that the port attribute 
is not the only thing that is computed lazily. There is also hostname, 
username, password attributes etc.

I think the best way would be introducing a new API with more strict parsing 
rules. For example:

from urllib.parse URL

url = URL('http://Server=sde; Service=sde:oracle').parse()

would raise a ValueError earlier than urlparse() and return a immutable 
namedtuple.

Such an API can be designed as a standalone module first and then can be added 
into the existing urllib.parse module. I'd personally happy to review and 
discuss such a modern and user friendly API in the standard library.

I think Eric has explained the current situation perfectly and we can now close 
this issue. We can create a new issue or a new python-ideas thread when or if 
we have a prototype of a new API.

Thank you, everyone!

--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-20 Thread Nick Coghlan

Nick Coghlan  added the comment:

The linked PR has the draft test case for this - it goes beyond the ones I used 
to find the cause of the problem by actually checking that sys.warnoptions and 
sys._xoptions have been populated as expected.

--

___
Python tracker 

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



[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-20 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +5914
stage:  -> patch review

___
Python tracker 

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



[issue11566] hypot define in pyconfig.h clashes with g++'s cmath

2018-03-20 Thread Jeroen Demeyer

Change by Jeroen Demeyer :


--
nosy: +jdemeyer

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread Paul Moore

Paul Moore  added the comment:

Hi Cheryl,
Looks like I dropped the ball on this one :-( I think it just needs to be 
applied to the main branch (3.7/3.8) - I don't think it's worth backporting.

I'll try to get to it when I can, but it may not be for a few weeks, as I have 
other stuff on my plate at the moment. I've not done anything under the new 
github workflow, so I don't want to rush it and risk making mistakes. I'm happy 
if someone else wants to merge it in the meantime.

--
versions: +Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-20 Thread Nick Coghlan

Nick Coghlan  added the comment:

Donald made an interesting suggestion over on 
https://github.com/pypa/packaging-problems/issues/127#issuecomment-374401331, 
which was to have distutils stop overwriting the Author metadata with the 
Maintainer metadata when both are specified and instead emit a warning about an 
unknown keyword argument.

I'm not sure we'd want to change the behaviour of mapping Maintainer -> Author 
(since it's a nice way to retain credit in the code, while changing the 
metadata on PyPI to reflect the current metadata), but I *do* think it would be 
reasonable to have distutils emit a warning that metadata version 1.1 can't 
represent the maintainer information properly, and folks should upgrade to 
using setuptools instead.

Éric, your thoughts?

--

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2018-03-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Hi Paul,

Were you interested in moving forward with this doc change?

--
nosy: +csabella

___
Python tracker 

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



[issue19417] Bdb: add a unittest file (test.test_bdb)

2018-03-20 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +5913

___
Python tracker 

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



[issue33084] Computing median, median_high an median_low in statistics library

2018-03-20 Thread Eric V. Smith

Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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