[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-06-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip
type:  -> behavior
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue36073] sqlite crashes with converters mutating cursor

2019-06-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue37345] Add formal support for UDPLITE protococl

2019-06-21 Thread Gabe Appleton


Gabe Appleton  added the comment:

Okay, I removed the helper functions and added some additional documentation. 
Does that look okay now?

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



[issue37334] Add a cancel method to asyncio Queues

2019-06-21 Thread Caleb Hattingh


Caleb Hattingh  added the comment:

I'm interested in how this change would affect the pattern of shutting down a 
queue-processing task.

How would one decide between whether to cancel the queue or the task? (I'm 
asking for real, this is not an objection to the PR). For example, looking at 
the two tests in the PR:

def test_cancel_get(self):
queue = asyncio.Queue(loop=self.loop)

getter = self.loop.create_task(queue.get())
test_utils.run_briefly(self.loop)
queue.cancel()   # < HERE
test_utils.run_briefly(self.loop)
with self.assertRaises(asyncio.CancelledError):
self.loop.run_until_complete(getter)

This test would work exactly the same if the `getter` task was cancelled 
instead right?  Like this:

def test_cancel_get(self):
queue = asyncio.Queue(loop=self.loop)

getter = self.loop.create_task(queue.get())
test_utils.run_briefly(self.loop)
getter.cancel()   # < HERE
test_utils.run_briefly(self.loop)
with self.assertRaises(asyncio.CancelledError):
self.loop.run_until_complete(getter)

So my initial reaction is that I'm not sure under what conditions it would be 
more useful to cancel the queue instead of the task. I am very used to applying 
cancellation to tasks rather than the queues they contain, so I might lack 
imagination in this area. The idiom I've been using so far for consuming queues 
looks roughly something like this:

async def consumer(q: asyncio.Queue):
while True:
try:
data = await q.get()
except asyncio.CancelledError:
q.put_nowait(None) # ignore QueueFull for this discussion
continue

try:
if not data:
logging.info('Queue shut down cleanly')
return # <-- The only way to leave the coro

except Exception:
logging.exception('Unexpected exception:')
continue
finally:
q.task_done() 

^^ With this pattern, I can shut down the `consumer` task either by cancelling 
the task (internally it'll put a `None` on the queue) or by placing a `None` on 
the queue outright from anywhere else. The key point is that in either case, 
existing items on the queue will still get processed before the `None` is 
consumed, terminating the task from the inside.

(A) If the queue itself is cancelled (as in the proposed PR), would it still be 
possible to catch the `CancelledError` and continue processing whatever items 
have already been placed onto the queue? (and in this case, I think I'd still 
need to place a sentinel onto the queue to mark the "end"...is that correct?)

(B) The `task_done()` is important for app shutdown so that the application 
shutdown process waits for all currently-pending queue items to be processed 
before proceeding with the next shutdown step. So, if the queue itself is 
cancelled (as in the proposed PR), what happens to the application-level call 
to `await queue.join()` during the shutdown sequence, if a queue was cancelled 
while there were still unprocessed items on the queue for which `task_done()` 
had not been called?

It would be great to have an example of how the proposed `queue.cancel()` would 
be used idiomatically, w.r.t. the two questions above.  It might be intended 
that the idiomatic usage of `queue.cancel()` is for situations where one 
doesn't care about dropping items previously placed on the queue. Is that the 
case?

--
nosy: +cjrh

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-21 Thread aeros167


Change by aeros167 :


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

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-21 Thread aeros167


aeros167  added the comment:

> Yep, just make sure the tests still pass before and after the change. :)

Sounds good, the first thing I had done before proposing the change was testing 
it in an IDE and using some logging to ensure that random.choose and 
random.choice were providing the same functionality. So hopefully the PR tests 
will pass as well. 

> Separate are easier to review.

Alright, I'll do each of the file moves in individual PRs and then a separate 
one for changing random.choice to random.choose. 

Thanks!

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 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



[issue37370] AF_UNIX should be supported on Windows

2019-06-21 Thread Paul Monson


Change by Paul Monson :


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

___
Python tracker 

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



[issue37370] AF_UNIX should be supported on Windows

2019-06-21 Thread Paul Monson


New submission from Paul Monson :

AF_UNIX has been supported on windows since version 1803 (build 17134)
see https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

Enabling support for AF_UNIX will enable better peer-to-peer connectivity 
scenarios for Azure IoT Edge.  The changes to enable AF_UNIX on Windows seem 
small and low risk.

I need feedback on these proposed changes

--
components: Windows
messages: 346266
nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: AF_UNIX should be supported on Windows
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



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

2019-06-21 Thread Brooke Storm


Brooke Storm  added the comment:

