[issue9529] Make re match object iterable

2019-12-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy -patch

___
Python tracker 

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



[issue38981] better name for re.error Exception class.

2019-12-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Reopened after discussing on Python-ideas: 
https://mail.python.org/archives/list/python-id...@python.org/thread/64NHNY6RD4HQWBSBV6J7XIN7UAHNTQBR/.

--
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
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



[issue38990] Import genericpath fails with python -S

2019-12-06 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +brett.cannon, pitrou

___
Python tracker 

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



[issue38887] test_asyncio: test_pipe_handle() failed on AMD64 Windows7 SP1 3.x

2019-12-06 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Similar past report : issue31007

--
nosy: +xtreak

___
Python tracker 

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



[issue38975] Add direct anchors to regex syntax documentation

2019-12-06 Thread Ned Deily


Change by Ned Deily :


--
nosy: +mdk

___
Python tracker 

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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> do we have any buildbots using -X showrefcount?

No. What would be the purpose of such buildbot?

-X showrefcount is tested by test_cmd_line.test_showrefcount().

I ran "./python -X showrefcount -m test -j0 -r": all tests pass. (test_pty fail 
when run in parallel, but pass when run sequentially: bpo-38547, it's unrelated 
to this change).

--

___
Python tracker 

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



[issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora

2019-12-06 Thread Ned Deily


Ned Deily  added the comment:

@koobs, FWIW, unlike for most other third-party libs, there now is a configure 
option to allow specifying the path to the desired OpenSSL version, actually 
two ways.  Either use the --with-openssl= option to ./configure. Otherwise, if 
pkg-config info is availble, ./configure will try to use that for OpenSSL.

--
nosy: +ned.deily

___
Python tracker 

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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-06 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

do we have any buildbots using -X showrefcount?

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-12-06 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

Another subtlety that that code handles, and that the stdlib socket module 
might also want to handle: if the user passes in a custom backlog argument 
that's >65535, then we silently replace it with 66535 before passing it to the 
system. The reason is that many systems will silently truncate this value to 16 
bits, so if a user explicitly passes in 65536, what they get is a backlog of 1, 
which is probably not what they were hoping for.

--

___
Python tracker 

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



[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-12-06 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

Trio uses 65535 as the default backlog argument. There's a big comment here 
explaining why: 
https://github.com/python-trio/trio/blob/master/trio/_highlevel_open_tcp_listeners.py

This doesn't actually set the backlog to 65635; instead it tells the kernel to 
use the biggest backlog that it feels comfortable with (e.g. 
/proc/sys/net/core/somaxconn on Linux).

--

___
Python tracker 

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



[issue38991] Remove test.support.strip_python_stderr()

2019-12-06 Thread STINNER Victor


New submission from STINNER Victor :

Python 3.3 compiled in debug mode dumps the total number of references at exit 
into stderr. Something like:

$ python3.3-dbg -X showrefcount -c pass
[18563 refs, 6496 blocks]

In Python 3.4, bpo-17323 disabled this feature by default and added -X 
showrefcount command line option:

commit 1f8898a5916b942c86ee8716c37d2db388e7bf2f
Author: Ezio Melotti 
Date:   Tue Mar 26 01:59:56 2013 +0200

#17323: The "[X refs, Y blocks]" printed by debug builds has been disabled 
by default.  It can be re-enabled with the `-X showrefcount` option.

test.support module still has strip_python_stderr() function to remove "[18563 
refs, 6496 blocks]" from stderr, but it's now useless.

Attached PR removes the function. The PR also avoids calling str.strip().

--
components: Tests
messages: 357955
nosy: vstinner
priority: normal
severity: normal
status: open
title: Remove test.support.strip_python_stderr()
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



[issue38697] test.support.find_unused_port() race condition: test_socket fails with OSError: [Errno 98] Address already in use

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

support.find_unused_port() has a race condition by design, but tests are re-run 
sequentially by buildbots and so the rare race condition is worked around in 
practice.

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

___
Python tracker 

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



[issue38594] importlib.metadata documentation deficiencies

2019-12-06 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee: docs@python -> jaraco

___
Python tracker 

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



[issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment

2019-12-06 Thread Kevin Puetz


Change by Kevin Puetz :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue21820] unittest: unhelpful truncating of long strings.

2019-12-06 Thread Ella Sharakanski


Ella Sharakanski  added the comment:

Any news on this? I also consider this a bug.

--
nosy: +Ella Sharakanski

___
Python tracker 

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



[issue38699] socket: change listen() default backlog from 128 to 4096?

2019-12-06 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +njs, yselivanov

___
Python tracker 

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



[issue38988] Killing asyncio subprocesses on timeout?

2019-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

There have been changes to asyncio since 3.6.  I you have not, please check the 
3.8 version to see if any of them are relevant to your issue.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38975] Add direct anchors to regex syntax documentation

