[issue37483] Add PyObject_CallOneArg()

2019-07-02 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Variadic macros are not part of C89, so that would require changing PEP 7.

--

___
Python tracker 

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



[issue37490] poor documentation for .startswith, .endswith

2019-07-02 Thread Glenn Linderman


Glenn Linderman  added the comment:

Or is 

text.startswith(('day', 'month', 'year'), 8, 12)

the same as

text[8:12] in ('day', 'month', 'year')


What happens if the text doesn't have as many as 12 characters? What if it 
doesn't have more than 8 characters?

--

___
Python tracker 

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



[issue37490] poor documentation for .startswith, .endswith

2019-07-02 Thread Glenn Linderman


New submission from Glenn Linderman :

The documentation is reasonably clear regarding the first parameter, which can 
be a string or a tuple of strings to match at the start or end of a string.

However, the other two parameters are much less clear in their effect.

text = "Now the day is over"
text.startswith('the', 2, 8)

Does it produce True because 'w the' is at the beginning of the text[2:] ? 
Maybe. Or because there is an ending position, must it fail because it doesn't 
match all of text[2:8] ?

text.startswith('day', 8, 10)

Does this produce True because everything in day matches text[8:10] or must it 
always produce false for any value of text because the match is never as long 
as the prefix string?

text.startswith(('day', 'month', 'year'), 8, 12)

Can this ever match day or month, because it is comparing to text[8:12], or can 
only year match because of the start and end?

Is there a difference between the following:

text.startswith(('day', 'month', 'year'), 8, 12)
text[8:12].startswith(('day', 'month', 'year'))

If no difference, why does startswith even need the extra two parameters? Maybe 
only in performance?

If no difference, why doesn't the documentation describe it that way, so that 
it could be far clearer?

If there is a difference, what is the difference?

Similar questions for endswith.

--
messages: 347179
nosy: v+python
priority: normal
severity: normal
status: open
title: poor documentation for .startswith, .endswith

___
Python tracker 

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



[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-02 Thread Aldwin Pollefeyt


Change by Aldwin Pollefeyt :


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

___
Python tracker 

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



[issue37489] pickling instance which inherited from Exception with keyword only parameter

2019-07-02 Thread liugang


New submission from liugang :

-- code 1
import pickle

class MyException():
def __init__(self, desc, *, item):
super().__init__()
self.desc = desc
self.item = item

def __getnewargs_ex__(self):
print('called in {}.__getnewargs_ex__'.format(self.__class__.__name__))
return (self.desc,), self.__dict__

e = MyException('testing', item='cpu')
s = pickle.dumps(e, protocol=-1)

x = pickle.loads(s)


-- code 2
import pickle

class MyException(Exception):
def __init__(self, desc, *, item):
super().__init__()
self.desc = desc
self.item = item

def __getnewargs_ex__(self):
print('called in {}.__getnewargs_ex__'.format(self.__class__.__name__))
return (self.desc,), self.__dict__

e = MyException('testing', item='cpu')
s = pickle.dumps(e, protocol=-1)

x = pickle.loads(s)

in code 1, the class is inherted from object, __getnewargs_ex__ is called and 
the returned args, kwargs are passed to __new__/__init__ to construct object 
when pickling.

in code 2, the class is inherted from Exception, __getnewargs_ex__ is not 
called, and rasie an exception of "TypeError: __init__() missing 1 required 
positional argument: 'desc'"

I think this is not python issue, it should be the right behavior of Exception. 
I want to known why it is, and how to implement the logic in code 2 (passing 
keyword only parameter to __new__/__init__ when pickling for class inherted 
from Exception)

--
components: Library (Lib)
messages: 347178
nosy: liugang93
priority: normal
severity: normal
status: open
title: pickling instance which inherited from Exception with keyword only 
parameter
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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3 by Miss Islington (bot) 
in branch '3.8':
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
https://github.com/python/cpython/commit/b8e198a5d09ca876b87baaf6efd2b2e7c9e3a0b3


--

___
Python tracker 

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



[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-02 Thread Gregory Szorc


Gregory Szorc  added the comment:

I'm a bit busy with other things this week to submit a PR.

--

___
Python tracker 

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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 6323ac1dd49ddbd935ac3354cc5d792c743e7018 by Miss Islington (bot) 
in branch '3.7':
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
https://github.com/python/cpython/commit/6323ac1dd49ddbd935ac3354cc5d792c743e7018


--
nosy: +miss-islington

___
Python tracker 

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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14385
pull_request: https://github.com/python/cpython/pull/14566

___
Python tracker 

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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14384
pull_request: https://github.com/python/cpython/pull/14565

___
Python tracker 

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



[issue37441] Fix a param error in exceptions.rst

2019-07-02 Thread Xiang Zhang


Xiang Zhang  added the comment:


New changeset aeecf380660ea459d85bb5f59d76bb54f757b5be by Xiang Zhang (Hai Shi) 
in branch 'master':
bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453)
https://github.com/python/cpython/commit/aeecf380660ea459d85bb5f59d76bb54f757b5be


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-02 Thread hai shi


Change by hai shi :


--
pull_requests: +14383
pull_request: https://github.com/python/cpython/pull/14453

___
Python tracker 

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



[issue37466] Move casting prompt after its validation in _raw_input()

2019-07-02 Thread myungsekyo


myungsekyo  added the comment:

Thanks to your reviews!
I understood what you mean.
This patch is unnecessary.
I will close this issue.

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



[issue37483] Add PyObject_CallOneArg()

2019-07-02 Thread Inada Naoki


Inada Naoki  added the comment:

What do you think about macro like this?

  #define _PyObject_CALL_WITH_ARGS(func, ...) \
  _PyObject_Vectorcall(func, (PyObject*[]){NULL, __VA_ARGS__} + 1, \
  sizeof((PyObject*[]){__VA_ARGS__})/sizeof(PyObject*) | 
PY_VECTORCALL_ARGUMENTS_OFFSET, \
  NULL)

Pros: it can be used for 2 or 3 arguments too.
Cons: readability...

--
nosy: +inada.naoki

___
Python tracker 

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



[issue18697] Unify arguments names in Unicode object C API documentation

2019-07-02 Thread Rune Tynan


Rune Tynan  added the comment:

It has been over a month and I'm still waiting for an updated PR review. I 
understand if people are busy, but don't want this to just fall through the 
cracks.

--

___
Python tracker 

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



[issue37403] Recommend .venv for virtual environment names

2019-07-02 Thread Brett Cannon


Change by Brett Cannon :


--
stage: needs patch -> resolved

___
Python tracker 

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



[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread Brett Cannon


Brett Cannon  added the comment:

Would it be worth to set 'parent' to None in this instance? Might break code 
but would also be potentially less surprising.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue37459] importlib docs improperly reference get_resource_loader()

2019-07-02 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26967] argparse: allow_abbrev=False stops -vv from working

