[issue29120] Move hash randomisation initialisation out of Python/random.c

2018-01-27 Thread STINNER Victor

STINNER Victor  added the comment:

I prefered random.c name since hash initialization is only a small part of
the file, most of file is the implementation of os.urandom() and
os.getrandom() which is used a runtime.

--

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5219

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-27 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 9ed0aee27c249dada410a22fff4325a4a61df36d by Xiang Zhang in branch 
'master':
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation 
(#5361)
https://github.com/python/cpython/commit/9ed0aee27c249dada410a22fff4325a4a61df36d


--

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5218

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +5217

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nitish

Change by Nitish :


--
keywords: +patch
pull_requests: +5216
stage: needs patch -> patch review

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Nick Coghlan

Change by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

Heh, that's old code! IIRC I wrote a lot of loops like that, it was a little C 
trick I had picked up that reduced the loop overhead (since comparing to 0 is 
quicker than comparing to a variable). And until 3.6 it didn't really matter. I 
very much doubt the loop speed matters. So go ahead and try changing it!

--

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2018-01-27 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Greg: That's bpo-28414. There's currently no motion towards builtin IDNA 2008 
support (this bug), but I *think* in 3.7 the ssl module will be able to handle 
pre-encoded A-labels like that. I'm a little confused about the exact status 
right now but there's been lots of dicussion about that specific issue and I 
think Christian is planning to get one of the relevant PRs merged ASAP.

--

___
Python tracker 

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



[issue17305] IDNA2008 encoding missing

2018-01-27 Thread Greg Lindahl

Greg Lindahl  added the comment:

I am avoiding Python's built-in libraries as much as possible in my 
aiohttp-based crawler because of this issue, but I cannot open a connection to 
https://xn--ho-hia.de because there is an 'IDNA does not round-trip' raise in 
the python 3.6 library ssl.py code.

Happy to provide a code sample. I guess the 500-line async crawler in Guido's 
book was never used on German websites.

--

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the issue report and patch Martin, and sorry for the long delay in 
getting it merged!

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



[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset a278ad2faa76ae61569a58f36e06ba8745f4a9b7 by Nick Coghlan in 
branch 'master':
bpo-30306: Add missing NEWS entry (GH-5374)
https://github.com/python/cpython/commit/a278ad2faa76ae61569a58f36e06ba8745f4a9b7


--

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

They're the only characters we won't want to include as part of the suggestion, 
since they indicate the end of the statement.

--

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Indeed it should! Thanks for pointing that out :)

--
resolution:  -> out of date
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



[issue32206] Run modules with pdb

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

I checked the original PR, and I'm pretty sure the reference implementation is 
going to have the same bug.

To keep the NEWS entries clear (since the buggy implementation already shipped 
in the alpha releases), I've created a new issue here: 
https://bugs.python.org/issue32691

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

___
Python tracker 

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



[issue32691] "pdb -m " sets __main__.__package__ incorrectly

2018-01-27 Thread Nick Coghlan

New submission from Nick Coghlan :

For regular modules, the initial implementation of bpo-32206 sets __package__ 
to "module_name" instead of "module_name.rpartition('.')[0]".

This is not correct, and will cause problems for relative imports.

(From https://bugs.python.org/issue32206#msg310882)

--
messages: 310917
nosy: jason.coombs, mariocj89, ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: "pdb -m " sets __main__.__package__ incorrectly
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



[issue32206] Run modules with pdb

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset fcf8b4c1022bc2d2f84dcef5d72eabf40a25ea19 by Nick Coghlan (Mario 
Corchero) in branch 'master':
bpo-32206: Update pdb usage to include new module option (GH-5111)
https://github.com/python/cpython/commit/fcf8b4c1022bc2d2f84dcef5d72eabf40a25ea19


--

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

The current oddity where the names will always appear in the reverse of 
declaration order comes from a C level loop in the frame object's "map_to_dict" 
helper function that loops in reverse [1]:

...
for (j = nmap; --j >= 0; ) {
...
}

While I haven't tried reversing that yet, I haven't found anything to indicate 
that it *needs* to be a reverse iteration - it looks like Guido just wrote it 
that way back in 1994 [2], and everyone that touched the code since then 
preserved the original iteration order since they didn't have a compelling 
reason to change it.


[1] https://github.com/python/cpython/blob/master/Objects/frameobject.c#L794
[2] 
https://github.com/python/cpython/commit/1d5735e84621a7fe68d361fa0e289fa2c3310836

--
nosy: +ncoghlan

___
Python tracker 

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



[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Reviewing the code and the CI test failures on the PR, the trick here is that 
functools isn't actually *using* functools.reduce, it's just re-exporting it if 
it's defined.

So if you block importing of "_functools" (which the test suite does in order 
to test the pure Python fallbacks), then the *only* consequence is that 
"functools.reduce" will be missing - the module will otherwise be fine.

This isn't at all clear when reading the code though, so I think the simplest 
resolution here would be to add a comment to the fallback path that says "If 
_functools.reduce is missing, then functools.reduce will also be missing, but 
the module will otherwise work".

Alternatively, we could add a fallback implementation based on the recipe in 
the docs, and adjust the test suite to actually run the reduce tests against 
the py_functools variant: 
https://docs.python.org/3/library/functools.html#functools.reduce

--

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan

Change by Nick Coghlan :


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

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset dd0e087edc8f1e4d2c0913236b1a62a77d9db6d8 by Nick Coghlan (Martin 
Teichmann) in branch 'master':
bpo-30306: release arguments of contextmanager (GH-1500)
https://github.com/python/cpython/commit/dd0e087edc8f1e4d2c0913236b1a62a77d9db6d8


--

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Ouch, this clearly slipped off my review radar last year - I just picked it up 
again now while going through all my currently assigned issues before 3.7b1.

While I still think the suggested refactoring above would be a good way to go, 
Martin's single-line fix in the PR passes all the new test cases, and solves 
the reported problem, so I'm going to add a NEWS entry and then merge it.

--

___
Python tracker 

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



[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-27 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Thanks!

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

___
Python tracker 

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



[issue32606] Email Header Injection Protection Bypass

2018-01-27 Thread R. David Murray

R. David Murray  added the comment:

Yes.

There's this thing called Postel's Law that says you should be generous in what 
you accept and careful in what you emit.  So most MTAs and MUAs try very hard 
to guess what a non-RFC-compliant email is trying to say, which includes 
allowing spaces between the label and the colon (which I believe was legal at 
least in RFC 822, though I haven't checked).  If there's a space in the label, 
the handling for that is less predictable.  The email library's default is to 
treat that as a non-header line and therefor the start of the body (even if not 
followed by a blank line).

--

___
Python tracker 

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



[issue29120] Move hash randomisation initialisation out of Python/random.c

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

As part of the startup sequence refactoring, this file has been renamed to 
Python/bootstrap_hash.c, and _PyRandom_Init/Fini have been renamed to 
_Py_HashRandomization_Init/Fini.

Relevant commit: 
https://github.com/python/cpython/commit/6b4be195cd8868b76eb6fbe166acc39beee8ce36#diff-5c57849694577deb1e10475ae796f7dc

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

___
Python tracker 

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



[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-27 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset d331515847f0a053b929e5a4795715cb111f42b3 by Mariatta (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-32664: Add missing "|" connector in Exceptions doc (GH-1173) (GH-5372)
https://github.com/python/cpython/commit/d331515847f0a053b929e5a4795715cb111f42b3


--

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2018-01-27 Thread Nick Coghlan

Change by Nick Coghlan :


--
assignee: ncoghlan -> 

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

What should happen for:

def f():
if random.random() < 0.5:
a = 1
b = 2
else:
b = 1
a = 2
return locals()

? Right now co_varnames preserves the order that names were encountered when 
compiling, so it'd be easy to make 'a' come before 'b' in locals(), so the 
above function returns either {'a': 1, 'b': 2} or {'a': 2, 'b': 1}.

If we want to preserve the illusion that local variables are entries in the 
locals() dict, though, then the dict ought to be either {'a': 1, 'b': 2}, {'b': 
1, 'a': 2}. Making this happen would require extra machinery for an extreme 
edge case so I'm guessing it's not worth it though.

--
nosy: +njs

___
Python tracker 

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



[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-27 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

I will backport the change to 3.6.

--
assignee: docs@python -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-27 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +5214
stage: backport needed -> patch review

___
Python tracker 

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



[issue14010] deeply nested itertools objects segfault

2018-01-27 Thread ppperry

Change by ppperry :


--
title: deeply nested filter segfaults -> deeply nested itertools objects 
segfault

___
Python tracker 

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



[issue32690] Return function locals() in order of creation?

2018-01-27 Thread Guido van Rossum

New submission from Guido van Rossum :

Found in this thread: https://twitter.com/dabeaz/status/956264950430912512

Note that at the global level locals() indeed returns variables in order of 
definition. Ditto at class scope. Because those calls just return the actual 
dict. But in a function, a dict is constructed. I agree with Dave that it would 
be nice if the order there was reversed.

--
components: Interpreter Core
messages: 310905
nosy: gvanrossum
priority: low
severity: normal
stage: needs patch
status: open
title: Return function locals() in order of creation?
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



[issue32606] Email Header Injection Protection Bypass

2018-01-27 Thread Nitish

Nitish  added the comment:

RFC 5322[1] says that header field's name can't have space in it and the must 
be immediately followed by the ':' character.

Is it common for SMTP servers to accept messages with ' ' before ':'?


[1] https://tools.ietf.org/html/rfc5322#section-2.2

--
nosy: +nitishch

___
Python tracker 

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



[issue32546] Unusual TypeError with dataclass decorator

2018-01-27 Thread Eric V. Smith

Eric V. Smith  added the comment:

This has been fixed as part of #32513.

--
resolution:  -> fixed
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



[issue32677] Add.isascii() to str, bytes and bytearray

2018-01-27 Thread INADA Naoki

Change by INADA Naoki :


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



[issue32677] Add.isascii() to str, bytes and bytearray

2018-01-27 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset bea57060c863d0c3474c79350bd9c557f2ff0e7c by INADA Naoki in branch 
'master':
bpo-32677: Optimize str.isascii() (GH-5356)
https://github.com/python/cpython/commit/bea57060c863d0c3474c79350bd9c557f2ff0e7c


--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Eric V. Smith

Change by Eric V. Smith :


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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset ea8fc52e75363276db23c6a8d7a689f79efce4f9 by Eric V. Smith in 
branch 'master':
bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)
https://github.com/python/cpython/commit/ea8fc52e75363276db23c6a8d7a689f79efce4f9


--

___
Python tracker 

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



[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2018-01-27 Thread Craig Holmquist

New submission from Craig Holmquist :

>>> import os, pathlib, shutil
>>> os.mkdir('test1')
>>> os.mkdir('test2')
>>> path = pathlib.Path('test1')
>>> shutil.move(path, 'test2')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/shutil.py", line 540, in move
real_dst = os.path.join(dst, _basename(src))
  File "/usr/lib/python3.6/shutil.py", line 504, in _basename
return os.path.basename(path.rstrip(sep))
AttributeError: 'PosixPath' object has no attribute 'rstrip'

--
components: Library (Lib)
messages: 310900
nosy: craigh
priority: normal
severity: normal
status: open
title: shutil.move raises AttributeError if first argument is a pathlib.Path 
object and destination is a directory
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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nitish

Nitish  added the comment:

> For the right offset, I think we'll want to drop the initial XStrip call 
> added for bpo-32028 entirely, and instead calculate the right offset as a 
> PyUnicode_FindChar search for ";" (replacing it with the length of the input 
> string if the separator isn't found).

Are ';' and whitespace the only allowed characters following the print 
expression?

--
nosy: +nitishch

___
Python tracker 

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



[issue30670] pprint for dict in sorted order or insert order?

2018-01-27 Thread Philippe

Philippe  added the comment:

IMHO since Guido said that dictionary order is guaranteed going forward [1], 
the order should now be preserved in 3.6+ 

Getting a sorted pprint'ed dict in a Py3.6.1 was a surprise to me coming from 
Python2.

The default ordered dict is to me the killer feature of 3 and a major driver to 
migrate from 2.

[1] https://mail.python.org/pipermail/python-dev/2017-December/151286.html

--
nosy: +pombreda

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:

I think we've fixed everything. Closing this for now, Victor please reopen if 
buildbots misbehave.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5213

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 2a2247ce5e1984eb2f2c41b269b38dbb795a60cf by Yury Selivanov in 
branch 'master':
bpo-32622: Normalize ENOTCONN to ConnectionError on macOS (GH-5369)
https://github.com/python/cpython/commit/2a2247ce5e1984eb2f2c41b269b38dbb795a60cf


--

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:

Merged.  Thanks, Mark!

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c by Yury Selivanov 
(Коренберг Марк) in branch 'master':
bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)
https://github.com/python/cpython/commit/47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c


--

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset ee72ac0683e685b134f67cb0c6612c664ecadb65 by Yury Selivanov (Elvis 
Pranskevichus) in branch 'master':
bpo-32622: Fix AbstractEventLoop.sendfile signature in documentation. (GH-5368)
https://github.com/python/cpython/commit/ee72ac0683e685b134f67cb0c6612c664ecadb65


--

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:

> AttributeError: 'NoneType' object has no attribute 'SSLContext'

We've just pushed a fix for this.

--

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread STINNER Victor

STINNER Victor  added the comment:

s390x Debian 3.x buildbot failed:
http://buildbot.python.org/all/#/builders/13/builds/601

Exmaple:

==
ERROR: test_sendfile_ssl_pre_and_post_data 
(test.test_asyncio.test_events.SelectEventLoopTests)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_asyncio/test_events.py",
 line 2277, in test_sendfile_ssl_pre_and_post_data
srv_proto, cli_proto = self.prepare(is_ssl=True)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_asyncio/test_events.py",
 line 2136, in prepare
srv_ctx = test_utils.simple_server_sslcontext()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_asyncio/utils.py",
 line 73, in simple_server_sslcontext
server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
AttributeError: 'NoneType' object has no attribute 'SSLContext'

--
nosy: +vstinner
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5212

___
Python tracker 

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



[issue32665] pathlib.Path._from_parsed_parts should call cls.__new__(cls)

2018-01-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Antoine, is the reason of calling object.__new__(cls) in `_from_parsed_parts` 
that the code does not raise on creation?

--

___
Python tracker 

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



[issue32665] pathlib.Path._from_parsed_parts should call cls.__new__(cls)

2018-01-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Sorry, the exception of object.__new__(cls) is AttributeError: _drv

--

___
Python tracker 

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



[issue32665] pathlib.Path._from_parsed_parts should call cls.__new__(cls)

2018-01-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

This behaviour is because "parent" descriptor ends calling:

@classmethod
def _from_parsed_parts(cls, drv, root, parts, init=True):
self = object.__new__(cls)
self._drv = drv
self._root = root
self._parts = parts
if init:
self._init()
return self

and this calls object.__new__ and this call raises AttributeError: new_attr. 
Notice that object.__new__(cls) will not raise as this snippet shows:

   >>>: class A:
   ...: def __new__(*args):
   ...: raise ZeroDivisionError()
   ...:

>>> A()
---
ZeroDivisionError Traceback (most recent call last)
 in ()
> 1 A()

 in __new__(*args)
  1 class A:
  2 def __new__(*args):
> 3 raise ZeroDivisionError()
  4

ZeroDivisionError:

>>> object.__new__(A)
>>> <__main__.A at 0x7f6239c17860>

--
nosy: +pablogsal

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Elvis Pranskevichus

Change by Elvis Pranskevichus :


--
pull_requests: +5211

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +5210

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Eric V. Smith

Change by Eric V. Smith :


--
keywords: +patch
pull_requests: +5209

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset b1a6ac4c4026d648b3d948945b734a4d0f175a3c by Yury Selivanov in 
branch 'master':
bpo-32622: Enforce sendfile fallback policy for FALLBACK transports (#5364)
https://github.com/python/cpython/commit/b1a6ac4c4026d648b3d948945b734a4d0f175a3c


--

___
Python tracker 

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



[issue32626] Subscript unpacking raises SyntaxError

2018-01-27 Thread Neil Girdhar

Neil Girdhar  added the comment:

This came up already on python-ideas: 
https://groups.google.com/forum/#!topic/python-ideas/YOpT9fDQyFk

I think this was an oversight, and I'm with Ben that it's unexpected.  That 
said, this is usually the kind of thing that Guido likes to comment on.  My 
suggestion is to first check to see if you can change the grammar, and then ask 
Guido what he thinks.

--

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5208

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files in reference cycles

2018-01-27 Thread ppperry

Change by ppperry :


--
title: Built-in module _io can lose data from buffered files at exit -> 
Built-in module _io can lose data from buffered files in reference cycles

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-27 Thread William Pickard

William Pickard  added the comment:

Alright, the PR is ready for review.

--

___
Python tracker 

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2018-01-27 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Since PEP 422 was withdrawn in favor of PEP 487, should this issue be closed?

--
nosy: +csabella

___
Python tracker 

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



[issue32206] Run modules with pdb

2018-01-27 Thread Mario Corchero

Mario Corchero  added the comment:

Hi Jason, thanks a lot! 

I’ll have a look to the bug you reported on Monday. Out for holidays atm ^^

--

___
Python tracker 

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



[issue32206] Run modules with pdb

2018-01-27 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Adopting the backport, I believe I've found a defect. I filed the defect with 
the backport as [backports.pdb 
1](https://github.com/jaraco/backports.pdb/issues/1).

Essentially, the issue is that `__package__` gets set to the module name 
instead of the package name, causing issues with `from .mod` imports.

Feel free to take the relevant parts of the fix in the backport to adjust the 
implementation here, and definitely let me know if you think the adjustment 
I've made is somehow incorrect.

Full disclosure, I have not tested the canonical implementation in Python 3.7, 
only the backport in Python 3.6 and 2.7.

Please let me know if you would like me to file a separate issue.

--

___
Python tracker 

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



[issue32622] Implement loop.sendfile

2018-01-27 Thread Andrew Svetlov

New submission from Andrew Svetlov :


New changeset 7c684073f951dd891021676ecfd86ffc18b8895e by Andrew Svetlov in 
branch 'master':
bpo-32622: Implement loop.sendfile() (#5271)
https://github.com/python/cpython/commit/7c684073f951dd891021676ecfd86ffc18b8895e


--

___
Python tracker 

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



[issue31368] Add os.preadv() and os.pwritev()

2018-01-27 Thread YoSTEALTH

YoSTEALTH  added the comment:

Thank you Pablo Galindo for your amazingly hard work. Also Victor Stinner for 
your guidance, thanks you :)

--

___
Python tracker 

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



[issue32666] Valgrind documentation seems to need updating

2018-01-27 Thread Brett Cannon

Brett Cannon  added the comment:

I don't think there is anyone specific who maintains it. Just whomever wants to 
use it next and needs to fix it to make it work.

--

___
Python tracker 

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



[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2018-01-27 Thread Brett Cannon

Brett Cannon  added the comment:

Notice that the returning of None only has to do with searching for the 
*package*, not the *data file*. So I think the docs are still correct according 
to your example, Paul.

--

___
Python tracker 

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



[issue32688] weird comment out line of code

2018-01-27 Thread Brett Cannon

Brett Cannon  added the comment:

I don't remember why that line was commented out to make the analyzer happy.

--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset f13f12d8daa587b5fcc66fe3ed1090a5dadab289 by Yury Selivanov in 
branch 'master':
bpo-32630: Use contextvars in decimal (GH-5278)
https://github.com/python/cpython/commit/f13f12d8daa587b5fcc66fe3ed1090a5dadab289


--

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thank you, Stefan.  I've updated the PR with an asyncio+decimal test and run 
tests in refleak mode to make sure there's no regression there.

If during the beta/rc period we see that contextvars isn't stable enough or 
something I'll revert this change before 3.7.0 myself, so that decimal users 
will not be disturbed.

I'll merge the PR once the CI is green.

> Yes, that's the big question. In the generator discussions people were 
> advised to use "with" whenever possible, so I assume short blocks *will* be 
> used.

Yes, I used decimal examples all the time to showcase how context is supposed 
to work with generators.  Most of those examples were specifically constructed 
to illustrate some point, but I don't think that real-world code uses a 'with 
localcontext()' statement in every function.

Unfortunately there's no way (at least known to me) to make 'ContextVar.set()' 
faster than it is now.  I use HAMT which guarantees that all set operations 
will have O(log n) performance; the other known approach is to use 
copy-on-write (as in .NET), but that has an O(n) ContextVar.set() performance.  
So I guess a slightly slower 'with localcontext()' is the price to pay to make 
decimal easier to use for async/await code.

--

___
Python tracker 

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



[issue8881] socket.getaddrinfo() should return named tuples

2018-01-27 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

This one looks to be partly done due to #18720 and enums.

>>> for item in socket.getaddrinfo(None, 0):
... print(item)
... 
(, , 6, '', ('::1', 0, 
0, 0))
(, , 17, '', ('::1', 0, 
0, 0))
(, , 0, '', ('::1', 0, 0, 
0))
(, , 6, '', ('127.0.0.1', 
0))
(, , 17, '', ('127.0.0.1', 
0))
(, , 0, '', ('127.0.0.1', 0))

Is there a reason that Protocols weren't converted to be enums?  I added quick 
code to socket.py and it turned the above into:

(, , 
, '', ('::1', 0, 0, 0))
(, , 
, '', ('::1', 0, 0, 0))
(, , 
, '', ('::1', 0, 0, 0))
(, , 
, '', ('127.0.0.1', 0))
(, , , '', ('127.0.0.1', 0))
(, , 
, '', ('127.0.0.1', 0))

Would that be a responsible change to include?

--
nosy: +csabella

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-27 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset bc4123b0b380edda774b8bff2fa1bcc96453b440 by Yury Selivanov in 
branch 'master':
bpo-32436: Use PyThreadState_GET() in all hot paths (GH-5363)
https://github.com/python/cpython/commit/bc4123b0b380edda774b8bff2fa1bcc96453b440


--

___
Python tracker 

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



[issue32436] Implement PEP 567

2018-01-27 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +5207

___
Python tracker 

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



[issue32611] Tkinter taskbar icon (Windows)

2018-01-27 Thread Minion Jim

Minion Jim  added the comment:

Please see the attached gif for a demonstration (I am using Windows 10 Home)

--
Added file: https://bugs.python.org/file47413/tkinter glitch.gif

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'm completely burned out on it, too. I'll get the code checked in today, then 
update the PEP later. I don't really want to add all of this reasoning to the 
PEP, but I guess I should.

I think the gist of it is correct, in any event. We can fix some corner cases 
during the betas, if need be.

Thanks Guido and Nick for looking at it.

--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

If Nick says it's okay it is okay. I think it's okay too but my brain
doesn't want to start up today -- I suggest not waiting for me.

--

___
Python tracker 

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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-27 Thread Xiang Zhang

Change by Xiang Zhang :


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

___
Python tracker 

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



[issue31368] Add os.preadv() and os.pwritev()

2018-01-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 4defba3b95ec0f52ce75b8466831d30fb5d333f3 by Victor Stinner (Pablo 
Galindo) in branch 'master':
bpo-31368: Expose preadv and pwritev in the os module (#5239)
https://github.com/python/cpython/commit/4defba3b95ec0f52ce75b8466831d30fb5d333f3


--

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-01-27 Thread William Pickard

William Pickard  added the comment:

Ok, I found another way to apply the solution to this issue, that is by adding 
the "Connection" header (with value of "close") to the client's request instead 
of the server's response.

I'm going to use this other method as the client is expected to expect the 
server to shutdown the connection (as it asked the server to).

--

___
Python tracker 

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



[issue32688] weird comment out line of code

2018-01-27 Thread Xiang Zhang

Xiang Zhang  added the comment:

Sorry, forget links, it's 
https://github.com/python/cpython/blob/master/Python/ceval.c#L3528 , and the 
commit is b94767ff44edf5d461d7cb1c8eb5160f83886358.

--

___
Python tracker 

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



[issue32688] weird comment out line of code

2018-01-27 Thread Xiang Zhang

New submission from Xiang Zhang :

I find one line[1] is weirdly commented out. But I don't think profile here is 
any different with trace. In 2.7, this line is not commented out and the change 
happens in b94767ff, fixing clang warnings.

--
messages: 310866
nosy: brett.cannon, xiang.zhang
priority: normal
severity: normal
status: open
title: weird comment out line of code
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



[issue32687] wrong meaning of arg in Py_tracefunc doc

2018-01-27 Thread Xiang Zhang

New submission from Xiang Zhang :

The meaning of arg for PyTrace_Line and PyTrace_CALL is wrong, it is not always 
NULL but always Py_None.

--
assignee: docs@python
components: Documentation
messages: 310865
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
status: open
title: wrong meaning of arg in Py_tracefunc doc
versions: Python 2.7, 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



[issue32649] complete C API doc debug and profile part with new PyTrace_OPCODE

2018-01-27 Thread Xiang Zhang

Change by Xiang Zhang :


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

___
Python tracker 

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



[issue32621] Problem of consistency in collection.abc documentation

2018-01-27 Thread ppperry

Change by ppperry :


--
title: Problem of consistence in collection.abc documentation -> Problem of 
consistency in collection.abc documentation

___
Python tracker 

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



[issue32630] Migrate decimal to use PEP 567 context variables

2018-01-27 Thread Stefan Krah

Stefan Krah  added the comment:

On Fri, Jan 26, 2018 at 11:11:00PM +, STINNER Victor wrote:
> vstinner@apu$ ./python -m perf compare_to master.json pr5278.json 
> Mean +- std dev: [master] 1.86 us +- 0.03 us -> [pr5278] 2.27 us +- 0.04 us: 
> 1.22x slower (+22%)
> 
> Note: master is the commit 29a7df78277447cf6b898dfa0b1b42f8da7abc0c and I 
> rebased PR 5278 on top on this commit.

Thank you and Elvis for running the benchmarks. Yes, the exact version does seem
important -- I have been getting some differences based on the checkout.

> This is obvious the *worst* case: a *micro* benchmark using local contexts 
> and modifying this local context. In this case, I understand that this 
> microbenchmark basically measures the overhead of contextvars on modying a 
> context.
> 
> The question here is if the bottleneck of applications using decimal is the 
> code modifying the context or the code computing numbers (a+b, a*b, a/b, 
> etc.).

Yes, that's the big question. In the generator discussions people were advised
to use "with" whenever possible, so I assume short blocks *will* be used.

I would use the context functions, which would not require PEP-567 at all.
This means that I'm somewhat okay with excessive with-statements being a
bit slower.

> vstinner@apu$ ./python -m perf compare_to telco_master.json telco_pr5278.json 
> -v
> Mean +- std dev: [telco_master] 10.7 ms +- 0.4 ms -> [telco_pr5278] 10.7 ms 
> +- 0.4 ms: 1.00x faster (-0%)
> Not significant!

Okay. In my above reference to telco, I ran the "telco.py full" command
from http://www.bytereef.org/mpdecimal/quickstart.html#telco-benchmark .

The numbers I posted weren't cooked, but I have a hard time reproducing
them myself now consistently with the latest revisions, so let's declare
telco.py and bench.py a tie.

This means that I no longer have any objections, so Yury, please go ahead
and merge the PR!

Stefan Krah

--

___
Python tracker 

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



[issue32532] improve sys.settrace and sys.setprofile documentation

2018-01-27 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



[issue32532] improve sys.settrace and sys.setprofile documentation

2018-01-27 Thread Xiang Zhang

Xiang Zhang  added the comment:


New changeset 60da99b8e2f7bf497569ae4d6c218866575729bf by Xiang Zhang in branch 
'master':
bpo-32532: Improve documentation of settrace and setprofile (#5359)
https://github.com/python/cpython/commit/60da99b8e2f7bf497569ae4d6c218866575729bf


--

___
Python tracker 

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



[issue31399] Let OpenSSL verify hostname and IP address

2018-01-27 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 61d478c71c5341cdc54e6bfb4ace4252852fd972 by Christian Heimes in 
branch 'master':
bpo-31399: Let OpenSSL verify hostname and IP address (#3462)
https://github.com/python/cpython/commit/61d478c71c5341cdc54e6bfb4ace4252852fd972


--

___
Python tracker 

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



[issue32686] python3.6.4 build with --enable-optimzations hangs on macOS 10.13

2018-01-27 Thread Ned Deily

Ned Deily  added the comment:

That sounds like the problem documented in Issue32517.  As a temporary 
workaround, try building without using --enable-optimazations.

--
nosy: +ned.deily
title: python3.6.4 install hangs -> python3.6.4 build with 
--enable-optimzations hangs on macOS 10.13

___
Python tracker 

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



[issue32532] improve sys.settrace and sys.setprofile documentation

2018-01-27 Thread Xiang Zhang

Change by Xiang Zhang :


--
keywords: +patch
pull_requests: +5204
stage: needs patch -> patch review

___
Python tracker 

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



[issue32686] python3.6.4 install hangs

2018-01-27 Thread 7stud

7stud <7s...@excite.com> added the comment:

My os is OSX 10.13.2

--

___
Python tracker 

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



[issue32686] python3.6.4 install hangs

2018-01-27 Thread 7stud

7stud <7s...@excite.com> added the comment:

Oh, yeah, I'm using Python-3.6.4.tgz for the install.

--

___
Python tracker 

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



[issue32686] python3.6.4 install hangs

2018-01-27 Thread 7stud

New submission from 7stud <7s...@excite.com>:

I tried to install python3.6.4 on OSX 10.13.2.  I followed the Build 
Instructions in the README.rst:

./configure
make
make test
sudo make install

After ./configure step, the end of the output said:

---
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
---

So I did:

~/Downloads/Python-3.6.4$ ./configure --enable-optimizations

Next, I did:

~/Downloads/Python-3.6.4$ make

But the make step always hangs on the line:
   
  ...
  ...
  0:00:18 load avg: 2.10 [ 23/406] test_asyncgen
  0:00:19 load avg: 2.10 [ 24/406] test_asynchat
  0:00:21 load avg: 2.01 [ 25/406] test_asyncio


During the make step, OSX prompts me whether to allow incoming connections.  
I've tried it both ways: Deny and Allow, but the install allows hangs on the 
test_asyncio line.  I hit Ctrl+C to quit the install.  One time, I waited over 
an hour and the install was still hanging.

--
components: asyncio
messages: 310858
nosy: 7stud, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: python3.6.4 install hangs
type: compile error
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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Re-reading the code for _set_legacy_print_statement_msg, I noticed that we're 
not currently taking the "start" parameter into account, and that's the offset 
the compiler passes in to tell us where on the line it found the text "print ". 
Oops :)

We're also currently going to mishandle code like "x = 1; print x; pass" as 
well: the suggestion for that is "print(x)", but we would currently suggest 
"print(print x; pass)".

Fixing the left offset shouldn't be too difficult, as I believe the correct 
value for that is just "PRINT_OFFSET + start".

For the right offset, I think we'll want to drop the initial XStrip call added 
for bpo-32028 entirely, and instead calculate the right offset as a 
PyUnicode_FindChar search for ";" (replacing it with the length of the input 
string if the separator isn't found).

Any trailing whitespace (either before the ";", if one is present, or before 
the end of the line otherwise) will then be stripped by the remaining XStrip 
call (the one after the PyUnicode_Substring call).

(Even with those improvements, there will still be cases where the heuristic 
gives an incorrect suggestion due to a syntax error within the expression to be 
displayed, like "print value:", but there isn't anything simple we can do about 
those short of trying to compile the calculated suggestion, and I'm not 
prepared to go that far yet)

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31853] Use super().method instead of socket.method in SSLSocket

2018-01-27 Thread Christian Heimes

Change by Christian Heimes :


--
resolution:  -> fixed
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



[issue31853] Use super().method instead of socket.method in SSLSocket

2018-01-27 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 746cc75541f31278864a10b995e7d009bd2ff053 by Christian Heimes 
(Mads Jensen) in branch 'master':
bpo-31853: Replaced socket.method calls with super() in SSLSocket. (#4048)
https://github.com/python/cpython/commit/746cc75541f31278864a10b995e7d009bd2ff053


--

___
Python tracker 

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



[issue32685] Erroneous suggestion in print statement

2018-01-27 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Thanks for the report Mayank!

As we discussed offline, it is indeed reproducible if someone uses `print` on 
the same line (such as in this case, where a loop is used).

I will look into this issue.

--

___
Python tracker 

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



  1   2   >