I should add that, after testing a bit, it isn't actually working in cmd.exe.  
That is simply using the overarching python install.  It's not using the 
virtualenv at all.  The virtualenv that was created by the venv module appears 
to be non-functional at least as far as pip goes (which makes it hard to use at 
all).

--

___
Python tracker 

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



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

2019-06-21 Thread Brooke Storm


New submission from Brooke Storm :

I am finding that, using Powershell on Windows 10 and the current version of 
Python 3.7.3 installed from the Microsoft Store, when I create a virtualenv via 
"python -m venv " and activate it in Powershell with the Activate.ps1 
script that is generated, pip fails with:

> pip freeze
Fatal error in launcher: Unable to create process using 
'"c:\users\\\scripts\python.exe"  
"C:\Users\\\Scripts\pip.exe" freeze'

There are no spaces in my python path, and I cannot find any "simple 
workaround" that actually works online.  I am using pip 19.1.1 (current as of 
now).  This only happens with Powershell.  cmd.exe is able to use the 
virtualenv and pip just fine after using the activate.bat script.

If I activate in Powershell and run "python -m pip" or similar commands, 
including importing pip, I get a message that pip is not installed, which is 
interesting.

My Powershell version as installed is:
Major  Minor  Build  Revision
-  -  -  
5  1  18917  1000

I also tried Powershell Core 6 with the same result.  This seems to be a 
consistent behavior of the resultant Activate.ps1 script, which is why I'm 
creating the issue here.  I didn't find quite a duplicate when I searched, but 
I could be wrong.

--
components: Windows
messages: 346264
nosy: bstorm, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Issue with pip in venv on Powershell in Windows
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



[issue37363] Additional PEP578 hooks

2019-06-21 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-06-21 Thread Brett Cannon


Change by Brett Cannon :


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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Steve Dower


Change by Steve Dower :


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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 35202c763703c9c00345b4445a638211e6e37bbc by Miss Islington (bot) 
in branch '3.8':
bpo-37364: Use io.open_code() to read .pth files (GH-14299)
https://github.com/python/cpython/commit/35202c763703c9c00345b4445a638211e6e37bbc


--

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Effect of my PR 14053 using script.py:

import sys
print(f"{__file__=}")
print(f"{sys.argv=}")
print(f"{sys.path[0]=}")

Before:

$ ./python script.py 
__file__=script.py
sys.argv=['script.py']
sys.path[0]=/home/vstinner/prog/python/master

With the change:

$ ./python script.py 
__file__=/home/vstinner/prog/python/master/script.py
sys.argv=['/home/vstinner/prog/python/master/script.py']
sys.path[0]=/home/vstinner/prog/python/master

--

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14124
pull_request: https://github.com/python/cpython/pull/14300

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I closed the issue. test_gdb now ignores stderr in all branches.

--

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 184f3d4f39056f6fe450d007d3b9b61d811a2a4d by Miss Islington (bot) 
(Steve Dower) in branch 'master':
bpo-37364: Use io.open_code() to read .pth files (GH-14299)
https://github.com/python/cpython/commit/184f3d4f39056f6fe450d007d3b9b61d811a2a4d


--
nosy: +miss-islington

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

For the record, examples of ignored patterns:

ignore_patterns = (
'Function "%s" not defined.' % breakpoint,
'Do you need "set solib-search-path" or '
'"set sysroot"?',
# BFD: /usr/lib/debug/(...): unable to initialize decompress
# status for section .debug_aranges
'BFD: ',
# ignore all warnings
'warning: ',
)

Enjoy the older list before I chose to ignore "warning: " :-)

# Ignore some benign messages on stderr.
ignore_patterns = (
'Function "%s" not defined.' % breakpoint,
"warning: no loadable sections found in added symbol-file"
" system-supplied DSO",
"warning: Unable to find libthread_db matching"
" inferior's thread library, thread debugging will"
" not be available.",
"warning: Cannot initialize thread debugging"
" library: Debugger service failed",
'warning: Could not load shared library symbols for '
'linux-vdso.so',
'warning: Could not load shared library symbols for '
'linux-gate.so',
'warning: Could not load shared library symbols for '
'linux-vdso64.so',
'Do you need "set solib-search-path" or '
'"set sysroot"?',
'warning: Source file is more recent than executable.',
# Issue #19753: missing symbols on System Z
'Missing separate debuginfo for ',
'Try: zypper install -C ',
)

Oh strange, "Missing separate debuginfo for " message was ignored!

commit f4a4898c18c9cc5ca6d2747789c6586524daf461
Author: Victor Stinner 
Date:   Sun Nov 24 18:55:25 2013 +0100

Issue #19753: Try to fix test_gdb on SystemZ buildbot

But I removed it in:

commit 904f5def5cc6da106a1e2e9feb0830cdb1433519
Author: Victor Stinner 
Date:   Wed Mar 23 18:32:54 2016 +0100