2019-07-02 Thread daniel hahler


daniel hahler  added the comment:

https://github.com/python/cpython/pull/14316 has a fix.

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



[issue18075] Infinite recursion tests triggering a segfault

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset dcc0eb379613f279864af61023ea44c94aa0535c by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/dcc0eb379613f279864af61023ea44c94aa0535c


--

___
Python tracker 

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



[issue37437] update vendorized expat to 2.2.7

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset cc0bf97d61fbe844843f28abc510a11f3ef09942 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
closes bpo-37437: Update vendorized expat to 2.2.7. (GH-14436)
https://github.com/python/cpython/commit/cc0bf97d61fbe844843f28abc510a11f3ef09942

New changeset 3e24dd52bba863fce4f3c6a34ca9f813666ed181 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470)
https://github.com/python/cpython/commit/3e24dd52bba863fce4f3c6a34ca9f813666ed181

New changeset 6348364ba5a76c66bd8a8e5466d7f9db435b88e3 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
Put pyexpatns.h include back. bpo-37437 (GH-14539)
https://github.com/python/cpython/commit/6348364ba5a76c66bd8a8e5466d7f9db435b88e3


--

___
Python tracker 

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



[issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 30c2ae4dcfd19acbdfb7045151c73d5700eec7b4 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304) 
(GH-14369)
https://github.com/python/cpython/commit/30c2ae4dcfd19acbdfb7045151c73d5700eec7b4


--

___
Python tracker 

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



[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5b45fb0a449543fab6e7b606e51b739cb316d3c4 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-37428: Don't set PHA verify flag on client side (GH-14421) (GH-14493)
https://github.com/python/cpython/commit/5b45fb0a449543fab6e7b606e51b739cb316d3c4


--

___
Python tracker 

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



[issue37440] httplib should enable post-handshake authentication for TLS 1.3

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset f97eb883d8a29ee9718147b3631ebd2741273d9b by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448) 
(GH-14496)
https://github.com/python/cpython/commit/f97eb883d8a29ee9718147b3631ebd2741273d9b


