[issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c1f5667be1e3ec5871560c677402c1252c6018a6 by Victor Stinner 
(Krzysztof Wojcik) in branch 'master':
bpo-33529, email: Fix infinite loop in email header encoding (GH-12020)
https://github.com/python/cpython/commit/c1f5667be1e3ec5871560c677402c1252c6018a6


--

___
Python tracker 

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



[issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces

2019-05-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13232

___
Python tracker 

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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

___
Python tracker 

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



[issue1465646] test_grp & test_pwd fail

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi,

Thank you for your contribution,

I close this issue, 2.6 and 3.0 are deprecated and I can't reproduce the errors.

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13229

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-14 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Would it be useful to add a default implementation of `visit_Constant(self, 
node)` on NodeVisitor that go through all the isinstance() check and call the 
appropriate backward compatible method ? 

We would still have the simplification without having any breakage in backward 
compatibility. 

That feels like best of both worlds ?

--

___
Python tracker 

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



[issue16100] Compiling vim with Python 3.3 support fails

2019-05-14 Thread Zachary Ware


Change by Zachary Ware :


--
versions:  -Python 3.7, Python 3.8

___
Python tracker 

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



[issue16100] Compiling vim with Python 3.3 support fails

2019-05-14 Thread Zachary Ware


Zachary Ware  added the comment:

As this appears to be a bug in Vim on an unsupported configuration with a 
now-unsupported version of Python, I'm closing the issue.  If this is still an 
issue with a modern version of Python in a supported environment and can be 
shown to be a bug in Python rather than Vim, a new issue can be opened.

--
resolution:  -> third party
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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread miss-islington


miss-islington  added the comment:


New changeset 822683238c36e15f59d289075917ff7dedb5f4e6 by Miss Islington (bot) 
in branch '3.7':
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
https://github.com/python/cpython/commit/822683238c36e15f59d289075917ff7dedb5f4e6


--
nosy: +miss-islington

___
Python tracker 

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



[issue36870] test_asyncio: test_drain_raises() fails randomly on Windows

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

PR 13313 has been merged into master. Let's see if it does fix this issue in 
master.

Python 3.7 is different: streams.py doesn't have _fast_drain() which was added 
by commit a076e4f5e42b85664693191d04cfb33e2f9acfa5 (bpo-36802). So instead, I 
created PR 13328 to revert the commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e 
of bpo-36801, to get more time to find a proper fix to Python 3.7.

--

___
Python tracker 

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



[issue36919] Exception form 'compile' reports a newline char not present in input

2019-05-14 Thread Pavel Koneski


New submission from Pavel Koneski :

Since Python 3.2, input in 'exec' mode  of 'compile' does not have to end in a 
newline anymore. However, it creates a surprising behavior when a 'SyntaxError' 
is reported:

>>> try: compile('try', '', 'exec')
... except SyntaxError as ex: print(repr(ex))
... 
SyntaxError('invalid syntax', ('', 1, 4, 'try\n'))

The 'text' field of the exception thrown contains an additional newline 
character that was not present in the input. Is it:

a. Proper Python language behavior?
b. CPython implementation artifact?
c. A bug?

In case of:

a. I will submit a patch to IronPython, which does not add an extra newline at 
the moment.
b. I can submit a patch to CPython to make StdLib tests implementation 
independent.
c. This inquiry can serve as a bug report.

--
components: Interpreter Core
messages: 342515
nosy: BCSharp
priority: normal
severity: normal
status: open
title: Exception form 'compile' reports a newline char not present in input
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-14 Thread Amber Brown


Amber Brown  added the comment:

There's a difference between round-tripping back to the source text and 
correctly representing the text in the source, though.

Since I'm using this module to perform static analysis of a Python module to 
retrieve class/function definitions and their docstrings to create API 
documentation, the string being the same as what it is in the file is important 
to me.

--

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I'd say go for it.  We can't guarantee we'll accept the feature yet, but I 
think the .dedent() method with an optimization pass approach is worthwhile 
making a proof of concept of regardless.

--

___
Python tracker 

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



[issue36918] ValueError warning in test_urllib due to io.IOBase destructor

2019-05-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue18478] Class bodies: when does a name become local?

2019-05-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +13235

___
Python tracker 

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



[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-05-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +13234

___
Python tracker 

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



[issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64

2019-05-14 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +13237

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-14 Thread Anthony Sottile


Anthony Sottile  added the comment:

There would still be a breakage for that if someone was defining py36+ 
`visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if 
we were to add it)

--

___
Python tracker 

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



[issue10108] ExpatError not property wrapped

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi Scoder,

I am not sure if this issue is relevant for 3.7 and 3.8 but do you want to 
check this issue?

Thank you,

--
nosy: +matrixise, scoder
versions: +Python 3.7, Python 3.8 -Python 3.1

___
Python tracker 

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



[issue13824] argparse.FileType opens a file and never closes it

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi,

Are you interested to write test cases? They could be useful for the fix.

Thank you

--
nosy: +matrixise

___
Python tracker 

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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13239

___
Python tracker 

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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset e883091abf7ca84a88e956fe5202e75c53bd4128 by Gregory P. Smith in 
branch 'master':
bpo-36760: Clarify subprocess capture_output docs. (GH-13322)
https://github.com/python/cpython/commit/e883091abf7ca84a88e956fe5202e75c53bd4128


--

___
Python tracker 

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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. 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



[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91c99873d115b9796377d5056785f2abc987520f by Victor Stinner in 
branch 'master':
bpo-36763: Add test for _PyCoreConfig_SetString() (GH-13275)
https://github.com/python/cpython/commit/91c99873d115b9796377d5056785f2abc987520f


--

___
Python tracker 

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



[issue36618] clang expects memory aligned on 16 bytes, but pymalloc aligns to 8 bytes

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d97adfb409290a1e4ad549e4af58cacea86d3358 by Victor Stinner in 
branch 'master':
bpo-36618: Don't add -fmax-type-align=8 flag for clang (GH-13320)
https://github.com/python/cpython/commit/d97adfb409290a1e4ad549e4af58cacea86d3358


--

___
Python tracker 

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



[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-05-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
components: +Documentation -Library (Lib)
versions: +Python 3.8

___
Python tracker 

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



[issue16100] Compiling vim with Python 3.3 support fails

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi,

The used version in this issue is outdated we could close this issue but I 
prefer to get the feedback from Steve Dower and Zach Ware. If this issue is not 
relevant to 3.7+, I suggest closing this issue.

--
nosy: +matrixise, steve.dower, zach.ware
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue34484] Unicode HOWTO incorrectly refers to Private Use Area for surrogateescape

2019-05-14 Thread A.M. Kuchling


A.M. Kuchling  added the comment:

Yes, I think this issue can now be closed.

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



[issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2fef5b01e36a17e36fd7e65c4b51f5ede8880dda by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) 
(GH-13321)
https://github.com/python/cpython/commit/2fef5b01e36a17e36fd7e65c4b51f5ede8880dda


--

___
Python tracker 

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



[issue36870] test_asyncio: test_drain_raises() fails randomly on Windows

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

"""
commit 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3
Author: Andrew Svetlov 
Date:   Tue May 7 16:53:19 2019 -0400

bpo-36801: Fix waiting in StreamWriter.drain for closing
SSL transport (GH-13098)
"""

I reverted this change in 3.7:

commit c647ad9b51c59f71c02cd90c5e67d1b2768323ca (HEAD -> 3.7, upstream/3.7)
Author: Victor Stinner 
Date:   Tue May 14 22:29:54 2019 +0200

Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL 
transport (GH-13098)" (GH-13328)

This reverts commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e.

Without this revert, I was able to easily reproduce the failure. With the 
revert, I cannot reproduce it anymore:
https://github.com/python/cpython/pull/13328#issuecomment-492394753

--

___
Python tracker 

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



[issue1616] compiler warnings

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Because this issue is very long and we stopped to use the version 2.x of Gcc, 
and migrated to a newer verson, I close this issue. Feel free to re-open it in 
the future or fill a new issue.

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



[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

It still behaves as described in the 3.7 and master branches. The proposed fix 
works. I will submit a pull request.

--
nosy: +websurfer5
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13240

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13230

___
Python tracker 

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



[issue36618] clang expects memory aligned on 16 bytes, but pymalloc aligns to 8 bytes

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.8 now respects the x86-64 ABI: https://bugs.python.org/issue27987

I reverted my workaround.

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



[issue25652] collections.UserString.__rmod__() raises NameError

2019-05-14 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +13238
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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-14 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

> There would still be a breakage for that if someone was defining py36+ 
> `visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if 
> we were to add it)


Ok, it would still break in some cases, but that would still be a net 
improvement for codebase that do not override visit_Constant; right ? 

We could also push the patch further if we really want and call explicitly 
NodeVisitor.visit_Constant before the overridden method in NodeVisitor.visit.

Not advocating for the second part, but minimal breakage and code repetition in 
libraries when we can.

--

___
Python tracker 

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



[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2019-05-14 Thread Edward Gow


Edward Gow  added the comment:

This bug is triggered by xml-rpc calls from the xmlrpc.client in the Python 3.5 
standard library to a mod_wsgi/Python 3.5 endpoint.

--
nosy: +elgow

___
Python tracker 

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



[issue36870] test_asyncio: test_drain_raises() fails randomly on Windows

2019-05-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Agree with your conclusion

--

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Looks like the change introduced by the PR is not stable at least on Windows 
boxes

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

___
Python tracker 

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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

The existing behavior is what I'd expect.

Using python3:

>>> import ast
>>> s = open('file.py', 'rb').read()
>>> s
b'"""\nHello \\n blah.\n"""\n'
>>> ast.dump(ast.parse(s))
"Module(body=[Expr(value=Str(s='\\nHello \\n blah.\\n'))])"
>>> eval(s)
'\nHello \n blah.\n'

As always with the AST, some information is lost. It's not designed to be able 
to round-trip back to the source text.

--
nosy: +eric.smith

___
Python tracker 

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



[issue3020] doctest should have lib2to3 integration

2019-05-14 Thread Stefan Behnel


Stefan Behnel  added the comment:

I'm closing this old ticket. Python 2 will be dead by the time someone gets 
around to do something about it.

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



[issue32892] Remove specific constant AST types in favor of ast.Constant

2019-05-14 Thread Anthony Sottile


Anthony Sottile  added the comment:

hitting this in https://bugs.python.org/issue36917?

Is the simplification here really worth the breaking change to consumers?

I now have to write something that's essentially this to work around this which 
feels more like the complexity has just been pushed to users instead of the 
stdlib:


def visit_Constant(self, node):
if isinstance(node.value, str):
self.visit_Str(node)
elif isinstance(node.value, bytes):
self.visit_Bytes(node)
elif node.value in {True, False}:
self.visit_NameConstant(node)
elif node.value is Ellipsis:
self.visit_Ellipsis(node)
elif isinstance(node.value, (int, float)):
self.visit_Num(node)
else:
# etc...

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue36918] ValueError warning in test_urllib due to io.IOBase destructor

2019-05-14 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

Issue for https://bugs.python.org/issue18748#msg340059.

comment : 

Is there someone interested to debug remaining "Exception ignored:" logs in 
test_urllib?

test_invalid_redirect (test.test_urllib.urlopen_HttpTests) ...
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
ok

test_read_bogus (test.test_urllib.urlopen_HttpTests) ...
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
ok

test_redirect_limit_independent (test.test_urllib.urlopen_HttpTests) ...
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
Exception ignored in: 
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in 
flush
self.fp.flush()
ValueError: I/O operation on closed file.
ok


It's unclear to be if it's a bug in http.client, a bug in the test... or 
something else.

--
components: Tests
messages: 342492
nosy: vstinner, xtreak
priority: normal
severity: normal
status: open
title: ValueError warning in test_urllib due to io.IOBase destructor
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c647ad9b51c59f71c02cd90c5e67d1b2768323ca by Victor Stinner in 
branch '3.7':
Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport 
(GH-13098)" (GH-13328)
https://github.com/python/cpython/commit/c647ad9b51c59f71c02cd90c5e67d1b2768323ca


--
nosy: +vstinner

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.8

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Tomer Vromen


Tomer Vromen  added the comment:

Thank you for the quick response.

Are PEPs considered de-facto documentation for language features? For example, 
string formatting was described in PEP 3101, but still has sections in the 
documentation dedicated to it. I believe that decorators should get a similar 
treatment :-)

I also think that describing decorators as part of the grammar definition is 
lacking. Why is there a whole chapter for Errors and Exceptions and it's not 
only discussed under the grammar definition for raise?

Decorators are a pretty unique (and cool!) feature of Python, and therefore new 
learners of the language need a better reference for learning about them.

I realize that this is a big request, as you would need some expert to write 
this documentation.

--

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi,

Thank you for your feedback.

In fact, there is a limitation with the current search engine of Sphinx 
(because we use it for the documentation). For example, if you try to find the 
meaning of "for", for us it's a keyword but for the search engine, it will try 
to find all the sections containing "for" (formatter, platform, 
argparse.ArgumentParser.format_help, etc...).

For that, we could open an issue on the repository of Sphinx.

Now, about the decorators.

In the definition of a function, we explain the call of a decorator, See the 
grammar. 
https://docs.python.org/3/reference/compound_stmts.html#function-definitions

"""
A function definition may be wrapped by one or more decorator expressions. 
Decorator expressions are evaluated when the function is defined, in the scope 
that contains the function definition. The result must be a callable, which is 
invoked with the function object as the only argument. The returned value is 
bound to the function name instead of the function object. Multiple decorators 
are applied in a nested fashion. For example, the following code
"""

But because it's a specification of the language which has been described with 
2 PEPs you can read it on the PEP Index page.

Function: https://www.python.org/dev/peps/pep-0318/ 
-> Introduced in 2.4 https://docs.python.org/3/whatsnew/2.4.html

Class: https://www.python.org/dev/peps/pep-3129/
-> Introduced in 3.0

Now, I suggest one thing, add a link to the PEPs in this section 
https://docs.python.org/3/reference/compound_stmts.html#function-definitions

--
nosy: +matrixise

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi Tomer,

>Thank you for the quick response.
Welcome
>
>Are PEPs considered de-facto documentation for language features? For
>example, string formatting was described in PEP 3101, but still has
>sections in the documentation dedicated to it. I believe that
>decorators should get a similar treatment :-)
Good catch for the string formatting.