2019-12-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

ΒΆ anchors are generated automatically for headers, but I don't know what the 
policy might be for items within section.  It might be useful to add some 
subsection headers within the Regular Expression Syntax section.

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> Would it make sense to also backport this fix to the 3.6 release?

Sadly, 3.6 no longer accept bugfixes:
https://devguide.python.org/#status-of-python-branches

--

___
Python tracker 

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



[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-06 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue38974] using tkinter.filedialog.askopenfilename() freezes python 3.8

2019-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

filedialog.askopenfilename returns 'Open(**options).show()'.  IDLE's File => 
Open (^O) calls Open and show directly.  It continues to run on all versions on 
my machine (and presumably those of numerous others).  I have TortoiseGit now 
and only recently removed TortoiseHG, so those two seem well-enough behaved.  
This is almost certainly not a cpython issue, but it would be good to know 
where the problem lies.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38961] Flaky detection of compiler vendor

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



[issue38953] Untokenize and retokenize does not round-trip

2019-12-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue38952] asyncio cannot handle Python3 IPv4Address

2019-12-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If this is a duplicate of #35019, then this issue should be closed, the 
original post here should be copied over, and the PR should be edited to point 
to the original issue, both in the title and the box below the title.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment

2019-12-06 Thread Kevin Puetz


Kevin Puetz  added the comment:

Just to link the various pieces together: I think 

https://bitbucket.org/pypa/distlib/src/2d145da7cb42590039fbd56a9ab764d5d4716a98/distlib/wheel.py#lines-53

is the place in distlib that's being breaking pip due to redefining 
distutils.util.get_platform() as the cross-compile target architecture  rather 
than the build architecture.

https://docs.python.org/3/distutils/apiref.html doesn't show it as a documented 
public function, but the commit Ryan linked did introduce a new 
get_host_plaform() that matches the old behavior; if that became public and 
distlib used itinstead (conditional on the python version?) that would also be 
a way to fix the symptom Ryan noted (pip now choosing the wrong wheel to 
install).

I don't know how the pieces here fit together well enough to now which side 
should change.

@zooba: adding you to the Cc since it was your comments at 
https://github.com/python/cpython/pull/11774#discussion_r254461961 that seem to 
have led to the decision to re-define get_platform, maybe you have some 
relevant context?

--
nosy: +steve.dower

___
Python tracker 

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



[issue38990] Import genericpath fails with python -S

2019-12-06 Thread Brittany Reynoso


New submission from Brittany Reynoso :

When running python -S, attempting to run "import genericpath" fails with an 
attribute error due to a circular dependency between posixpath and genericpath 
that's triggered when "import os" is called from within genericpath.py. 

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/fbcode/platform007/lib/python3.7/genericpath.py", line 6, in 

import os
  File "/usr/local/fbcode/platform007/lib/python3.7/os.py", line 57, in 
import posixpath as path
  File "/usr/local/fbcode/platform007/lib/python3.7/posixpath.py", line 130, in 

splitext.__doc__ = genericpath._splitext.__doc__
AttributeError: module 'genericpath' has no attribute '_splitext'

--
components: Library (Lib)
messages: 357947
nosy: brittanyrey
priority: normal
severity: normal
status: open
title: Import genericpath fails with python -S
type: crash
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment

2019-12-06 Thread Kevin Puetz


Kevin Puetz  added the comment:

Besides the fact the MSVC's target platform isn't really related to the 
architecture for dependencies being installed, I'm not sure VSCMD_ARG_TGT_ARCH 
is an appropriate variable to look at in the first place. It doesn't seem to be 
at all documented, and (from looking at the implemenation) it seems to be meant 
as how parse_cmd.bat communicates with vcvars.bat, dotnet.bat, winsdk.bat, etc 
(these are all sub-programms that make up vcvarsall.bat)