--

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 070fae6d0ff49e63bfd5f2bdc66f8eb1df3b6557 by Ned Deily (Christian 
Heimes) in branch '3.7':
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
https://github.com/python/cpython/commit/070fae6d0ff49e63bfd5f2bdc66f8eb1df3b6557


--

___
Python tracker 

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



[issue37156] Fix libssl DLL tag in Tools/msi project

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 9ad5e9edea08b0d377902d556624f03a2b8bb29b by Ned Deily (Steve 
Dower) in branch '3.7':
bpo-37156: Fix libssl DLL tag in MSI sources (GH-14219)
https://github.com/python/cpython/commit/9ad5e9edea08b0d377902d556624f03a2b8bb29b


--
nosy: +ned.deily

___
Python tracker 

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



[issue35360] Update SQLite to 3.28 in Windows and macOS installer builds

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset c58fc3af75b54203b26008b6942709bb07d00fc6 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179)
https://github.com/python/cpython/commit/c58fc3af75b54203b26008b6942709bb07d00fc6


--

___
Python tracker 

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



[issue32627] Header dependent _uuid build failure on Fedora 27

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset e90815b3b16ab196c10f3a4dd91402cdc2e07d06 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-32627: Fix compile error when conflicting `_uuid` headers included 
(GH-11751)
https://github.com/python/cpython/commit/e90815b3b16ab196c10f3a4dd91402cdc2e07d06


--

___
Python tracker 

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



[issue34602] python3 resource.setrlimit strange behaviour under macOS

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset dcc0eb379613f279864af61023ea44c94aa0535c by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
https://github.com/python/cpython/commit/dcc0eb379613f279864af61023ea44c94aa0535c


--

___
Python tracker 

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



[issue37369] Issue with pip in venv on Powershell in Windows

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 3c34ea97a341e4dd80b542c99c593f014a8ae410 by Ned Deily (Steve 
Dower) in branch '3.7':
bpo-37369: Fixes path for sys.executable when running from the Microsoft Store 
(GH-14450)
https://github.com/python/cpython/commit/3c34ea97a341e4dd80b542c99c593f014a8ae410

New changeset 57eba3aff16016be84b2fa8532b4f618fec79d97 by Ned Deily (Steve 
Dower) in branch '3.7':
bpo-37369: Fix venv and test symlinking (GH-14456)
https://github.com/python/cpython/commit/57eba3aff16016be84b2fa8532b4f618fec79d97

New changeset a88652e488edc7664f395ba1a22b5e46539d01d3 by Ned Deily (Steve 
Dower) in branch '3.7':
bpo-37369: Fix path handling when python.exe is used as a symlink (GH-14461)
https://github.com/python/cpython/commit/a88652e488edc7664f395ba1a22b5e46539d01d3


--

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14382
pull_request: https://github.com/python/cpython/pull/14564

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-07-02 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I still think the only way to read the documentation for parseaddr('a@b@c') is 
to return ('', '') - a tuple of empty strings.

The documentations says:

"Returns a tuple of that information, unless the parse fails, in which case a 
2-tuple of ('', '') is returned."

Of course, it doesn't define exactly what a "failing parse" is, but I would 
claim that a non-RFC compliant address should fail to parse, at least for the 
parseaddr() interface.

I'm not concerned about inconsistencies between message_from_string() and 
parseaddr().  They are difference APIs.

I'll follow up on the PR, but does anybody disagree with that reasoning?

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14381
pull_request: https://github.com/python/cpython/pull/14563

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Christian Heimes

Christian Heimes  added the comment:

Ned, Łukasz, thanks for your patience.

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14380
pull_request: https://github.com/python/cpython/pull/14562

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 024ea2170b7c1652a62cc7458e736c63d4970eb1 by Miss Islington (bot) 
in branch '3.7':
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
https://github.com/python/cpython/commit/024ea2170b7c1652a62cc7458e736c63d4970eb1


--

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 3cba3d3c55f230a59174a0dfcafb1d4685269e60 by Miss Islington (bot) 
in branch '3.8':
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
https://github.com/python/cpython/commit/3cba3d3c55f230a59174a0dfcafb1d4685269e60


--

___
Python tracker 

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