For the decorator, it's different because a decorator is mainly a
function taking a function and returning a function.

Example you can write this decorator:

def my_decorator(func):
return func

def my_awesome_function(*args, **kwargs):
print(args)
print(kwargs)

return 42

my_awesome_function = my_decorator(my_awesome_function)

in this case, we don't need to document the decorator.

for the '@' syntax, it's described in the doc but it's syntactic sugar
for the decorator. I don't think we need to add a big description for
that, because everything is described in the PEP.

I would like to have the opinion of the other core-dev. @sizeof?

>
>I also think that describing decorators as part of the grammar
>definition is lacking. Why is there a whole chapter for Errors and
>Exceptions and it's not only discussed under the grammar definition for
>raise?
>
>Decorators are a pretty unique (and cool!) feature of Python, and
>therefore new learners of the language need a better reference for
>learning about them.
>
>I realize that this is a big request, as you would need some expert to
>write this documentation.
You can open a PR ;-)

--

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
nosy: +mdk

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-14 Thread Tomer Vromen


New submission from Tomer Vromen :

The documentation for decorators (for methods and classes) is pretty lacking.

Searching for "decorator" ( https://docs.python.org/3/search.html?q=decorator ) 
brings up a lot of libraries that use decorators, but no documentation 
explaining what they are and how they work. The documentation should have a 
dedicated page for explaining decorators, and this should be the 1st search 
result.

--

In the meantime, then search should give as a 1st result a link to the 
definition of decorator in the glossary: 
https://docs.python.org/3.7/glossary.html#glossary

Actually, it seems that there is no way to directly link to a paragraph in the 
glossary - so that should be added as well.

In general, it would be nice if a search for some term X would show as a 1st 
result the definition of X in the glossary (if it exists there).

Thanks!

--
assignee: docs@python
components: Documentation
messages: 342435
nosy: docs@python, tomerv
priority: normal
severity: normal
status: open
title: Missing documentation for decorators
type: enhancement
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



[issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions

2019-05-14 Thread Tom Hale


Tom Hale  added the comment:

Thanks Toshio Kuratomi, I raised it on the mailing list at:

https://code.activestate.com/lists/python-ideas/55992/

--

___
Python tracker 

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



[issue31473] Debug hooks on memory allocators are not thread safe (serialno variable)

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.8 has been fixed. I disabled serialno field by default: 
PYMEM_DEBUG_SERIALNO is not defined by default. You have to opt-in to get this 
bug :-) I don't see any easy fix older Python versions. I close the issue.

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



[issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I fixed this issue in Python 3.7. Py_SetStandardStreamEncoding() now uses:

PyMemAllocatorEx old_alloc;
_PyMem_SetDefaultAllocator(PYMEM_DOMAIN_RAW, _alloc);

... _PyMem_RawStrdup() ...

PyMem_SetAllocator(PYMEM_DOMAIN_RAW, _alloc);

--
components: +Interpreter Core
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
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



[issue26891] CPython doesn't work when you disable refcounting

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Well, CPython requires reference counting. This issue looks highly experimental 
with not activity for 3 years, I close it.

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



[issue26480] add a flag that will not give the set a sys.stdin

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

create_stdio() checks if the file descriptor is valid:

if (!is_valid_fd(fd))
Py_RETURN_NONE;

This function is_valid_fd() has been fixed recently on FreeBSD.

It's unclear to me why and how Python fails to create standard streams. Without 
more information, we cannot investigate. But since this issue has no activity 
for 3 years, I close. Reopen it if you still reproduce the issue and you can 
provide more information.

In the meanwhile, I suggest you to test the first alpha releases of Python 3.8.

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



[issue24280] Unable to install Python

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

This issue had no activity for 4 years and don't provide enough information to 
be investigated. I close it.

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



[issue24871] freeze.py doesn't work on x86_64 Linux out of the box

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue23603] Embedding Python3.4 - PyUnicode_Check fails (MinGW-W64)

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 4 years. I close the issue.

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



[issue13493] Import error with embedded python on AIX 6.1

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity since 2011, I close the issue.

--
nosy: +vstinner
resolution:  -> out of date
stage: test needed -> 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



[issue21563] Segv during call to builtin_execfile in application embedding Python interpreter.

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is close to it's end of life, Python 3 doesn't have execfile(), and 
this issue has no activity since 2014. I close the issue.

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



[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

While the fix works as advertised, it breaks a similar existing test case:

==
ERROR: test_positional_args (ctypes.test.test_structures.StructureTestCase)
--
Traceback (most recent call last):
  File 
"/Users/jeff/sandbox/src/python3.7/cpython/Lib/ctypes/test/test_structures.py", 
line 390, in test_positional_args
z = Z(1, 2, 3, 4, 5, 6)
IndexError: list index out of range

--

Below is the relevant test code:

class W(Structure):
_fields_ = [("a", c_int), ("b", c_int)]
class X(W):
_fields_ = [("c", c_int)]
class Y(X):
pass
class Z(Y):
_fields_ = [("d", c_int), ("e", c_int), ("f", c_int)]

z = Z(1, 2, 3, 4, 5, 6)

It similar but slightly different from the provided test case:

libm = CDLL(find_library('m'))

class Base(Structure):
_fields_ = [('y', c_double),
('x', c_double)]

class Mid(Base):
pass

Mid._fields_ = []

class Vector(Mid): pass

libm.atan2.argtypes = [Vector]
libm.atan2.restype = c_double

arg = Vector(y=0.0, x=-1.0)

I will do some more digging.

--

___
Python tracker 

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



[issue26122] Isolated mode doesn't ignore PYTHONHASHSEED

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

This issue has been fixed in Python 3.8 with my work on refactoring Py_Main(). 
-E and -I command line options are now parsed, before reading PYTHONHASHSEED, 
and -I imply -E as expected. Extract of the code:

if (config->isolated > 0) {
config->user_site_directory = 0;
}

if (config->use_environment) {
err = config_read_env_vars(config);
if (_Py_INIT_FAILED(err)) {
return err;
}
}

where config_read_env_vars() indirectly reads PYTHONHASHSEED.

I'm not sure if the issue is fixed in Python 3.7 or not. The code in Python 3.7 
was in a bad state. It's getting better with Python 3.8 :-)

Note: the overall refactoring work is related to PEP 432 and PEP 587.

--
components: +Interpreter Core
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue26515] Update extending/embedding docs to new way to build modules in C

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue34255] test_embed skipped when srcdir != builddir

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue34579] test_embed.InitConfigTests fail on AIX

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


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