Try to fix test_gdb on s390x buildbots

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset adcdb1e4f5eb3c63e4e40242737be9c00a26764c by Victor Stinner in 
branch '2.7':
bpo-37362: test_gdb now ignores stderr (GH-14287) (GH-14297)
https://github.com/python/cpython/commit/adcdb1e4f5eb3c63e4e40242737be9c00a26764c


--

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 3523e0c47be372477e990df7435a0f45be80fd50 by Miss Islington (bot) 
in branch '3.8':
bpo-37362: test_gdb now ignores stderr (GH-14287)
https://github.com/python/cpython/commit/3523e0c47be372477e990df7435a0f45be80fd50


--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset f3e38ec7f014557296f6cc7b60a33d65faad1716 by Steve Dower in branch 
'3.8':
bpo-36511: Fix -u parameters for ARM32 tests (GH-14280)
https://github.com/python/cpython/commit/f3e38ec7f014557296f6cc7b60a33d65faad1716


--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 16ec95bb191e4136630de7437f75636d4b6a450f by Miss Islington (bot) 
in branch '3.7':
bpo-37362: test_gdb now ignores stderr (GH-14287)
https://github.com/python/cpython/commit/16ec95bb191e4136630de7437f75636d4b6a450f


--
nosy: +miss-islington

___
Python tracker 

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



[issue37351] Drop libpython38.a from Windows release

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14122
pull_request: https://github.com/python/cpython/pull/14298

___
Python tracker 

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



[issue37351] Drop libpython38.a from Windows release

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset f5690925df897cf45818bf944b28d13f37b9f8ca by Steve Dower in branch 
'master':
bpo-37351: Removes libpython38.a from standard Windows distribution (#14276)
https://github.com/python/cpython/commit/f5690925df897cf45818bf944b28d13f37b9f8ca


--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14121
pull_request: https://github.com/python/cpython/pull/14297

___
Python tracker 

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



[issue30052] URL Quoting page links to function Bytes instead of defintion

2019-06-21 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hi @wim.glenn, 

Thanks for the report.  It looks like the same issue applies to all the 
built-in functions that are handled this way, not just bytearray and bytes.  
So, dict, frozenset, list, memoryview, range, set, str, and tuple too.  I'm not 
sure what the fix is, but I agree that we should take a look.  Can you create a 
new tracker issue for this?  Thanks!

--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> I think when I wrote this I was over-optimistically thinking that we could 
> just add more patterns, but if it's becoming a pain, then your approach looks 
> good to me.

Well, I tried hard to fit into this approach: over the years, I added more and 
more patterns... but it's a painful work: first a CI break, I add more patterns 
and then I have to backport the change to all branches. As I wrote, I'm not 
convinced of the purpose of getting a failure in this case. Python doesn't get 
any benefit from this.

Anyway, I merged my change. Thanks for your approval ;-)

--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14119
pull_request: https://github.com/python/cpython/pull/14295

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14120
pull_request: https://github.com/python/cpython/pull/14296

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e56a123fd0acaa295a28b98d2e46d956b97d1263 by Victor Stinner in 
branch 'master':
bpo-37362: test_gdb now ignores stderr (GH-14287)
https://github.com/python/cpython/commit/e56a123fd0acaa295a28b98d2e46d956b97d1263


--

___
Python tracker 

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



[issue37352] Typo in documentation: "to making it easy"

2019-06-21 Thread Mark Rice


Mark Rice  added the comment:

Hi, first time on here. And new to the python bug tracker. But, the sentence 
might read fine as is, or could be tweaked to say "with an eye toward making it 
easily tested..." as Zach suggested. It is what my internal grammar alarm 
jumped to automatically.

--
nosy: +mrice88

___
Python tracker 

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



[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2019-06-21 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/16/builds/3290

test_create_server_ssl_match_failed 
(test.test_asyncio.test_events.PollEventLoopTests) ...

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py:321:
 ResourceWarning: unclosed transport 
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Warning -- Unraisable exception
Exception ignored in: 
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 322, in __del__
self.close()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 317, in close
self._ssl_protocol._start_shutdown()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 591, in _start_shutdown
self._abort()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/sslproto.py",
 line 732, in _abort
self._transport.abort()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py",
 line 660, in abort
self._force_close(None)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py",
 line 711, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py",
 line 711, in call_soon
self._check_closed()
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/base_events.py",
 line 504, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/asyncio/selector_events.py:684:
 ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=7>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Task was destroyed but it is pending!
task: 
 wait_for=()]>>

ok

--
components: Tests, asyncio
messages: 346249
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 
3.x and logged an unraisable exception
versions: Python 3.9

___
Python tracker 

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



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

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1: 
> invalid continuation byte

Python is right: b'f\xf1\xf6rd' is not a valid UTF-8 string:

$ python3
Python 3.7.3 (default, May 11 2019, 00:38:04) 
>>> b'f\xf1\xf6rd'.decode()
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1: invalid 
continuation byte

This change is deliberate: it makes UTF-8 incremental decoder correct (respect 
the UTF-8 standard). I close the issue.

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



[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I'm confused by the issue title: PyUnicode_GetString() doesn't exist, it's 
PyUnicode_FromString() :-) I changed the title.

--
title: Optimize PyUnicode_GetString for short ASCII strings -> Optimize 
PyUnicode_FromString for short ASCII strings

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett, serhiy.storchaka
versions: +Python 3.9

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-06-21 Thread Dan Snider


New submission from Dan Snider :

At present, the bytecode compiler can generate 512 different unicode 
characters, one for each integral from the range [0-511), 512 being the total 
number of syntactically valid permutations of 3 octal digits preceded by a 
backslash. However, this does not match the regex compiler, which raises an 
error regardless of the input type when it encounters an an octal escape 
character with a decimal value greater than 255. On the other hand... the bytes 
literal:

>>> b'\407'

is somehow valid, and can lead to extremely difficult bugs to track down, such 
as this nonsense:

>>> re.compile(b'\407').search(b'\a')


I propose that the regex parser be augmented, enabling for unicode patterns the 
interpretation of three character octal escapes from the range(256, 512), while 
the bytecode parser be adjusted to match the behavior of the regex parser, 
raising an error for bytes literals > b"\400", rather than truncating the 9th 
bit.

--
messages: 346246
nosy: bup
priority: normal
severity: normal
status: open
title: octal escapes applied inconsistently throughout the interpreter and lib

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +giampaolo.rodola, josh.r, max, paul.moore, riccardomurri, 
serhiy.storchaka, steve.dower, tarek, tim.golden, zach.ware

___
Python tracker 

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



[issue37366] Add an "onitem" callback parameter to shutil.rmtree()

2019-06-21 Thread Jeffrey Kintscher


New submission from Jeffrey Kintscher :

Add an "onitem" callback paramter to shutil.rmtree() that, if provided, gets 
called for each directory entry as it is encountered.  This allows the caller 
to perform any required special handling of individual directory entries (e.g. 
unmounting a mount point, closing a file, shutting down a named pipe, etc.) 
before rmtree() attempts to remove them.

This enhancement is related to issue #36422.

--
components: Library (Lib)
messages: 346245
nosy: Jeffrey.Kintscher
priority: normal
severity: normal
status: open
title: Add an "onitem" callback parameter to shutil.rmtree()
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I have no idea why the test fails on this specific server, whereas it pass on 
our large fleet of buildbots which test various libc and various compilers and 
platforms.

I cannot investigate if I cannot reproduce the failure. Someone should run the 
test in a debugger to see the content of the memory after free.

Python is not used with malloc, except for debug or testing. In thr meanwhile 
you can skip this test for malloc, since it seems to work with pymalloc. The 
same test is run on malloc and on pymalloc.

--

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
type:  -> enhancement

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue37365] RecursionError not caught explicitly may crash with "Aborted (core dumped)"

2019-06-21 Thread Ned Deily


Ned Deily  added the comment:

Thank you for the report.  The issue of the interpreter not being able to 
gracefully handle a stack overflow error is an old one: see, for example 
Issue18075 or Issue35542.  So far, no one has proposed a solution and, as can 
be seen in Issue18075, workarounds someimes produce unexpected side-effects 
that can be more problematic than the stack overflow segfault.  I'm going to 
close this as a duplicate of Issue18075.  If anyone has further suggestions for 
solutions, please continue the discussion there.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Infinite recursion tests triggering a segfault

___
Python tracker 

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



[issue37323] test_asyncio: test_debug_mode_interop() fails using -Werror

2019-06-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue37302] Add an "onerror" callback parameter to the tempfile.TemporaryDirectory member functions

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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

___
Python tracker 

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



[issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point

2019-06-21 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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

___
Python tracker 

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



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

2019-06-21 Thread Roufique Hossain


Change by Roufique Hossain :


--
nosy: +roufique7

___
Python tracker 

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



[issue37298] IDLE: Revise html to tkinker converter for help.html

2019-06-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for the research, including the crucial commit!  What I understand 
from the quotes:

1. Sphinx 2 writes HTML5 by default.  The html5 writers always writes 
paragraphs because they are required by the xhtml used by html5.

2. Firefox, for instance, displays the result the same as before either because 
it either has the logic to avoid extra blank lines when reading html5 or 
because this is taken care of by revised css (this is unclear from the quotes). 

To deal with html5, our converter would have to ignore the s that the html4 
writer omitted, by adding logic for the cases used in idle.rst.  Not fun.

Reading the commit (3rd line) revealed a new sphinx configuration option: 
html4_writer, defaulting to False.  When I switched from building html with my 
3.6 install with sphinx 1.8.1 to 3.7 with 2.something, and added "-D 
html4_writer=1" to a direct call of sphinx-build, I indeed got html without 
added s.  The only different was the irrelevant omission of '\n' between 
list item header and text in the html file.  Example:
  -New File
  -Create a new file editing window.
  +New FileCreate a new file editing window.

Setting SPHINXOPTS should work when using 'Doc/make.bat html'.  I will prepare 
a PR documenting our parser requirement and include the neutral html changes.

--

___
Python tracker 

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



[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset a0d73a143af404deecb9c4fcdbd3ddbafd96b41b by Brett Cannon (Joannah 
Nanjekye) in branch 'master':
bpo-30202 : Update test.test_importlib.test_abc to test find_spec() (GH-12847)
https://github.com/python/cpython/commit/a0d73a143af404deecb9c4fcdbd3ddbafd96b41b


--

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2019-06-21 Thread miss-islington


miss-islington  added the comment:


New changeset 52c4a4fb816d51a36c02b043d6fd5eeb875411d6 by Miss Islington (bot) 
(Mariatta) in branch '3.8':
[3.8] bpo-32924: Fix the Show Source url in 3.8 documentation. (GH-14282)
https://github.com/python/cpython/commit/52c4a4fb816d51a36c02b043d6fd5eeb875411d6


--
nosy: +miss-islington

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Carol Willing


Carol Willing  added the comment:

Thanks Petr for the wonderful summary.

Of the pros/cons that you mention (if I am understanding correctly), I think 
that the issue comes down to sdist consumers and regeneration.

1. If sdist consumers will need to regenerate an sdist?
2. How many sdist consumers will likely be impacted?
3. If impacted, how difficult would the regeneration be for a scientist who is 
moderately comfortable with compilation?
4. Is there any guidance or information that can be given to sdist consumers?

Do we have any good metrics/insights on Question 2 and 3?

---

While TypeObject size, updating a pinned version, and vectorcall optimization 
for prior versions are considerations, I believe that they are secondary:

- Typeobject size: Nice to have a smaller size but probably not a concern of 
the sdist consumer or general user.
- Update a pinned Cython version: General expectation is it should work with 
the environment which it was pinned within. There should not be an expectation 
that the pinned version will work if other parts of the environment change.
- vectorcall optimization extends to prior versions: While perhaps nice to 
have, it is likely more an added benefit instead of an implicit contract or 
expectation.

--

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Inada Naoki  added the comment:

PR 14291 seems simpler than PR 14283.  But PR 14283 is faster because 
_PyUnicodeWriter is a learge struct.

master: 3.7sec
PR 14283: 2.9sec
PR 14291: 3.45sec

compiler: gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0
without LTO, without PGO

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon


Change by Brett Cannon :


--
versions: +Python 3.9

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:

> How will this interact with EnvBuilder.install_scripts() (which explicitly 
> states that it performs textual substitution)?

It won't, so that would have to change as well. As you mentioned, Paul, I don't 
know who even uses the functionality through a subclass, but since this is a 
security consideration I think it's worth changing.

> Is it?

Sorry, misread what you were asking. You're right it's not stored, but it can 
be worked out in other ways, e.g. from the location of pyvenv.cfg or 
Activate.ps1, etc.

> So there could be code changes in venv too.

Yep, hence making the issue now so that others talking about adding more 
substitution ideas know that there's talk going the other way and removing the 
substitution abilities.

> This would be a great contribution from a PowerShell expert, and might be 
> worth advertising (Twitter) for one.

Already have a co-worker interested in working on it.

--

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-21 Thread Brett Cannon


Brett Cannon  added the comment:

> Would it be appropriate to change the "choose" method to "choice"? 

Yep, just make sure the tests still pass before and after the change. :)

> should the name of "test_pkgimport" instead be "test_pkg_import"?

Since things are moving it's fine to rename the file.

> would it be best to perform all of these changes within separate pull 
> requests, or are they minor enough to be combined into one?

Separate are easier to review.

--

___
Python tracker 

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



[issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch

2019-06-21 Thread Mariatta


Change by Mariatta :


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

___
Python tracker 

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



[issue37348] Optimize PyUnicode_GetString for short ASCII strings

2019-06-21 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +14114
pull_request: https://github.com/python/cpython/pull/14291

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Change by Steve Dower :


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



[issue36511] Add Windows ARM32 buildbot

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14113
pull_request: https://github.com/python/cpython/pull/14290

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6c7947713a40851e123493ca0fe8f2791d7ed2a6 by Steve Dower in branch 
'3.8':
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
https://github.com/python/cpython/commit/6c7947713a40851e123493ca0fe8f2791d7ed2a6


--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset f8dd77d36067fd7be614edde1e5e9e7467c450dc by Steve Dower (Paul 
Monson) in branch 'master':
bpo-36511: Fix -u parameters for ARM32 tests (GH-14280)
https://github.com/python/cpython/commit/f8dd77d36067fd7be614edde1e5e9e7467c450dc


--

___
Python tracker 

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



[issue37365] RecursionError not caught explicitly may crash with "Aborted (core dumped)"

2019-06-21 Thread Adrien


New submission from Adrien :

This is an issue that I first saw repoted by @remi.lapeyre on issue36272: 
https://bugs.python.org/issue36272#msg337843
It also be reported some years ago: https://stackoverflow.com/a/54171640/2291710
I searched but I did not find any existing issue, so I open a new one, I hope 
this is not a duplicate.

It's easily reproducible:


def rec():
try:
rec()
except Exception:
rec()
rec()


It will kill the CPython interpreter (@remi.lapeyre provided explanation in the 
issue I linked).

Of course, this is a contrived example. Still, I guess CPython should avoid to 
crash in any situation. This is a tricky edge case: by doing `except 
Exception:` one could expect to correctly handle all kind of errors without 
being aware that in some situation the "RecursionError" need to be managed too.

Particularly, the fix in issue36272 solely patches "StreamHandler": 
https://github.com/python/cpython/blob/65f64b1903ae85b97a30f514bbc1b7ce940c3af2/Lib/logging/__init__.py#L1082-L1102
There is many other handlers that are still affected, every time you see 
"except Exception" in "emit()": 
https://github.com/python/cpython/blob/65f64b1903ae85b97a30f514bbc1b7ce940c3af2/Lib/logging/handlers.py

Finally, it should also be noted that the "except RecursionError" workaround 
implies that loggers are not longer able to catch recursive erros in "write()" 
or "format()" without re-raising the RecursionError and (probably) halting the 
program.
It may happen for example that a faulty implementation of a custom Handler or 
LogRecord attribute cause a RecursionError. Thanks to the "raiseExceptions = 
false" logging option, this would usually be caught and a message printed on 
stderr without killing the app.

--
messages: 346232
nosy: Delgan
priority: normal
severity: normal
status: open
title: RecursionError not caught explicitly may crash with "Aborted (core 
dumped)"
type: crash

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14112
pull_request: https://github.com/python/cpython/pull/14289

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Christian Heimes


Christian Heimes  added the comment:

+1

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-06-21 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +14111
pull_request: https://github.com/python/cpython/pull/14152

___
Python tracker 

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



[issue37364] Use io.open_code for .pth files

2019-06-21 Thread Steve Dower


New submission from Steve Dower :

Since .pth files may contain executable code, we should open them using 
io.open_code().

--
messages: 346230
nosy: christian.heimes, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Use io.open_code for .pth files
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37363] Additional PEP578 hooks