I think %PLATFORM% (which generally ends up set equal to %VSCMD_ARG_TGT_ARCH% 
once vsdevcmd\ext\vcvars.bat has done its thing) is might be a better variable 
that cross-compiling should actually look at when it wants to know what 
architecture MSVC will compile to.

--
nosy: +puetzk

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-12-06 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Can we reopen the issue?

Clearly this change modifies the expectations of free disk space for the temp 
files created by the tests.

Or at least clarify that those tests require more than 6gb of free disk space 
in /tmp for unix

--

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2019-12-06 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Would it make sense to also backport this fix to the 3.6 release?

People compiling 3.6 with gcc 10 will stumble upon that.

--
nosy: +cstratak

___
Python tracker 

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



[issue37931] crash reimporting posix after Py_Finalize on mac

2019-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset 836cf31a3cf468ed9598a220b8e194b366287bfe by Miss Islington (bot) 
in branch '3.8':
bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)
https://github.com/python/cpython/commit/836cf31a3cf468ed9598a220b8e194b366287bfe


--
nosy: +miss-islington

___
Python tracker 

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



[issue38916] Remove array.fromstring

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-38897 removed usage of deprecated array.fromstring() method. Commit in 
master:

https://github.com/python/cpython/commit/386d00cc341b549800776b906bfc6b20ea40c7db

--

___
Python tracker 

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



[issue37931] crash reimporting posix after Py_Finalize on mac

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb by Victor Stinner 
(Benoit Hudson) in branch 'master':
bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)
https://github.com/python/cpython/commit/723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb


--
nosy: +vstinner

___
Python tracker 

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



[issue37931] crash reimporting posix after Py_Finalize on mac

2019-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16967
pull_request: https://github.com/python/cpython/pull/17488

___
Python tracker 

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



[issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Maybe the test can replace shutil.rmtree() with test.support.rmtree() 
temporarily in test_venv, since test.support.rmtree() handles the anti-malwares 
protections by retrying and/or sleep (if I recall correctly).

--

___
Python tracker 

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



[issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\

2019-12-06 Thread Vinay Sajip


Vinay Sajip  added the comment:

Not sure what's changed in this area, if anything, to cause this. Can we check 
if there is anti-virus software running on the buildbot box? This can sometimes 
hold files open for short periods while scanning for malware, causing this type 
of permission error fairly randomly.

--

___
Python tracker 

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



[issue27822] Fail to create _SelectorTransport with unbound socket

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> In writing a simple UDP client using asyncio, I tripped over a call to 
> getsockname() in the _SelectorTransport class in asyncio/selector_events.py. 
> (...)

This bug has been fixed recently by:

commit 63deaa5b70108ef441c57728322da6b4321db4fc
Author: Vincent Michel 
Date:   Tue May 7 19:18:49 2019 +0200

bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)


Extract of the change:

diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 93b6889509..29968214f8 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -587,7 +587,10 @@ class _SelectorTransport(transports._FlowControlMixin,
 def __init__(self, loop, sock, protocol, extra=None, server=None):
 super().__init__(extra, loop)
 self._extra['socket'] = sock
-self._extra['sockname'] = sock.getsockname()
+try:
+self._extra['sockname'] = sock.getsockname()
+except OSError:
+self._extra['sockname'] = None
 if 'peername' not in self._extra:
 try:
 self._extra['peername'] = sock.getpeername()


Thanks for your contribution and your proposed patch Paul McGuire! Sorry for 
the late reply. I mark this change as a duplicate of bpo-31922.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Can't receive replies from multicast UDP with asyncio
versions: +Python 3.9 -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



[issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment

2019-12-06 Thread Ryan Thornton


New submission from Ryan Thornton :

## Expected Behavior

pip install should download dependencies matching the architecture of the 
python executable being used.

## Actual Behavior

When calling pip install from a Visual Studio command prompt configured to 
cross compile from x64 to x86, pip installs wheels matching the architecture of 
Visual Studio's cross compile target (i.e. `VSCMD_ARG_TGT_ARCH=x86`) and not 
the architecture of python itself (x64).

This results in a broken installation of core libraries.

## Steps to Reproduce

System Details:
Windows 10 x64
Python 3.8 x64
Visual Studio 2017 15.9.14

Environment Details:
vcvarsall.bat amd64_x86

1. "C:\Program Files\Python38\python.exe" -mvenv "test"
2. cd test\Scripts
3. pip install cffi==1.13.2

Results in the following:

> Collecting cffi
>  Using cached 
> https://files.pythonhosted.org/packages/f8/26/5da5cafef77586e4f7a136b8a24bc81fd2cf1ecb71b6ec3998ffe78ea2cf/cffi-1.13.2-cp38-cp38-win32.whl

## Context

I think the regression was introduced here:
62dfd7d6fe11bfa0cd1d7376382c8e7b1275e38c

https://github.com/python/cpython/commit/62dfd7d6fe11bfa0cd1d7376382c8e7b1275e38c

--
components: Distutils
messages: 357936
nosy: Ryan Thornton, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat 
amd64_x86 in environment
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



[issue33125] Windows 10 ARM64 platform support

2019-12-06 Thread Steve Dower


Steve Dower  added the comment:

This site seems like a pretty good aggregation of news around Windows on ARM64 
devices: https://www.windows-arm.com/

Short story is, it's a real thing, but for (what I consider) obvious reasons 
the OSS developer experience isn't great yet.

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2019-12-06 Thread Steve Dower


Steve Dower  added the comment:

Closing this as the work we need for support is now added. Whether we start 
releasing binaries from python.org is a discussion to have on python-dev and 
with the broader community.

Right now, I don't think the ecosystem is ready to add support (mainly because 
there is no CI system that can build/test easily). And most of our tooling 
isn't up to the task either. Until that can be improved, it's not fair to 
expect third party packagers to provide wheels or support the platform.

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



[issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\

2019-12-06 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue38916] Remove array.fromstring

2019-12-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38916] Remove array.fromstring

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

I chose to write PR 17487 even if the issue was tagged as "easy (C)", just to 
make sure that the change is done as soon as possible in the 3.9 dev cycle.

--

___
Python tracker 

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



[issue38916] Remove array.fromstring

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> If it was documented as deprecated and raising a deprecation warning then 3.2 
> is definitely far enough back to warrant removing it.

Exactly. I'm in favor of removing fromstring() and tostring() methods right 
now, and update 3.7 and 3.8 documentation to mention that the methods are 
removed in Python 3.9, not Python 4.0.

Either do it right now, or wait the beginning of the next Python 3.x release 
cycle. I prefer to push some incompatible changes at the beginning of dev 
cycles, to get enough time to measure the feedback from users.

--

Brett opened a more generic discussion about the deprecation process, since PEP 
602 has been accepted:
https://mail.python.org/archives/list/python-...@python.org/thread/BRA7G4UIGGW2X7YY55KQZBOGJEYNUV6O/

--

___
Python tracker 

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



[issue38988] Killing asyncio subprocesses on timeout?

2019-12-06 Thread dontbugme


New submission from dontbugme :

I'm trying to use asyncio.subproceess and am having difficulty killing the 
subprocesses after timeout. My use case is launching processes that hold on to 
file handles and other exclusive resources, so subsequent processes can only be 
launched after the first ones are fully stopped.


The documentation on 
https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.asyncio.subprocess.Process
 say there is no timeout-parameter and suggests using wait_for() instead.
I tried this but it's kind of a footgun because the wait_for() times out but 
the process still lives on in the background. See Fail(1) and Fail(2) in 
attached test1().


To solve this i tried to catch the CancelledError and in the exception handler 
kill the process myself. While this worked it's also semi dangerous because it 
takes some time for the process to get killed and the wait() after kill() runs 
in the background as some kind of detached task. See Fail(3) in attached 
test2().
This i can sortof understand because after TimeoutError something would have to 
block for wait() to actually finish and this is impossible.

After writing this i feel myself there is no good solution for Fail#3 because 
again, timeouts can't be blocking. Maybe some warning in the documentation 
would be appropriate for Fail(1+2) because the suggestion in the documentation 
right now is quite misleading, the wait_for()-alternative to timeout-parameter 
does not behave like the timeout-parameter in ordinary subprocess.Popen.wait()

--
components: asyncio
files: subprocess_timeout.py
messages: 357930
nosy: asvetlov, dontbugme, yselivanov
priority: normal
severity: normal
status: open
title: Killing asyncio subprocesses on timeout?
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48761/subprocess_timeout.py

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2019-12-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset c9f480d2ccda9de46584cabe086f0acfa45f2faf by Steve Dower in branch 
'3.8':
bpo-33125: Add support for building and releasing Windows ARM64 packages 
(GH-17480)
https://github.com/python/cpython/commit/c9f480d2ccda9de46584cabe086f0acfa45f2faf


--

___
Python tracker 

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



[issue38546] test_concurrent_futures: reap_children() warnings on RHEL7 and RHEL8 buildbots

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

New failure on AMD64 RHEL7 LTO 3.x:
https://buildbot.python.org/all/#/builders/103/builds/17

test_interpreter_shutdown
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest)
... 1.61s Warning -- reap_children() reaped child process 9934