[issue30633] Python 3.6.1 installation issues on OpenSuse 42.1: ModuleNotFoundError: No module named 'encodings'

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for almost 2 years, I close the issue.

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



[issue33919] Expose _PyCoreConfig structure to Python

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Update. I implemented _testinternalcapi.get_configs() which exports *all* 
Python configuration used to initialize Python. It contains the hash seed for 
example. The function is only written for tests.

Moreover, I proposed the PEP 587 to expose the new _PyCoreConfig as a public C 
API.

--

___
Python tracker 

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



[issue32231] -bb option should override -W options

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


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



[issue13320] _remove_visual_c_ref in distutils.msvc9compiler causes DLL load fail with embedded Python and multiple CRT versions

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 8 years, I close the issue.

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



[issue1257] atexit errors should result in nonzero exit code

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Antoine disagrees with the feature request, so I close it.

You can modify your atexit callbacks to catch exceptions and decide how to 
handle them: write them into a file, into stderr, etc.

--
nosy: +vstinner
resolution:  -> rejected
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



[issue36920] inspect.getcallargs sees optional arg to builtin as required

2019-05-14 Thread Udi Meiri


New submission from Udi Meiri :

$ python3.7
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect

>>> inspect.getfullargspec(str.strip)
FullArgSpec(args=['self', 'chars'], varargs=None, varkw=None, defaults=None, 
kwonlyargs=[], kwonlydefaults=None, annotations={})
>>> inspect.signature(str.strip)