2019-06-21 Thread Steve Dower


New submission from Steve Dower :

We should also (see whether we should) add audit hooks for the following 
modules:
* configparser
* crypt
* ensurepip
* ftplib
* glob
* http
* imaplib
* nntplib
* pdb
* poplib
* runpy
* shutil
* smtpd
* smtplib
* socketserver
* sqlite3
* telnetlib
* webbrowser
* xmlrpc

All of these seem likely to have interesting events (specifically, they can all 
be misused in scenarios where the impact would not be obvious without extra 
information).

--
messages: 346229
nosy: christian.heimes, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Additional PEP578 hooks
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 08286d52b29de604a4b187bf1f0d4209e39c926c by Steve Dower (Zackery 
Spytz) in branch 'master':
bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
https://github.com/python/cpython/commit/08286d52b29de604a4b187bf1f0d4209e39c926c


--

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

Thanks! Well spotted.

--

___
Python tracker 

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



[issue37293] concurrent.futures.InterpreterPoolExecutor

2019-06-21 Thread Eric Snow


Eric Snow  added the comment:

@Davin, we've spoken before about something similar for multiprocessing, IIRC. 
:)

--
nosy: +davin

___
Python tracker 

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



[issue37293] concurrent.futures.InterpreterPoolExecutor

2019-06-21 Thread Eric Snow


Eric Snow  added the comment:

FWIW, performance benefits when subinterpreters stop sharing the GIL are not 
the only benefit.  In fact, PEP 554 is specifically written to avoid that 
consideration, focusing on the benefits of the concurrency model (i.e. CSP).  
So I wouldn't call this pointless even without per-interpreter GIL. :)

(Of course, this *would* be blocked on acceptance and implementation of PEP 
554.)

--
stage:  -> needs patch

___
Python tracker 

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



[issue37316] mmap.mmap() passes the wrong variable to PySys_Audit()

2019-06-21 Thread Eric Snow


Change by Eric Snow :


--
nosy: +steve.dower

___
Python tracker 

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