--

___
Python tracker 

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



[issue38982] test_asyncio: SubprocessPidfdWatcherTests..test_close_dont_kill_finished() leaks a file descriptor

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

I manually validated that my change fixed the test_asyncio leak:

$ ./python -m test test_asyncio -R 3:3 --fail-env-changed -v -m test_subprocess
(...)
Tests result: SUCCESS

I close the issue. Thanks Pablo for the review ;-)

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



[issue5396] os.read not handling O_DIRECT flag

2019-12-06 Thread Logan Gunthorpe


Logan Gunthorpe  added the comment:

Paul's solution works in 3.7 if you set the buffer size to zero when calling 
fdopen.

fd = os.open("my_file", os.O_DIRECT | os.O_RDWR)
f = os.fdopen(fd, "rb+", 0)
m = mmap.mmap(-1, 4096)
f.readinto(m)

This is according to a comment in _pyio.py:

# If remaining space in callers buffer is larger than
# internal buffer, read directly into callers buffer

So by simply disabling the buffer (which is what we'd want for O_DIRECT anyway) 
readinto() works as expected. 

However, based on this issue, I'm a little concerned this won't be fully 
supported by python going forward; so use with care.

--
nosy: +logang

___
Python tracker 

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



[issue38980] Compile libpython with -fno-semantic-interposition

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> In case of malloc, every memory allocating code need to use 
> malloc/calloc/realloc. This is official and the only way to allocate a 
> memory. But we do not guarantee that Python core uses only public C API like 
> PyErr_Occurred(). It can use more low-level and efficient but less safer C 
> API internally. It can replace the function with a macro which access 
> internal structures directly (for compiling the core only). And this is 
> actually the case. Overridding the public C API functions not always has an 
> effect on the core.

To confirm what you said: if we take the specific example of PyErr_Occurred(), 
I recently added a new _PyErr_Occurred() function which is declared as a static 
inline function. _PyErr_Occurred() cannot be overriden.

static inline PyObject* _PyErr_Occurred(PyThreadState *tstate)
{
assert(tstate != NULL);
return tstate->curexc_type;
}

--

___
Python tracker 

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



[issue38544] test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: directory not empty: Scripts\

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-38983 as a duplicate of this issue. It's the same error in the 
same function (clear_directory()). Copy of the first message:

Failure on AMD64 Windows7 SP1 3.x:
https://buildbot.python.org/all/#builders/81/builds/16

==
ERROR: test_overwrite_existing (test.test_venv.BasicTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_venv.py", 
line 225, in test_overwrite_existing
builder.create(self.env_dir)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\venv\__init__.py", 
line 65, in create
context = self.ensure_directories(env_dir)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\venv\__init__.py", 
line 108, in ensure_directories
self.clear_directory(env_dir)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\venv\__init__.py", 
line 91, in clear_directory
shutil.rmtree(fn)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 731, 
in rmtree
return _rmtree_unsafe(path, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 613, 
in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 611, 
in _rmtree_unsafe
os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp9y0m6j7z\\Scripts'

==
ERROR: test_overwrite_existing (test.test_venv.BasicTest)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 380, in _force_run
return func(*args)
PermissionError: [WinError 5] Access is denied: 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp9y0m6j7z\\Scripts\\activate.bat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_venv.py", 
line 71, in tearDown
rmtree(self.env_dir)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 502, in rmtree
_rmtree(path)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 443, in _rmtree
_waitfor(_rmtree_inner, path, waitall=True)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 391, in _waitfor
func(pathname)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 439, in _rmtree_inner
_waitfor(_rmtree_inner, fullname, waitall=True)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 391, in _waitfor
func(pathname)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 442, in _rmtree_inner
_force_run(fullname, os.unlink, fullname)
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", 
line 385, in _force_run
os.chmod(path, stat.S_IRWXU)
PermissionError: [WinError 5] Access is denied: 
'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp9y0m6j7z\\Scripts\\activate.bat

--

___
Python tracker 

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



[issue38987] 3.8.0 on GNU/Linux fails to find shared library

2019-12-06 Thread Kevin Buchs


New submission from Kevin Buchs :

I just downloaded Python 3.8.0 and built (from source) on Ubuntu 18.04. I used 
these options to configure:

  ./configure --enable-shared --enable-ipv6 --enable-optimizations

The shared library gets installed into /usr/local/lib:

  find / -type f -name libpython3.8.so.1.0
  /usr/local/src/Python-3.8.0/libpython3.8.so.1.0
  /usr/local/lib/libpython3.8.so.1.0
  
/usr/local/lib is defined as a path to search for shared libraries: 

  # /etc/ld.so.conf loads all /etc/ld.so.conf.d/*.conf
  grep /usr/local  /etc/ld.so.conf.d/*.conf
  /etc/ld.so.conf.d/i386-linux-gnu.conf:/usr/local/lib/i386-linux-gnu
  /etc/ld.so.conf.d/i386-linux-gnu.conf:/usr/local/lib/i686-linux-gnu
  /etc/ld.so.conf.d/libc.conf:/usr/local/lib
  /etc/ld.so.conf.d/x86_64-linux-gnu.conf:/usr/local/lib/x86_64-linux-gnu

But, the python executable is unable to find it:
  /usr/local/bin/python3.8
  /usr/local/bin/python3.8: error while loading shared libraries: 
libpython3.8.so.1.0: cannot open shared object file: No such file
or directory

--
components: Installation
messages: 357924
nosy: buchs
priority: normal
severity: normal
status: open
title: 3.8.0 on GNU/Linux fails to find shared library
type: crash
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



[issue38868] Shutil cannot delete a folder that contains an .ini file

2019-12-06 Thread Svetlana Vodianova


Svetlana Vodianova  added the comment:

I think eryksun is correct.

I agree. The code sample provided by him, and the Python docs, mean I'm able to 
remove a folder with a .ini file without getting WinError 5.

I should mark this as closed as he solved my problem.

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



[issue33125] Windows 10 ARM64 platform support

2019-12-06 Thread Zachary Ware


Change by Zachary Ware :


--
Removed message: https://bugs.python.org/msg357922

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2019-12-06 Thread wayo man


wayo man  added the comment:

Have you heard of this songs


https://fakazamusic.co/khuzani-isilingo/
https://fakazamusic.co/kabza-de-small-dj-maphorisa-sha-sha-kea-go-rata/
https://fakazamusic.co/amabhotela-uzongithola-ematshwaleni/
https://fakazamusic.co/khuzani-new-album-2019/
https://fakazamusic.co/khuzani-inhloko-nesxhanti-album-tracklist/
https://fakazamusic.co/amapiano-mix-1-december-2019-ft-vigro-deep-dj-big-sky-kabza-de-small-mixed-by-tkm/
https://fakazamusic.co/album-mashbeatz-fire-in-the-water-zip-file/
https://fakazamusic.co/ep-starboy-soundman-vol-1-zip-file/
https://fakazamusic.co/da-fresh-athie-x-mr-thela-religious-sounds/


https://fakazamusic.co;>mixtapes download

https://fakazamusic.co;>latest gospel songs mp3 download

https://safakaza.com;>south africa songs download


https://fakazamusic.co;>pro.tee no eric gqom songs

https://fakazamusic.co;> song lyrics 

https://forible.xyz;>deephouse News & Entertainment

 https://dfactual.com;>deephouse News & Entertainment

https://fakazamusic.co;>pelco songs download

https://fakazamusic.co;>apiano vigro deep  

https://fakazamusic.co;>pro tee songs 2019

--
nosy: +wayoman

___
Python tracker 

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



[issue38983] test_venv: test_overwrite_existing() failed on AMD64 Windows7 SP1 3.x

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> https://bugs.python.org/issue38544#msg355041 seems like a related old report

Right, same error in the same function (clear_directory()). I mark it as a 
duplicate of bpo-38544.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_venv: test_isolation() failed on AMD64 Windows7 SP1 3.x: 
directory not empty: Scripts\

___
Python tracker 

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



[issue38858] new_interpreter() should reuse more Py_InitializeFromConfig() code

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Py_NewInterpreter() (new_interpreter() in practice) and Py_InitializeEx() now 
share almost all their code.

Py_EndInterpreter() shares almost all its code with Py_Finalizer(). It's not 
perfect, but it's way better than previously.

Py_NewInterpreter() now isolates more things from the main interpreter. For 
example, builtins and sys modules no longer copy the module dictionary of the 
main interpreter, but create their own dictionary from scratch.

See each commit for the details.

Py_Finalizer() could share more code with Py_EndInterpreter(), but each 
Py_Finalizer() change is really tricky and require to pay a lot attention. The 
Python finalization is really fragile. I started to take notes on this fragile 
code:
https://pythondev.readthedocs.io/finalization.html

I consider that the initial issue is fixed, so I close the issue.

--
nosy: +eric.snow
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



[issue38982] test_asyncio: SubprocessPidfdWatcherTests..test_close_dont_kill_finished() leaks a file descriptor

2019-12-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e76ee1a72b9e3f5da287663ea3daec4bb3f67612 by Victor Stinner in 
branch 'master':
bpo-38982: Fix asyncio PidfdChildWatcher on waitpid() error (GH-17477)
https://github.com/python/cpython/commit/e76ee1a72b9e3f5da287663ea3daec4bb3f67612


--

___
Python tracker 

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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset 5ba591fa2c1f74c4a84372fb4ffc0b16863f1ad7 by Miss Islington (bot) 
in branch '3.7':
bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py 
(GH-13135)
https://github.com/python/cpython/commit/5ba591fa2c1f74c4a84372fb4ffc0b16863f1ad7


--

___
Python tracker 

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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset 681285d052977e3a3a82ef665e788946fca1ac59 by Miss Islington (bot) 
in branch '3.8':
bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py 
(GH-13135)
https://github.com/python/cpython/commit/681285d052977e3a3a82ef665e788946fca1ac59


--

___
Python tracker 

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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16965
pull_request: https://github.com/python/cpython/pull/17486

___
Python tracker 

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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16964
pull_request: https://github.com/python/cpython/pull/17485

___
Python tracker 

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



[issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib

2019-12-06 Thread miss-islington


miss-islington  added the comment:


New changeset b64334cb93d0ddbb551c8cd712942bab2fc72772 by Miss Islington (bot) 
(Mario Corchero) in branch 'master':
bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py 
(GH-13135)
https://github.com/python/cpython/commit/b64334cb93d0ddbb551c8cd712942bab2fc72772


--
nosy: +miss-islington

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

For the note: TaskStepMethWrapper has the same fix already, 
TaskWakeupMethWrapper was accidentally missed.

--

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue38608] Undocumented behavior that IsolatedAsyncioTestCase would enable event loop debug mode

2019-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The output will be fixed by #38986
Nothing to do here.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue38986] Suppport TaskWakeupMethWrapper.__self__ to conform asyncio _format_handle logic

2019-12-06 Thread Andrew Svetlov


New submission from Andrew Svetlov :

_format_handle() behaves differently if handle._callback.__self__ is 
asyncio.Task instance.

To follow this logic TaskWakeupMethWrapper from _asynciomodule.c should support 
the corresponding member.

The fix is very desired for analyzing slow callbacks, without it the output 
doesn't point on slow coroutine but mentions  
only.

See also #38608

--
components: asyncio
messages: 357913
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Suppport TaskWakeupMethWrapper.__self__ to conform asyncio 
_format_handle logic
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



[issue38906] copy2 doesn't copy metadata on Windows and MacOS

2019-12-06 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The relevant API on macOS is [f]copyfile(3) which is at the POSIX layer. The 
copyFile API linked to in msg357395 is a higher-level ObjC/Swift API.

Using the copyfile(3) API has another advantage beyond this issue: This API can 
perform a clone action on APFS when the right flags are used.

--

___
Python tracker 

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



[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-12-06 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I tried sending this message earlier, but it seems to have disappeared 
into the void, so I'm trying again. Apologies if it turns up twice.

* * *

> There are almost 500 occurrences of "is true".

We can worry about them if and when somebody raises them as a "bug 
report" or feature request. Without reading each one in context, I have 
no idea whether they are good, bad or indifferent. Doing a massive 
search and replace would be a bad idea.

Right now we have a simple feature request: improve the assertIsTrue and 
assertIsFalse messages. There is a simple way to improve them. We don't 
have to touch any other message, just these two.

Personally, I prefer "truthy and falsey" or "true-like and false-like" 
over "true and false" to distinguish between "duck-typed bools" and the 
actual bool singletons True and False. But I don't prefer them enough to 
fight over the terms. If you prefer "true and false", that's okay with 
me too :-)

"False is not true" suggests to the user that the test is doing an 
identity check. We have proof from the OP's bug report that at least one 
person thought that. I had to read the source code to check.

A better failure message would be helpful to make it clear that it 
checks by value not identity ``if value is True``.

--

___
Python tracker 

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



[issue38955] Non indemnpotent behavior of asyncio.get_event_loop and asyncio.run sequence.

2019-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Asyncio has a few own exceptions, the library tries to utilize existing ones, 
e.g. ValueError, TypeError, and OSError family. RuntimeError falls into this 
category.

get_event_loop() never returns None, it was from very beginning. If we change 
it existing third-party code will be broken. So, no way, sorry.

I really don't think we can change anything here.

Would you describe cases when you need an implicit loop instance but there is 
no running loop currently?

--

___
Python tracker 

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



[issue38973] Shared Memory List Returns 0 Length

2019-12-06 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +davin

___
Python tracker 

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



[issue38985] `compile` returns the first line of file on termination

2019-12-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue38973] Shared Memory List Returns 0 Length

2019-12-06 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
nosy:  -asvetlov

___
Python tracker 

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



[issue38973] Shared Memory List Returns 0 Length

2019-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Antoine is marked as the multiprocessing expert

--
nosy: +pitrou

___
Python tracker 

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



[issue38985] `compile` returns the first line of file on termination

2019-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, that is expected behavior.

 Python is not designed for sandboxing and doesn't support sandboxing. *If* 
Python would support sandboxing, then compile() would be one of the first 
functions to go, because it allows an attacker to construct custom executable 
code.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue38985] `compile` returns the first line of file on termination

2019-12-06 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

It's not necessarily the first line. The code is executed with the context of 
the given file. Hence the corresponding line number of error from traceback 
with respect to file is printed.

$ cat /tmp/passwd
line 1
line 2
line 3
line 4

$ python3 -c 'compile("\n\n\nyield", "/tmp/passwd", "exec")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/passwd", line 4
line 4
^
SyntaxError: 'yield' outside function

--
nosy: +xtreak

___
Python tracker 

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



[issue38984] Value add to the wrong key in a dictionary

2019-12-06 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue38985] `compile` returns the first line of file on termination

2019-12-06 Thread Koh


New submission from Koh :

By specifying a filename in the compile function and then improperly 
terminating it, we are able to return the first line of any file.

>> compile('yield', '/etc/passwd', 'exec')
File "/etc/passwd", line 1
root:x:0:0:root:/root:/bin/bash
^
SyntaxError: 'yield' outside function

Is this intended behavior? I have been able to use it to escape sandboxes.

--
messages: 357906
nosy: iso
priority: normal
severity: normal
status: open
title: `compile` returns the first line of file on termination
type: security
versions: Python 2.7, Python 3.5, Python 3.6, 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



[issue38980] Compile libpython with -fno-semantic-interposition

2019-12-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In case of malloc, every memory allocating code need to use 
malloc/calloc/realloc. This is official and the only way to allocate a memory. 
But we do not guarantee that Python core uses only public C API like 
PyErr_Occurred(). It can use more low-level and efficient but less safer C API 
internally. It can replace the function with a macro which access internal 
structures directly (for compiling the core only). And this is actually the 
case. Overridding the public C API functions not always has an effect on the 
core.

So I think that adding -fno-semantic-interposition will likely not break many 
things which were not broken before.

But this should be discussed on Python-Dev. I am sure some C API functions are 
purposed to be overridden.

--

___
Python tracker 

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