[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests:  -14375

___
Python tracker 

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



[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-02 Thread Steve Dower


Steve Dower  added the comment:

For the record, I am 100% in favor of deprecating and removing bdist_wininst 
and bdist_msi from distutils as soon as possible, as they are maintenance 
burdens and bdist_wininst in particular often attracts AV false positives.

setuptools is welcome to either do the same or restore the functionality, I 
don't have any preference if someone else is maintaining it (but I'd suggest 
removal there too until someone wants to maintain it).

Some of our distributions of Python already exclude bdist_wininst, so it can't 
be blindly relied on. And I don't know that it was ever upgraded for PEP 514. 
So far I have heard zero complaints about this, though as Paul Ganssle pointed 
out on the PR they're not likely to be using the "newer" packages.

So consider me +1 for deprecate in 3.8 (we can still do that, right? it's just 
docs and a warning on use) and remove in 3.9 or 3.10 as appropriate.

--
components: +Distutils, Windows -Library (Lib)
nosy: +dstufft, eric.araujo, p-ganssle, paul.moore, steve.dower, tim.golden, 
zach.ware

___
Python tracker 

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



[issue37482] Email address display name fails with both encoded words and special chars

2019-07-02 Thread B Siemerink


Change by B Siemerink :


--
title: Email header fails with both encoded words and special chars -> Email 
address display name fails with both encoded words and special chars

___
Python tracker 

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



[issue37482] Email header fails with both encoded words and special chars

2019-07-02 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14376
pull_request: https://github.com/python/cpython/pull/14559

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14377
pull_request: https://github.com/python/cpython/pull/14560

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 477b1b25768945621d466a8b3f0739297a842439 by Miss Islington (bot) 
(Christian Heimes) in branch 'master':
bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)
https://github.com/python/cpython/commit/477b1b25768945621d466a8b3f0739297a842439


--
nosy: +miss-islington

___
Python tracker 

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



[issue37411] testEnviron (test.test_wsgiref.HandlerTests) fails when environment variable X is set

2019-07-02 Thread hai shi


Change by hai shi :


--
pull_requests: +14375
pull_request: https://github.com/python/cpython/pull/14453

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Łukasz Langa

Łukasz Langa  added the comment:

FTR 3.8b2 is also waiting for this fix due to the expert's (that's you, 
Christian!) priority setting.

--

___
Python tracker 

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



[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Colin


Colin  added the comment:

I personally find it easier to understand if inheritance is the default 
behaviour, instead of having to explicitly disable a feature that's seems 
primarily designed for non-herited dataclasses.

But whatever suits best the community :-)

Thanks for the quick reply

--

___
Python tracker 

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