[issue37221] PyCode_New API change breaks backwards compatibility policy

2019-06-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm happy with the change in https://github.com/python/cpython/pull/13959, but 
we need sign-off from Ɓukasz as release manager on bumping the 
Py_VERSION_SERIAL a bit early so Cython can reliably detect that this change 
has been reverted without having to check for the existence of the 
PyCode_NewWithPosArgs symbol.

Alternatively, if my proposal at https://github.com/cython/cython/pull/3009 to 
check directly for PyCode_NewWithPosOnlyArgs in the Cython module setup code is 
accepted, then we wouldn't need to bump the version number early, and could 
merge the PR as soon as the What's New conflict is resolved.

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

> With this fixed, and the PyCode_New -> PyCode_New + PyCode_WithPosArgs fix 
> from bpo-37221 merged, then that long tail will get another few years of 
> life, and will start emitting deprecation warnings for the part that's 
> actually going to go away in Python 3.9 (i.e. the tp_print slot).

By definition (as unmaintained packages), that's a few more years until death. 
Nobody is looking at their compile time warnings (that would require 
maintenance ;) ), so nothing will happen until it actually breaks. Keeping the 
field for one more version makes less sense than keeping it forever.

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

> I'm curious what you mean here...

msg345409

--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread Dave Malcolm


Dave Malcolm  added the comment:

I think when I wrote this I was over-optimistically thinking that we could just 
add more patterns, but if it's becoming a pain, then your approach looks good 
to me.

--
nosy: +dmalcolm

___
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-06-21 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Nick Coghlan


Nick Coghlan  added the comment:

It isn't the actively maintained projects that publish wheel files that I'm 
worried about fixing - it's the sdist only projects that would otherwise only 
need recompilation to work on the new Python version.

With this fixed, and the PyCode_New -> PyCode_New + PyCode_WithPosArgs fix from 
bpo-37221 merged, then that long tail will get another few years of life, and 
will start emitting deprecation warnings for the part that's actually going to 
go away in Python 3.9 (i.e. the tp_print slot).

My opinion would be different if tp_print had actually been emitting compile 
time warnings for the past 10 years, but it hasn't been - we just haven't been 
using it for anything.

--

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-21 Thread Pierre Glaser


Change by Pierre Glaser :


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

___
Python tracker 

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



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

I reported the issue to docutils. In fact, docutils FileInput class was already 
fixed to prevent the deprecation warning, but there was no release yet:
https://sourceforge.net/p/docutils/bugs/363/

--

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> based on precedents that do not apply to this situation

I'm curious what you mean here...

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

One thing to note is that if we sign this file, it'll have to bypass the text 
substitution step completely to avoid modifying line endings or encoding. So 
there could be code changes in venv too.

This would be a great contribution from a PowerShell expert, and might be worth 
advertising (Twitter) for one. File parsing can get tricky quickly, but there 
are a few clever ways to approach it. We also need to set a minimum PowerShell 
version to support, as plenty of its features aren't available on base Windows 
7 installs.

--

___
Python tracker 

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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-06-21 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 08970cb03c61f62f4f69e7769d0075fa66bb86aa by Nick Coghlan (Michael 
Felt) in branch 'master':
bpo-36210: update optional extension handling for AIX (GH-12202)
https://github.com/python/cpython/commit/08970cb03c61f62f4f69e7769d0075fa66bb86aa


--
nosy: +ncoghlan

___
Python tracker 

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



[issue37359] test_regrtest: test_list_cases() fails on x86 Gentoo Installed with X 3.x

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

Related change:

commit 3c93153f7db5dd9b06f229e61978fd9199b3c097
Author: Victor Stinner 
Date:   Tue May 14 15:49:16 2019 +0200

bpo-36915: regrtest always remove tempdir of worker processes (GH-13312)

--

___
Python tracker 

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



[issue37169] test_pyobject_is_freed_free fails with 3.8.0beta1

2019-06-21 Thread Matej Cepl


Matej Cepl  added the comment:

I don't think this has been really fixed, see attached log,even with the patch 
applied I am still getting:

[ 6220s] ==
[ 6220s] FAIL: test_pyobject_freed_is_freed 
(test.test_capi.PyMemMallocDebugTests)
[ 6220s] --
[ 6220s] Traceback (most recent call last):
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 730, i
n test_pyobject_freed_is_freed
[ 6220s] self.check_pyobject_is_freed('check_pyobject_freed_is_freed')
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/test_capi.py", line 721, i
n check_pyobject_is_freed
[ 6220s] assert_python_ok('-c', code, PYTHONMALLOC=self.PYTHONMALLOC)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py",
 line 157, in assert_python_ok
[ 6220s] return _assert_python(True, *args, **env_vars)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py",
 line 143, in _assert_python