>>> inspect.signature(str.strip).bind('a')

>>> inspect.getcallargs(str.strip, 'a')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/inspect.py", line 1372, in getcallargs
_missing_arguments(f_name, req, True, arg2value)
  File "/usr/lib/python3.7/inspect.py", line 1302, in _missing_arguments
"" if missing == 1 else "s", s))
TypeError: strip() missing 1 required positional argument: 'chars'

--
components: Library (Lib)
messages: 342529
nosy: Udi Meiri
priority: normal
severity: normal
status: open
title: inspect.getcallargs sees optional arg to builtin as required
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



[issue16961] No regression tests for -E and individual environment vars

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I added a lot of tests on environment variables and -I/-E options in 
test_embed. I consider that this issue is now fixed.

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



[issue22257] PEP 432: Redesign the interpreter startup sequence

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Update: I proposed the PEP 587 to expose the _PyCoreConfig API in public.

--

___
Python tracker 

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



[issue30905] Embedding should have public API for interactive mode

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue2921] enable embedding: declare/#define only py* symbols in #includes

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Since this issue has been reported, a lot of work has been done to cleanup 
Python header files. In Python 3.8, we created Include/cpython/ and 
Include/internal/ subdirectories to clarify the intent and usage of header 
files. I close this issue.

See bpo-2897 for the specific case of structmember.h.