[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree with xtreak that this works as designed and isn't a bug.

--
assignee:  -> eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp()

2019-07-02 Thread Paul Ganssle


New submission from Paul Ganssle :

Between Python 2 and Python 3, the meaning of a naive datetime underwent a 
subtle change. Previously a naive datetime was mostly treated as an abstract 
datetime in the same way a unitless number is treated as an abstract quantity 
(this is reflected in the current datetime documentation). In Python 3, though, 
it became more concrete in the sense that rather than just throwing an error 
whenever you try to do an operation that requires knowing the absolute datetime 
(e.g. convert between time zones, convert to timestamp, etc), certain 
operations will succeed with the assumption that naive times represent system 
local times. This makes `utcnow()` and `utcfromtimestamp()` dangerous, because 
they create a naive datetime as if the naive datetime represents UTC, but this 
context is then lost and if you ever use one of these "aware-only" operations 
(.astimezone, .timestamp, etc), you'll get an unexpected answer.

For example, see this script, executed this with `TZ=America/New_York` on a 
machine with IANA data installed:

>>> from datetime import datetime
>>> dt = datetime.utcfromtimestamp(0)
>>> dt
datetime.datetime(1970, 1, 1, 0, 0)
>>> dt.timestamp()
18000

This happens because EST is 18000s behind UTC, and `.timestamp()` gives a 
number of seconds after UTC (a concrete, not an abstract time). You get the 
same gotchas with `utcnow()`.

I'm not sure if actually deprecating `utcnow` and `utcfromtimestamp` is worth 
it at the moment, but we can definitely start by adding a warning box to 
`utcnow()` and `utcfromtimestamp()` suggesting that you use the timezone-aware 
versions of these instead. We may also want to adjust the opening phrasing for 
the "naive objects" portion of the datetime documentation as well 
(https://docs.python.org/3.7/library/datetime.html), to reflect the fact that 
naive datetimes are no longer purely abstract quantities.

--
assignee: docs@python
components: Documentation
messages: 347148
nosy: belopolsky, docs@python, p-ganssle
priority: normal
severity: normal
stage: needs patch
status: open
title: Document the "gotcha" behaviors in utcnow() and utcfromtimestamp()
type: enhancement
versions: 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



[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread adrien.pierre.horgn...@gmail.com


adrien.pierre.horgn...@gmail.com  added the 
comment:

T-T Sorry. It didn't feel intuitive but I should have read the doc...

--

___
Python tracker 

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



[issue37482] Email header fails with both encoded words and special chars

2019-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +maxking

___
Python tracker 

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



[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

https://docs.python.org/3/library/dataclasses.html#inheritance

> When the dataclass is being created by the dataclass() decorator, it looks 
> through all of the class’s base classes in reverse MRO (that is, starting at 
> object) and, for each dataclass that it finds, adds the fields from that base 
> class to an ordered mapping of fields. After all of the base class fields are 
> added, it adds its own fields to the ordered mapping. All of the generated 
> methods will use this combined, calculated ordered mapping of fields. Because 
> the fields are in insertion order, derived classes override base classes.

I think here in the example __eq__ is defined in A and is inherited by B but 
since eq=False is not explicitly defined in the decorator the dataclass will 
use it's own definition of eq and override it at [0] . So using eq=False will 
work as expected. I propose closing this as not a bug. 


import dataclasses


@dataclasses.dataclass
class A:
def __eq__(self, other):
return True


@dataclasses.dataclass(eq=False) # By default eq=True
class B(A):
pass


print(A() == 1) # Returns True as expected
print(B() == 1) # Returns True since inherited A.__eq__ is not overriden with 
eq=False


Output

./python.exe ../backups/bpo37485.py
True
True

[0] 
https://github.com/python/cpython/blob/7cb9204ee1cf204f6f507d99a60f7c5bb359eebb/Lib/dataclasses.py#L922

--
nosy: +xtreak

___
Python tracker 

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



[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

This is by design.  The "parent" attribute is a *lexical operation*.  If you 
want to walk the actual filesystem, first call resolve().

It's even documented:
https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.parent

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2019-07-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +pitrou
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



[issue24846] Add tests for ``from ... import ...` code

2019-07-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue19978] Update multiprocessing.spawn to use runpy.run_path

2019-07-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37487] PyList_GetItem() document regarding index

2019-07-02 Thread 杨昆仑

New submission from 杨昆仑 :

The document of this function (PyList_GetItem()) says: "Return the object at 
position index in the list pointed to by list. The position must be 
**positive**,". However test shows the correct position index should be from 0 
to len(list)-1. The claim of index **must be positive** is inaccurate and 
confusing.

--
assignee: docs@python
components: Documentation
messages: 347144
nosy: docs@python, 杨昆仑
priority: normal
severity: normal
status: open
title: PyList_GetItem() document regarding index
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



[issue37486] pathlib.Path('.').parent is itself rather than parent

2019-07-02 Thread adrien.pierre.horgn...@gmail.com


New submission from adrien.pierre.horgn...@gmail.com 
:

Tested with CPython 3.7.3

```
from pathlib import Path

p = Path('.')

assert p == p.parent # should fail but it does not
```

I expect Path('.').parent to be Path('..')

I searched issues and did not find any similar issue but maybe I didn't search 
well enough because I would be surprised that I'd be the first one to be bugged 
by this issue.

I didn't test newer version of Python as I couldn't find a package or wasn't 
comfortable enough to build it myself.

--
components: Library (Lib)
messages: 347143
nosy: adrien.pierre.horgn...@gmail.com
priority: normal
severity: normal
status: open
title: pathlib.Path('.').parent is itself rather than parent
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



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

2019-07-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37449] Move ensurepip off of pkgutil and to importlib.resources

2019-07-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue37483] Add PyObject_CallOneArg()

2019-07-02 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Colin


New submission from Colin :

Hi,

When using inheritance with dataclass, "standard" instance methods that are 
provided with a default behavior thanks to dataclass are not overridable using 
inheritance.

Please see the sample below (or the attached file):

import dataclasses


@dataclasses.dataclass
class A:
def __eq__(self, other):
return True


@dataclasses.dataclass
class B(A):
pass


print(A() == 1) # Returns True as expected
print(B() == 1) # Returns False instead of True as expected via inheritance


Thanks again

--
components: Library (Lib)
files: inheritance_dataclass_issue.py
messages: 347142
nosy: colin-b
priority: normal
severity: normal
status: open
title: dataclass __foo__ methods inheritance is not working
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48453/inheritance_dataclass_issue.py

___
Python tracker 

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



[issue36904] Implement _PyStack_UnpackDict() with a single allocation

2019-07-02 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
resolution:  -> wont fix
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



[issue37475] What is urllib.request.urlcleanup() function?

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Another weirdness of test_urllib.py: it redefines urlopen() and actually tests 
its test function, rather than testing the urllib.request module.

https://github.com/python/cpython/pull/14529#issuecomment-507646868

"def urlopen(url, data=None, proxies=None):" in test_urllib.py is as old as the 
urllib module itself!

commit 1afc1696167547a5fa101c53e5a3ab4717f8852c
Author: Jeremy Hylton 
Date:   Wed Jun 18 20:49:58 2008 +

Make a new urllib package .

It consists of code from urllib, urllib2, urlparse, and robotparser.
The old modules have all been removed.  The new package has five
submodules: urllib.parse, urllib.request, urllib.response,
urllib.error, and urllib.robotparser.  The urllib.request.urlopen()
function uses the url opener from urllib2.

Note that the unittests have not been renamed for the
beta, but they will be renamed in the future.

Joint work with Senthil Kumaran.

At least, the test function should have a different name, no?

--

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7cb9204ee1cf204f6f507d99a60f7c5bb359eebb by Victor Stinner in 
branch 'master':
bpo-37421: urllib.request tests call urlcleanup() (GH-14529)
https://github.com/python/cpython/commit/7cb9204ee1cf204f6f507d99a60f7c5bb359eebb


--

___
Python tracker 

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



[issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__

2019-07-02 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue37484] Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__

2019-07-02 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

35% of all cases where methods are called without PY_VECTORCALL_ARGUMENT_OFFSET 
and taking at least 1 argument (positional or keyword) are calls to __exit__

So we should really optimize __exit__

--
components: Interpreter Core
messages: 347139
nosy: inada.naoki, jdemeyer
priority: normal
severity: normal
status: open
title: Use PY_VECTORCALL_ARGUMENTS_OFFSET for __exit__
type: performance
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



[issue37483] Add PyObject_CallOneArg()

2019-07-02 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

As discussed in 
https://mail.python.org/archives/list/capi-...@python.org/thread/X6HJOEX6RRFLNKAQSQR6HLD7K4QZ4OTZ/
 it would be convenient to have a function PyObject_CallOneArg() for making 
calls with exactly 1 positional argument and no keyword arguments. Such calls 
are very common. This would be analogous to PyObject_CallNoArgs().

--
components: Interpreter Core
messages: 347138
nosy: jdemeyer, vstinner
priority: normal
severity: normal
status: open
title: Add PyObject_CallOneArg()
type: performance
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



[issue37421] Some tests leak temporary files

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 632cb36084dc9d13f1cdb31a0e7e3ba80745a51a by Miss Islington (bot) 
in branch '3.8':
bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)
https://github.com/python/cpython/commit/632cb36084dc9d13f1cdb31a0e7e3ba80745a51a


--

___
Python tracker 

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



[issue37482] Email header fails with both encoded words and special chars

2019-07-02 Thread SilentGhost


Change by SilentGhost :


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



[issue37482] Email header fails with both encoded words and special chars

2019-07-02 Thread B Siemerink


New submission from B Siemerink :

Special characters in email headers are normally put within double quotes. 
However, encoded words (=?charset?x?...?=) are not allowed withing double 
quotes. When the header contains a word with special characters and another 
word that must be encoded, the first one must also be encoded.

In the next example, The From header is quoted and therefore the comma is 
allowed; in the To header, the comma is not within quotes and not encoded, 
which is not allowed and rejected.

From: "Foo Bar, France" 
To: Foo Bar, =?utf-8?q?Espa=C3=B1a?= 

--
components: email
files: email_header_test.py
messages: 347136
nosy: barry, bsiem, r.david.murray
priority: normal
severity: normal
status: open
title: Email header fails with both encoded words and special chars
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48452/email_header_test.py

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 039fb49c185570ab7b02f13fbdc51c859cfd831e by Victor Stinner in 
branch 'master':
bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)
https://github.com/python/cpython/commit/039fb49c185570ab7b02f13fbdc51c859cfd831e


--

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14372
pull_request: https://github.com/python/cpython/pull/14554

___
Python tracker 

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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Jakub Kulik. test_c_locale_coercion should pass again on 3.7, 3.8 and 
master branches on Solaris.

--

___
Python tracker 

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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread Jakub Kulik


Change by Jakub Kulik :


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



[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 518dc94e423398f7b0b5fd7bd5b84f138618e68e by Miss Islington (bot) 
in branch '3.8':
bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447)
https://github.com/python/cpython/commit/518dc94e423398f7b0b5fd7bd5b84f138618e68e


--
nosy: +miss-islington

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2019-07-02 Thread STINNER Victor

STINNER Victor  added the comment:

Lib/distutils/tests/test_bdist_wininst.py contains an interesting comment 
linking to bpo-5731:

# issue5731: command was broken on non-windows platforms
# this test makes sure it works now for every platform
# let's create a command

Related commit:

commit ad95826c33ea378db2807a268363ccfbf0ea8273
Author: Tarek Ziadé 
Date:   Thu Apr 9 21:36:44 2009 +

Fixed #5731: Distutils bdist_wininst no longer worked on non-Windows 
platforms


But there is also bpo-8954 follow-up which is still open: "wininst regression: 
errors when building on linux".

--

___
Python tracker 

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



[issue37481] Deprecate bdist_wininst: use bdist_wheel instead

2019-07-02 Thread STINNER Victor


Change by STINNER Victor :


--
title: Deprecate bdist_wininstr: use bdist_wheel instead -> Deprecate 
bdist_wininst: use bdist_wheel instead

___
Python tracker 

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



[issue37481] Deprecate bdist_wininstr: use bdist_wheel instead

2019-07-02 Thread STINNER Victor

New submission from STINNER Victor :

According to the following "Deprecate bdist_wininst" discussion, bdist_wininst 
can be deprecated:
https://discuss.python.org/t/deprecate-bdist-wininst/1929

bdist_wininst uses the mbcs encoding which is only available on Windows. There 
is bpo-10945 open for 8 years to suggest to use UTF-8 or use the Unicode (wide 
character) flavor of the Windows API to support running bdist_wininst on 
non-Windows platforms and to be able to distribute binaries which don’t depend 
on the ANSI code page.

I propose to deprecate it in Python 3.9, because of bpo-10945 issue. I don't 
propose to plan bdist_wininst removal yet.

As an user, it’s annoying to have to run a GUI to install something, whereas 
pip can install dependencies using wheel packages in a command line interface, 
transparently, without bugging the user with dialog boxes.

When I look at numpy or Cython: they don’t distribute .exe installers, but 
binary wheel packages for Windows. I understood the wheel packages is the 
recommended way to distribute binaries on Windows, and so that bdist_wininst is 
kind of deprecated.

Donald Stufft wrote:

"For what it’s worth, PyPI doesn’t even allow you to upload bdist_wininst (See 
PEP 527 2) anymore, so if you’re looking at PyPI to determine usage, you’re 
going to get no usage whatsoever for anything recent.

I don’t have any idea if other people are still using bdist_wininst and 
distributing them through some other mechanism."

Paul Ganssle wrote:

"From my perspective, nearly all direct invocations of setup.py are currently 
or are eventually heading for deprecation. PEP 517 doesn’t provide hooks to 
generate anything other than sdist or wheel, so basically all commands not 
actually triggered (directly or indirectly) by calling a PEP 517 front-end are 
suspect."


Attached PR deprecates bdist_wininst.


See also the related issue bpo-37468 "Don't install wininst*.exe on non-Windows 
platforms". bdist_wininst only works on Windows: see bpo-10945 and commit 
72cd653c4ed7a4f8f8fb06ac364b08a97085a2b5.

--
components: Library (Lib)
messages: 347131
nosy: vstinner
priority: normal
severity: normal
status: open
title: Deprecate bdist_wininstr: use bdist_wheel instead
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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 61bf97e91620e020939d57a36918ab22579920ff by Victor Stinner (Jakub 
Kulík) in branch 'master':
bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447)
https://github.com/python/cpython/commit/61bf97e91620e020939d57a36918ab22579920ff


--

___
Python tracker 

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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14370
pull_request: https://github.com/python/cpython/pull/14552

___
Python tracker 

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



[issue37335] Improve encoding alias handling in locale coercion tests

2019-07-02 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c53173aa00689aa1be17ce5406289718f6b30532 by Victor Stinner (Jakub 
Kulík) in branch '3.7':
bpo-37335: Fix test_c_locale_coercion to handle any ASCII alias (GH-14449)
https://github.com/python/cpython/commit/c53173aa00689aa1be17ce5406289718f6b30532


--

___
Python tracker 

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



[issue37475] What is urllib.request.urlcleanup() function?

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

> urlcleanup also sets the global variable _opener to None so it does the extra 
> work of uninstalling the global variable opener set by install_opener which 
> is also not documented.

Oh wait, urlopen() also sets this private _opener global variable and so has an 
effect on next calls to urlopen()... This API is really strange, I dislike it 
:-(

I modified my PR 14529 to call urlcleanup() is way more tests, but I also 
modified regrtest to test that urllib.requests._url_tempfiles and 
urllib.requests._opener are not modified.

--

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-07-02 Thread Marcin Niemira


Change by Marcin Niemira :


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

___
Python tracker 

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



[issue37233] Use _PY_FASTCALL_SMALL_STACK for method_vectorcall

2019-07-02 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
pull_requests: +14367
pull_request: https://github.com/python/cpython/pull/14550

___
Python tracker 

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



[issue37138] PEP 590 method_vectorcall calls memcpy with NULL src

2019-07-02 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
pull_requests: +14368
pull_request: https://github.com/python/cpython/pull/14550

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-02 Thread STINNER Victor


STINNER Victor  added the comment:

About urllib.request, I created: bpo-37475 "What is urllib.request.urlcleanup() 
function?".

--

___
Python tracker 

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



[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string

2019-07-02 Thread Atul Bagga


Atul Bagga  added the comment:

Suprisingly this works fine on ConEMU which I commonly use on windows though 
internally I still use powershell on conemu. 
https://conemu.github.io/

It does not work on CMD and Powershell consoles.

--

___
Python tracker 

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



[issue37382] Improve conditional check for test_gdb

2019-07-02 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> if a change like that is pushed, all the fleet has to be monitored for 
> potential failures, as there are many older OSes supported there.

If this breaks some buildbots, then we can find out more precisely under which 
conditions they fail. For example, if they fail when GDB is older than a 
certain version, we can adjust the tests to check for that version.

--

___
Python tracker 

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



[issue36904] Implement _PyStack_UnpackDict() with a single allocation

2019-07-02 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset d4efd917ac24940063a1ce80073fe3570c5f07f8 by Inada Naoki (Jeroen 
Demeyer) in branch 'master':
bpo-36904: Optimize _PyStack_UnpackDict (GH-14517)
https://github.com/python/cpython/commit/d4efd917ac24940063a1ce80073fe3570c5f07f8


--
nosy: +inada.naoki

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Christian Heimes


Christian Heimes  added the comment:

Riccardo, the issue is about parsing the user supplied hostname/ipaddress, not 
the IPAddress field of the certificate. X.509 certs store IP addresses as 
fixed-size binary data, 4 bytes for IPv4 or 16 bytes for IPv6. There can't be 
any additional payload.

The bug is in the code that parses the user supplied "hostname" parameter to 
ssl.match_hostname(cert, hostname). The bug allows an attacker to pass an IPv4 
address with additional content and ssl.match_hostname() ignores this 
additional content. This example should fail, but does not fail with an 
exception:

>>> import ssl
>>> cert = {'subjectAltName': [('IP Address', '127.0.0.1 additional payload')]}
>>> ssl.match_hostname(cert, '127.0.0.1')

--

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Riccardo Schirone


Riccardo Schirone  added the comment:

As far as I know you can't request a hostname with spaces in it (which seems to 
be a precondition to trigger this bug) so I think an attacker cannot even 
create a malicious CA that would be mistakenly accepted by match_hostname.

--
nosy: +rschiron

___
Python tracker 

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



[issue37463] socket.inet_aton IP parsing issue in ssl.match_hostname

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:

Ping. At the moment, this is the only release blocker preventing the release of 
3.7.4rc2.

--

___
Python tracker 

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



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:

See updated Issue34602 discussion for why reverting 
335ab5b66f432ae3713840ed2403a11c368f5406 causes other problems and for a 
different fix for this issue.

--

___
Python tracker 

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



[issue34602] python3 resource.setrlimit strange behaviour under macOS

2019-07-02 Thread Ned Deily


Change by Ned Deily :


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



[issue18075] Infinite recursion tests triggering a segfault

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:


New changeset 782854f90ad5f73f787f68693d535f2b05514e13 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546) 
(GH-14549)
https://github.com/python/cpython/commit/782854f90ad5f73f787f68693d535f2b05514e13


--

___
Python tracker 

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



  1   2   >