[ 6220s] res.fail(cmd_line)
[ 6220s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/Lib/test/support/script_helper.py", 
line 70, in fail
[ 6220s] raise AssertionError("Process return code is %d\n"
[ 6220s] AssertionError: Process return code is 1
[ 6220s] command line: ['/home/abuild/rpmbuild/BUILD/Python-3.8.0b1/python', 
'-X', 'faulthandler', '-c', '\nimport gc, os, sys, _testcapi\n# Disable the GC 
to avoid crash on GC collection\ngc.disable()\ntry:\n
_testcapi.check_pyobject_freed_is_freed()\n# Exit immediately to avoid a 
crash while deallocating\n# the invalid object\nos._exit(0)\nexcept 
_testcapi.error:\nos._exit(1)\n']

--
Added file: https://bugs.python.org/file48431/log.txt.gz

___
Python tracker 

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



[issue37250] C files generated by Cython set tp_print to 0: PyTypeObject.tp_print removed

2019-06-21 Thread Steve Dower


Steve Dower  added the comment:

FWIW, I agree totally with Petr's analysis.

Jeroen's analysis ignores some points, has technical inaccuracies (nobody can 
use a static type compiled for 3.7 with 3.8), and is based on precedents that 
do not apply to this situation. (All of which I've mentioned above, but I 
assume nobody is reading the whole repetitive thread anymore.)

--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


STINNER Victor  added the comment:

> In the past, I was lazy and just added more and more patterns to ignore on 
> stderr, but this approach doesn't work in the long term: gdb evolves 
> frequently, and there are always new messages.

A recent example: test_gdb fails on Fedora because a warning which should not 
prevent to test python-gdb.py commands:

"Missing separate debuginfo for /lib/ld-linux-aarch64.so.1"

Moreover, Fedora also suggests a command to install missing package in this 
case:

"Try: dnf --enablerepo='*debug*' install ..."

https://bugzilla.redhat.com/show_bug.cgi?id=1721483

--

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-21 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +14108
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14286

___
Python tracker 

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



[issue37362] test_gdb must not fail on "unexpected" messages written into stderr

2019-06-21 Thread STINNER Victor


New submission from STINNER Victor :

Currently, test_gdb fails if gdb logs messages on stderr which are 
"unexpected". I don't understand the rationale for that: Python is not supposed 
to test gdb. It's only supposed to check that python-gdb.py commands work as 
expected: stderr should be ignored.

In the past, I was lazy and just added more and more patterns to ignore on 
stderr, but this approach doesn't work in the long term: gdb evolves 
frequently, and there are always new messages.

Attached PR modify test_gdb to ignore stderr, except of "PC not saved" pattern 
used to skip test_gdb on a special case: bpo-34007.

# bpo34007: Sometimes some versions of the shared libraries that
# are part of the traceback are compiled in optimised mode and the
# Program Counter (PC) is not present, not allowing gdb to walk the
# frames back. When this happens, the Python bindings of gdb raise
# an exception, making the test impossible to succeed.
if "PC not saved" in err:
raise unittest.SkipTest("gdb cannot walk the frame object"
" because the Program Counter is"
" not present")

--
components: Tests
messages: 346211
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_gdb must not fail on "unexpected" messages written into stderr
versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37071] HTMLParser mistakenly inventing new tags while parsing

2019-06-21 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thank you for the report.

Looking at the BeautifulSoup source, there is a comment about this scenario:
# Unlike other parsers, html.parser doesn't send separate end tag
# events for empty-element tags. (It's handled in
# handle_startendtag, but only if the original markup looked like
# .)
#
# So we need to call handle_endtag() ourselves. Since we
# know the start event is identical to the end event, we
# don't want handle_endtag() to cross off any previous end
# events for tags of this name.


HTMLParser itself produces output such as:
>>> class MyParser(HTMLParser):
... def handle_starttag(self, tag, attrs):
... print(f'start: {tag}')
... def handle_endtag(self, tag):
... print(f'end: {tag}')
... def handle_data(self, data):
... print(f'data: {data}')
...
>>> parser = MyParser()
>>> parser.feed('')
start: p
start: test
end: p

My suggestion would be to try a different parser in BeautifulSoup [1] to handle 
this.  Even if we wanted to modify HTMLParser, any such change would probably 
be backwards incompatible.

[1] https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser

--
nosy: +cheryl.sabella
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



[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-21 Thread Jakub Kulik


Change by Jakub Kulik :


--
pull_requests: +14107
pull_request: https://github.com/python/cpython/pull/14285

___
Python tracker 

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



[issue37358] Use vectorcall for functools.partial

2019-06-21 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue37361] urllib3: TypeError: unsupported operand type(s) for -=: 'Session' and 'int' in Retry class

2019-06-21 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> not a bug
type:  -> behavior

___
Python tracker 

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



  1   2   >