--
dependencies:  -Deprecate structmember.h
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



[issue21202] Naming a file` io.py` causes cryptic error message

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 5 years, I close the issue.

--
nosy: +vstinner
resolution:  -> out of date
stage: test needed -> 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



[issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3 (I don't recall which version exactly) has been fixed to always use 
UTF-8 on Android for the filesystem encoding and even for the locale encoding 
in most places. I close the issue.

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



[issue14228] Don't display traceback when import site is interrupted by CTRL+c

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

No activity for 6 years, I close the issue.

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



[issue19216] stat cache for import bootstrap

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

The benefit of avoiding stat() calls seems to not be obvious to everybody. 
Moreover, importlib now implements a "path cache". I close the issue.

The most efficient solution is to pack all your modules and the Python stdlib 
into a ZIP file: everything is done in memory, no more filesystem access.

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



[issue18060] Updating _fields_ of a derived struct type yields a bad cif

2019-05-14 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The current behavior,

stgdict->length = len;

sets the number of elements in the class excluding its base classes. The new 
behavior of

stgdict->length = ffi_ofs + len;

sets the total number of elements in both the class and its base classes.

This works as intended as long as the child classes do not add any more 
elements.

--

___
Python tracker 

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



[issue35197] graminit.h defines very generic names like 'stmt' or 'test'

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Another common issue with Python-ast.h, I just saw it on Windows:

  compile.c 
c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\winbase.h(102): 
warning C4005: 'Yield': macro redefinition 
[C:\vstinner\python\master\PCbuild\pythoncore 
.vcxproj]
  c:\vstinner\python\master\include\python-ast.h(627): note: see previous 
definition of 'Yield'

--

___
Python tracker 

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



[issue27810] Add METH_FASTCALL: new calling convention for C functions

2019-05-14 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Breakage due to the usage of borrowed references in _PyStack_UnpackDict(): 
#36907

--
nosy: +jdemeyer

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +13242

___
Python tracker 

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



[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13243

___
Python tracker 

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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-14 Thread Mark Dickinson


Mark Dickinson  added the comment:

The AST _does_ correctly represent the Python string object in the source, 
though. After:

>>> s = """
... Hello \n world
... """

we have a Python object `s` of type `str`, which contains exactly three 
newlines, zero "n" characters, and zero backslashes. So:

>>> s == '\nHello \n world\n'
True


If the AST Str node value were '\nHello \\\n world\n' as you suggest, that 
would represent a different string to `s`: one containing two newline 
characters, one "n" and one backslash.

If you need to operate directly on the source as text, then the AST 
representation probably isn't what you want.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree with Mark: the string is being correctly interpreted by the AST parser, 
per Python's tokenizer rules.

You might want to look at lib2to3, which I think is also used by black. It's 
also possible that mypy or another static analyzer would be using some library 
you can leverage.

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

___
Python tracker 

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



[issue36763] PEP 587: Rework initialization API to prepare second version of the PEP

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5eb8b07f87c66a9ca54fcb90737753ce76a3054d by Victor Stinner in 
branch 'master':
bpo-36763: InitConfigTests tests all core config (GH-13331)
https://github.com/python/cpython/commit/5eb8b07f87c66a9ca54fcb90737753ce76a3054d


--

___
Python tracker 

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



[issue36790] test_asyncio fails with application verifier!

2019-05-14 Thread Alexander Riccio


Alexander Riccio  added the comment:

It's part of the Windows SDK, and is installed with it. To enable for this 
error, add the Python executable in Application Verifier, and check the Handles 
box.

--

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2019-05-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +13244
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



[issue26124] shlex.quote and pipes.quote do not quote shell keywords

2019-05-14 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch
pull_requests: +13245
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



[issue36870] test_asyncio: test_drain_raises() fails randomly on Windows

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Andrew merged https://github.com/python/cpython/pull/13330 into master, it 
should fix this issue.

--

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2019-05-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The issue is not fixed. The problem is that this still allows invalid syntax 
because the code is optimized away:

def f():
if 0:
break
print("Hello")

f()

--
nosy: +pablogsal

___
Python tracker 

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



[issue36801] Wait for connection_lost in StreamWriter.drain

2019-05-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 54b74fe9df89f0e5646736f1f60376b4e37c422c by Andrew Svetlov in 
branch 'master':
bpo-36801: Temporarily fix regression in writer.drain() (#13330)
https://github.com/python/cpython/commit/54b74fe9df89f0e5646736f1f60376b4e37c422c


--

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36914] zipimport does not load ZIP files produced by GitHub

2019-05-14 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Seems to work on master branch though fails on 3.7.

➜  cpython git:(master) ✗ ./python.exe
Python 3.8.0a4+ (heads/master:410b85a7f7, May 13 2019, 21:40:37)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipimport
>>> zipimport.zipimporter("master.zip")

>>> ^D
➜  cpython git:(master) ✗ python3.7
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zipimport
>>> zipimport.zipimporter("master.zip")
Traceback (most recent call last):
  File "", line 1, in 
zipimport.ZipImportError: not a Zip file: 'master.zip'

➜  cpython git:(996859a90d) ✗ git checkout 
5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc
Previous HEAD position was 996859a90d bpo-34790: [docs] Passing coroutines to 
asyncio.wait() can be confusing. (GH-9543)
HEAD is now at 5a5ce064b3 bpo-5950: Support reading zips with comments in 
zipimport (#9548)
➜  cpython git:(5a5ce064b3) ✗ make regen-importlib -s && make -s > /dev/null
➜  cpython git:(5a5ce064b3) ✗ ./python.exe -c 'import zipimport; 
zipimport.zipimporter("master.zip")'

➜  cpython git:(5a5ce064b3) ✗ git checkout 
5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc~1
Previous HEAD position was 5a5ce064b3 bpo-5950: Support reading zips with 
comments in zipimport (#9548)
HEAD is now at 996859a90d bpo-34790: [docs] Passing coroutines to 
asyncio.wait() can be confusing. (GH-9543)
➜  cpython git:(996859a90d) ✗ make regen-importlib -s && make -s > /dev/null
➜  cpython git:(996859a90d) ✗ ./python.exe -c 'import zipimport; 
zipimport.zipimporter("master.zip")'
Traceback (most recent call last):
  File "", line 89, in __init__
KeyError: 'master.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "", line 91, in __init__
  File "", line 366, in _read_directory
zipimport.ZipImportError: not a Zip file: 'master.zip'

Bisecting tells me it could have been fixed with 
5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc (issue5950) in 3.8 . Can you please 
try with a 3.8 release? Download 3.8 alpha 4 : 
https://www.python.org/downloads/release/python-380a4/

--
nosy: +xtreak

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-14 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset f0be4bbb9b3cee876249c23f2ae6f38f43fa7495 by Inada Naoki in branch 
'master':
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)
https://github.com/python/cpython/commit/f0be4bbb9b3cee876249c23f2ae6f38f43fa7495


--

___
Python tracker 

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



[issue36910] Certain Malformed email causes email.parser to throw AttributeError

2019-05-14 Thread SilentGhost


Change by SilentGhost :


--
stage:  -> needs patch
versions: +Python 3.8 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen

2019-05-14 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 30cccf084d1560d9e3382e69d828b3be8cdb0286 by Inada Naoki (Miss 
Islington (bot)) in branch '3.7':
bpo-36845: validate integer network prefix when constructing IP networks 
(GH-13298)
https://github.com/python/cpython/commit/30cccf084d1560d9e3382e69d828b3be8cdb0286


--

___
Python tracker 

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



  1   2   >