[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-29 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:


New changeset f1487b323549e2360460383b4304f6592fb38e27 by Giampaolo Rodola 
(Miss Islington (bot)) in branch '3.7':
bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369)
https://github.com/python/cpython/commit/f1487b323549e2360460383b4304f6592fb38e27


--

___
Python tracker 

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



[issue37091] subprocess - uncaught PermissionError in send_signal can cause hang

2019-05-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-29 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

I currently have no Solaris box to test this against and am currently short on 
time but I'm of the opinion that because of:

   > Sendfile on Solaris can raise EINVAL if offset is equal or bigger than the 
size
   > of the file (Python expects that it will return 0 bytes sent in that case).

...and the fact that beta1 will happen soon it's safer to use sendfile() on 
Linux only. Googling for "solaris + sendfile" also raises suspicions that 
sendfile() may be broken on Solaris. shutil.copyfile() is too central to risk 
breaking it. 

We may also want to look at socket.sendfile() implementation and add tests for 
large files for both functions (socket.sendfile() and shutil.copyfile()). I'm 
adding that to my TODO list.

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks! No 3.6 backport is needed after all.

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 3a98bbf7275903a0f84d1374abd0b7f3a85950a4 by Miss Islington (bot) 
(Anthony Sottile) in branch '3.7':
[3.7] bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456) 
(GH-13662)
https://github.com/python/cpython/commit/3a98bbf7275903a0f84d1374abd0b7f3a85950a4


--

___
Python tracker 

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



[issue36610] os.sendfile can return EINVAL on Solaris

2019-05-29 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests: +13563
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13675

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2019-05-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lars.gustaebel, serhiy.storchaka
versions: +Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue37095] [Feature Request]: Add zstd support in tarfile

2019-05-29 Thread Evan Greenup


New submission from Evan Greenup :

Zstandard is getting more and more popular. It could be awesome if tarfile 
support this compression format for .tar.zst file.

--
components: Library (Lib)
messages: 343945
nosy: evan0greenup
priority: normal
severity: normal
status: open
title: [Feature Request]: Add zstd support in tarfile
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13562
pull_request: https://github.com/python/cpython/pull/13673

___
Python tracker 

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



[issue24564] shutil.copytree fails when copying NFS to NFS

2019-05-29 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:


New changeset a16387ab2d85f19665920bb6ff91a7e57f59dd2a by Giampaolo Rodola 
(Ying Wang) in branch 'master':
bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369)
https://github.com/python/cpython/commit/a16387ab2d85f19665920bb6ff91a7e57f59dd2a


--

___
Python tracker 

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



[issue37094] Provide an example for TestCase.skipTest in unittest doc

2019-05-29 Thread 麦栋铖

New submission from 麦栋铖 :

I found that there's an function TestCase.skipTest(reason)[0] supports skipping 
test in testing, but there's no example for this function in chapter Skipping 
tests[1] and expected failures

I create PR[2] for updating the example for TestCase.skipTest in unittest doc.
The example is from Lib/unittest/test, the test for unittest.

I am sorry for that i don't know if the issue tracker support markdown link 
syntax, so i just copy and paste the link below:

[0] https://docs.python.org/3.7/library/unittest.html#unittest.TestCase.skipTest
[1]https://docs.python.org/3.7/library/unittest.html#skipping-tests-and-expected-failures
[2]https://github.com/python/cpython/pull/13645

--
assignee: docs@python
components: Documentation
messages: 343943
nosy: docs@python, 麦栋铖
priority: normal
pull_requests: 13561
severity: normal
status: open
title: Provide an example for TestCase.skipTest in unittest doc
type: enhancement
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



[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
pull_requests: +13560
pull_request: https://github.com/python/cpython/pull/13671

___
Python tracker 

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



[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Emmanuel Arias


Change by Emmanuel Arias :


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

___
Python tracker 

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



[issue37093] http.client aborts header parsing upon encountering non-ASCII header names

2019-05-29 Thread Tim Burke

New submission from Tim Burke :

First, spin up a fairly trivial http server:

import wsgiref.simple_server

def app(environ, start_response):
start_response('200 OK', [
('Some-Canonical', 'headers'),
('sOme-CRAzY', 'hEaDERs'),
('Utf-8-Values', '\xe2\x9c\x94'),
('s\xc3\xb6me-UT\xc6\x92-8', 'in the header name'),
('some-other', 'random headers'),
])
return [b'Hello, world!\n']

if __name__ == '__main__':
httpd = wsgiref.simple_server.make_server('', 8000, app)
while True:
httpd.handle_request()

Note that this code works equally well on py2 or py3; the interesting bytes on 
the wire are the same on either.

Verify the expected response using an independent tool such as curl:

$ curl -v http://localhost:8000
*   Trying ::1...
* TCP_NODELAY set
* connect to ::1 port 8000 failed: Connection refused
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.64.0
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Wed, 29 May 2019 23:02:37 GMT
< Server: WSGIServer/0.2 CPython/3.7.3
< Some-Canonical: headers
< sOme-CRAzY: hEaDERs
< Utf-8-Values: ✔
< söme-UTƒ-8: in the header name
< some-other: random headers
< Content-Length: 14
< 
Hello, world!
* Closing connection 0

Check that py2 includes all the same headers:

$ python2 -c 'import pprint, urllib; resp = 
urllib.urlopen("http://localhost:8000;); 
pprint.pprint((dict(resp.info().items()), resp.read()))'
({'content-length': '14',
  'date': 'Wed, 29 May 2019 23:03:02 GMT',
  'server': 'WSGIServer/0.2 CPython/3.7.3',
  'some-canonical': 'headers',
  'some-crazy': 'hEaDERs',
  'some-other': 'random headers',
  's\xc3\xb6me-ut\xc6\x92-8': 'in the header name',
  'utf-8-values': '\xe2\x9c\x94'},
 'Hello, world!\n')

But py3 *does not*:

$ python3 -c 'import pprint, urllib.request; resp = 
urllib.request.urlopen("http://localhost:8000;); 
pprint.pprint((dict(resp.info().items()), resp.read()))'
({'Date': 'Wed, 29 May 2019 23:04:09 GMT',
  'Server': 'WSGIServer/0.2 CPython/3.7.3',
  'Some-Canonical': 'headers',
  'Utf-8-Values': 'â\x9c\x94',
  'sOme-CRAzY': 'hEaDERs'},
 b'Hello, world!\n')

Instead, it is missing the first header that has a non-ASCII name as well as 
all subsequent headers (even if they are all-ASCII). Interestingly, the 
response body is intact.

This is eventually traced back to email.feedparser's expectation that all 
headers conform to rfc822 and its assumption that anything that *doesn't* 
conform must be part of the body: 
https://github.com/python/cpython/blob/v3.7.3/Lib/email/feedparser.py#L228-L236

However, http.client has *already* determined the boundary between headers and 
body in parse_headers, and sent everything that it thinks is headers to the 
parser: 
https://github.com/python/cpython/blob/v3.7.3/Lib/http/client.py#L193-L214

--
messages: 343942
nosy: tburke
priority: normal
severity: normal
status: open
title: http.client aborts header parsing upon encountering non-ASCII header 
names
versions: 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



[issue37092] LoggerAdapter doesn't have fatal() like Logger

2019-05-29 Thread Dave Johansen


New submission from Dave Johansen :

Using LoggerAdapter is a convenient way to add extra info to all logs, but it 
doesn't have the fatal() method like Logger, so it isn't a drop in replacement 
like it should be.

--
components: Library (Lib)
messages: 343941
nosy: Dave Johansen
priority: normal
severity: normal
status: open
title: LoggerAdapter doesn't have fatal() like Logger
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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov


Yury Selivanov  added the comment:

Eric, regarding signals no longer using pending calls -- interesting, I'll take 
a look. Thanks for pointing this out.

Sent from my iPhone

--

___
Python tracker 

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



[issue37091] subprocess - uncaught PermissionError in send_signal can cause hang

2019-05-29 Thread hw


New submission from hw <13hu...@gmail.com>:

Python 3.7.3
Ubuntu 18.10 Cosmic

https://github.com/python/cpython/pull/13669

Encountered a condition where uncaught PermissionError caused a hang
running a subprocess command with sudo -u

Traceback (most recent call last):
  File "/usr/lib/python3.7/subprocess.py", line 474, in run
stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.7/subprocess.py", line 939, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.7/subprocess.py", line 1707, in _communicate
self.wait(timeout=self._remaining_time(endtime))
  File "/usr/lib/python3.7/subprocess.py", line 990, in wait
return self._wait(timeout=timeout)
  File "/usr/lib/python3.7/subprocess.py", line 1616, in _wait
raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['sudo', '-u', 'chrome', 
'/snap/bin/chromium', '--headless', '--disable-gpu', '--hide-scrollbars', 
'--ignore-certificate-errors', '--enable-sandbox', '--incognito', 
'--mute-audio', '--disable-databases', 
'--enable-strict-powerful-feature-restrictions', '--no-pings', 
'--no-referrers', '--timeout=3', '--window-size=1280,1000', 
'--screenshot=[REDACTED]_screenshot.png', 'https://[REDACTED]']' timed out 
after 59.9998986274004 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/subprocess.py", line 476, in run
process.kill()
  File "/usr/lib/python3.7/subprocess.py", line 1756, in kill
self.send_signal(signal.SIGKILL)
  File "/usr/lib/python3.7/subprocess.py", line 1746, in send_signal
os.kill(self.pid, sig)
PermissionError: [Errno 1] Operation not permitted

--
components: Library (Lib)
messages: 343939
nosy: Hw
priority: normal
pull_requests: 13558
severity: normal
status: open
title: subprocess - uncaught PermissionError in send_signal can cause hang
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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-05-29 Thread Anthony Sottile


Anthony Sottile  added the comment:

If I'm reading this correctly this is the relevant line for python3:

https://github.com/python/cpython/blob/29cb21ddb92413931e473eb799a02e2d8cdf4a45/PC/getpathp.c#L1068

it was added in 4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9

python2 seems to do the same as well and I'm having a harder time tracing that 
code -- my guess is it comes from here: 
https://github.com/python/cpython/blob/103b8d9f9179089019ddb363ec0098b63816001b/PC/getpathp.c#L550

(so in that case, only present because `python.exe` is at the root of the 
prefix) -- but it's still showing up in the `virtualenv` case due to site 
manipulation (coming from `virtualenv`'s `site.py` I believe? trying to mimic 
that behaviour)

Hmmm not much information there but I have to get back to what I was doing 
before -- I'll see if I can't find more info on this later!

--

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread STINNER Victor


STINNER Victor  added the comment:

I dislike pending calls. It is a weird beast which complicates ceval.c. I
would prefer to remove it. It is no longer needed to handle signals!

At least, it sounds like a bad idea to me to expose it in Python in a
public API.

If you really need it, hide it better ;-)

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Petr Viktorin


Petr Viktorin  added the comment:

All stable buildbots are back to green.

--

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Eric Snow


Eric Snow  added the comment:

If this is about signals, it isn't enough just to run on the main thread.  It 
also has to be the main interpreter.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Great! Thank you very much for the quick fix for the problem.

For AMD64 Ubuntu Shared 3.x, the last build was successful:

https://buildbot.python.org/all/#/builders/141/builds/1870/steps/5/logs/stdio

--

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Eric Snow


Eric Snow  added the comment:

> Well, it's absolutely the same mechanism that signal handlers use.

Antoine changed signals a while back so they no longer use the pending calls 
machinery.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Petr Viktorin


Petr Viktorin  added the comment:

No, just https://github.com/python/cpython/pull/13665 is addressing the  
failures. And it seems that it's successful -- only the slowest of the failed 
ones (AMD64 Ubuntu Shared 3.x) is still red.

bpo-37090 extends the test so it can catch more bugs in the future (but there's 
no rush to get it in...)

--

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov


Yury Selivanov  added the comment:

> As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be 
> opening a can of worms.  Injecting code into the eval loop at some arbitrary 
> ("soon") future time requires care and the code isn't well exercised 
> historically (much like subinterpreters).

Well, it's absolutely the same mechanism that signal handlers use.  It looks 
like this can of works has been open for a pretty long time now :)

The whole point of adding this API is to make it possible for asyncio to work 
with the "signals" module not from the main thread.  I expect 99.9% of other 
use cases to be either about signals or other super low-level stuff that needs 
the main thread (off the top of my head I can't name any :))

> It also adds burden on other Python implementations.

Python signal processing *requires* users callbacks to be executed in the main 
thread (whereas Unix can deliver the signal to any thread, potentially). 
Therefore I think that any alternative Python implementation should have a 
mechanism to schedule code execution in the main thread.

> My point is, let's think this through before adding sys.addpendingcall(). :)  
> Is there another way this could be done that doesn't open a can of worms?

Maybe. One of such ways is to enable signal.signal calls from non-main threads. 
 But I'm not sure this is possible for all platforms we support. Maybe Victor 
or Andrew can shed more light on this.

> Also, at the very least it should probably be a "private" function (i.e 
> sys._addpendingcall).

Maybe.  The problem is that asyncio must work the same on PyPy, which means 
that the sys API it uses should be available on PyPy too.  In which case, they 
will kind of have to add it, which means that there's no point in making it 
semi-private.  OTOH, I wouldn't mind sys._addpendingcall(), as long as PyPy 
implements it.

--

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 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



[issue36974] Implement PEP 590

2019-05-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

@Petr is https://bugs.python.org/issue37090 and 
https://github.com/python/cpython/pull/13668 also addressing the buildbot 
failures?

--

___
Python tracker 

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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-05-29 Thread Steve Dower


Steve Dower  added the comment:

Honestly, no idea. Because it always has been :)

If you can find when it was added, we may be able to answer that.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

BUILDBOT FAILURE REPORT
===

Builder name: AMD64 Ubuntu Shared 3.x
Builder url: https://buildbot.python.org/all/#/builders/141/
Build url: https://buildbot.python.org/all/#/builders/141/builds/1866

Failed tests


- test_pycfunction (test.test_gdb.PyBtTests)


Test leaking resources
--



Build summary
-

== Tests result: FAILURE then FAILURE ==

405 tests OK.

10 slowest tests:
- test_multiprocessing_spawn: 6 min 27 sec
- test_tools: 5 min 34 sec
- test_concurrent_futures: 5 min 13 sec
- test_tokenize: 4 min 43 sec
- test_lib2to3: 3 min 58 sec
- test_gdb: 3 min 16 sec
- test_multiprocessing_forkserver: 2 min 25 sec
- test_asyncio: 2 min 5 sec
- test_multiprocessing_fork: 1 min 40 sec
- test_capi: 1 min 36 sec

1 test failed:
test_gdb

17 tests skipped:
test_devpoll test_idle test_ioctl test_kqueue test_msilib
test_ossaudiodev test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_gdb

Total duration: 42 min 45 sec


Tracebacks
--

```traceback
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", 
line 890, in test_pycfunction
self.assertIn('#2 , args=(1,)) at 
./Modules/timemodule.c:446\n446\t{\n#6 Frame 0x77f11a50, for file , 
line 3, in foo ()\n#12 Frame 0x557be620, for file , line 5, in bar 
()\n#18 Frame 0x557be3f0, for file , line 6, in  ()\n'


Traceback (most recent call last):
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", 
line 890, in test_pycfunction
self.assertIn('#2 , args=(1,)) at 
./Modules/timemodule.c:446\n446\t{\n#6 Frame 0x77f11a50, for file , 
line 3, in foo ()\n#12 Frame 0x557be590, for file , line 5, in bar 
()\n#18 Frame 0x557be360, for file , line 6, in  ()\n'

```

Current builder status
--

The builder is failing currently

Commits
---

- 0c2f9305640f7655ba0cd5f478948b2763b376b3

- aacc77fbd77640a8f03638216fa09372cc21673d


Other builds with similar failures
--

-  https://buildbot.python.org/all/#/builders/21/builds/3076
-  https://buildbot.python.org/all/#/builders/21/builds/3077
-  https://buildbot.python.org/all/#/builders/21/builds/3078
-  https://buildbot.python.org/all/#/builders/21/builds/3079
-  https://buildbot.python.org/all/#/builders/21/builds/3080
-  https://buildbot.python.org/all/#/builders/13/builds/3087
-  https://buildbot.python.org/all/#/builders/13/builds/3088
-  https://buildbot.python.org/all/#/builders/13/builds/3089
-  https://buildbot.python.org/all/#/builders/13/builds/3090
-  https://buildbot.python.org/all/#/builders/85/builds/2883
-  https://buildbot.python.org/all/#/builders/85/builds/2884
-  https://buildbot.python.org/all/#/builders/85/builds/2885
-  https://buildbot.python.org/all/#/builders/85/builds/2886
-  https://buildbot.python.org/all/#/builders/141/builds/1869
-  https://buildbot.python.org/all/#/builders/176/builds/590
-  https://buildbot.python.org/all/#/builders/176/builds/591
-  https://buildbot.python.org/all/#/builders/176/builds/592
-  https://buildbot.python.org/all/#/builders/176/builds/593
-  https://buildbot.python.org/all/#/builders/176/builds/594
-  https://buildbot.python.org/all/#/builders/16/builds/3055
-  https://buildbot.python.org/all/#/builders/16/builds/3056
-  https://buildbot.python.org/all/#/builders/16/builds/3057
-  https://buildbot.python.org/all/#/builders/16/builds/3058
-  https://buildbot.python.org/all/#/builders/16/builds/3059

Common commits for all builds:

- aacc77fbd77640a8f03638216fa09372cc21673d

--
nosy: +pablogsal

___
Python tracker 

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



[issue37090] test_gdb's test_pycfunction should test all calling conventions

2019-05-29 Thread Petr Viktorin


Change by Petr Viktorin :


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

___
Python tracker 

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



[issue37090] test_gdb's test_pycfunction should test all calling conventions

2019-05-29 Thread Petr Viktorin


New submission from Petr Viktorin :

test_gdb.StackNavigationTests.test_pycfunction checks that the GDB integration 
can pick up calls to C-API functions. Currently it includes the comment:

> Tested function must not be defined with METH_NOARGS or METH_O,
> otherwise call_function() doesn't call PyCFunction_Call()

This is (now?) false; furthermore it looks like all builtin_function_or_method 
are discoverable.

As the code paths for various METH_* conventions are diverging due to 
optimizations, we should check they continue to be covered.

--
assignee: petr.viktorin
messages: 343927
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: test_gdb's test_pycfunction should test all calling conventions
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



[issue14656] Add a macro for unreachable code

2019-05-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-05-29 Thread Anthony Sottile


Anthony Sottile  added the comment:

sys.prefix isn't on sys.path on other platforms -- why is it on windows?

--

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Steve Dower


Steve Dower  added the comment:


New changeset 8f96c9f8ed2a4795e34b333411451e24f28f74d2 by Steve Dower (Zackery 
Spytz) in branch 'master':
bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and 
if_nameindex() on Windows (GH-13522)
https://github.com/python/cpython/commit/8f96c9f8ed2a4795e34b333411451e24f28f74d2


--

___
Python tracker 

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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-05-29 Thread Steve Dower


Steve Dower  added the comment:

I don't think we can change the assumption that sys.prefix is in sys.path at 
this point, though technically it's not required (certainly not in 3.7).

Maybe we could create a new marker file that means "never treat this directory 
as a namespace package"?

--
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue37089] `import Lib.os` works on windows (but shouldn't)

2019-05-29 Thread Anthony Sottile


New submission from Anthony Sottile :

Additionally, virtualenvs have the root of their directory on `sys.path` -- 
this is unlike posix behaviour

For example:

$ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD6
4)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Lib.os
>>> Lib.os.__file__
'C:\\Python37\\Lib\\os.py'
>>> Lib.os.listdir('C:\\')
['$Recycle.Bin', 'BGinfo', 'Documents and Settings', 'pagefile.sys', 'PerfLogs',
 'Program Files', 'Program Files (x86)', 'ProgramData', 'Python27', 'Python37',
'Recovery', 'swapfile.sys', 'System Volume Information', 'Users', 'Windows']

--
components: Library (Lib), Windows
messages: 343923
nosy: Anthony Sottile, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: `import Lib.os` works on windows (but shouldn't)
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



[issue36974] Implement PEP 590

2019-05-29 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset fecb75c1bb46c818e6579ba422cfa5d0d9d104d1 by Petr Viktorin in 
branch 'master':
bpo-36974: Fix GDB integration (GH-13665)
https://github.com/python/cpython/commit/fecb75c1bb46c818e6579ba422cfa5d0d9d104d1


--

___
Python tracker 

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



[issue26836] Add memfd_create to os module

2019-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset e70bfa95e6f0c98b9906f306f24d71f8b7689f87 by Miss Islington (bot) 
(Zackery Spytz) in branch 'master':
bpo-26836: Add ifdefs for all MFD_HUGE* constants (GH-13666)
https://github.com/python/cpython/commit/e70bfa95e6f0c98b9906f306f24d71f8b7689f87


--
nosy: +miss-islington

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Eric Snow


Eric Snow  added the comment:

Note that I'm working on making pending calls per-interpreter (see issue #33608 
and https://github.com/python/cpython/pull/12360 (since reverted)).

As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be opening 
a can of worms.  Injecting code into the eval loop at some arbitrary ("soon") 
future time requires care and the code isn't well exercised historically (much 
like subinterpreters).  By making it easier to use the pending calls API (e.g. 
from Python code) we may be introducing an attractive nuisance.  It also adds 
burden on other Python implementations.

My point is, let's think this through before adding sys.addpendingcall(). :)  
Is there another way this could be done that doesn't open a can of worms?

Also, at the very least it should probably be a "private" function (i.e 
sys._addpendingcall).

--
nosy: +eric.snow

___
Python tracker 

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



[issue26836] Add memfd_create to os module

2019-05-29 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue32388] Remove cross-version binary compatibility

2019-05-29 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 by Antoine Pitrou in 
branch 'master':
bpo-32388: Remove cross-version binary compatibility requirement in tp_flags 
(GH-4944)
https://github.com/python/cpython/commit/ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8


--

___
Python tracker 

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



[issue32388] Remove cross-version binary compatibility

2019-05-29 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

PR is merged now!

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



[issue26836] Add memfd_create to os module

2019-05-29 Thread Christian Heimes


Christian Heimes  added the comment:

https://buildbot.python.org/all/#builders/99/builds/2738 is failing because 
some HUGE TLB constants are not defined on Gentoo.

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue26836] Add memfd_create to os module

2019-05-29 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 43fdbd2729cb7cdbb5afb5d16352f6604859e564 by Christian Heimes 
(Zackery Spytz) in branch 'master':
bpo-26836: Add os.memfd_create() (#13567)
https://github.com/python/cpython/commit/43fdbd2729cb7cdbb5afb5d16352f6604859e564


--

___
Python tracker 

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2019-05-29 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Petr claims to have a fix, https://github.com/python/cpython/pull/13665

--

___
Python tracker 

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2019-05-29 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Can somebody here explain the meaning of the comment in test_gdb.py

# Tested function must not be defined with METH_NOARGS or METH_O,
# otherwise call_function() doesn't call PyCFunction_Call()

This test is breaking with PEP 590, see 
https://github.com/python/cpython/pull/13185

--
nosy: +jdemeyer

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Zackery Spytz


Zackery Spytz  added the comment:

Thanks, Steve. I've addressed your comments on the PR.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +13555
pull_request: https://github.com/python/cpython/pull/13665

___
Python tracker 

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread Anthony Sottile


Change by Anthony Sottile :


--
pull_requests: +13554
pull_request: https://github.com/python/cpython/pull/13663

___
Python tracker 

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread Anthony Sottile


Change by Anthony Sottile :


--
pull_requests: +13553
pull_request: https://github.com/python/cpython/pull/13662

___
Python tracker 

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



[issue37015] Fix asyncio mock warnings

2019-05-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Michael Felt


Michael Felt  added the comment:

On 29/05/2019 16:36, Ned Deily wrote:
> Ned Deily  added the comment:
>
> FWIW, my opinion on making this kind of wholesale change has not changed: see 
> the discussion in PR 7800. 

I had actually read through that before I started on this. Your closing
comments are here:
https://github.com/python/cpython/pull/7800#issuecomment-400182213

As someone who does not work 100% of the time with python - it is
extremely confusing and frustrating because there is no clear way of
doing something. From afar it appears as if platform.system() and
sys.platform evolved at different moments. I saw them as equivalent, and
only learned much later than one is build and the other is run-time.
And, there are very specific strings - that no longer match the current
situation.

Why, I ask myself, is it sometimes "darwin" (or is it "Darwin" - oh yes,
different test). And, I also ask myself - why did sys.platform "win"?
People did not like a function call (e.g., more resource intensive?) -
or was sys.platform "first" and platform.system() just never caught on?

I (think I) understand your concerns. While I would consider going
through the code to bring them in-line - that may be, for many reasons -
going too far.

I had hoped to: a) improve consistency and set a good example; as well
as b) be more than 'two constants' and in so-doing, provide a basis for
a grounded discussion.

As we stand now I still have a concern/question - is there any
willingness to work towards a solution - that can be (a basis of) a
clear definition of what "should" be. In a word - I consider the current
situation 'confusing'.

What is presented here does not have to be the solution. I hope everyone
will remember that this concern continues to popup. Saying no over and
over again does not solve anything - will not make it go away. Saying
no, repeatedly, may silence people.

All I can offer is my willingness to help.

Thank you for your time spent reading!

>  I think the changes made there were not an improvement for all the reasons 
> stated, primarily because this now requires people reading the code base to 
> learn *two* different ways of doing the same thing since these changes only 
> affect the tests and not the platform-conditional code in the standard 
> library modules themselves (which are not and should not be changed). Also, 
> this means that backports of fixes from 3.8 will be complicated.  Note there 
> ware already some "translation" errors detected and fixed in the PR re-spin; 
> how many others remain?
>
> --
> nosy: +ned.deily
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread Anthony Sottile


Anthony Sottile  added the comment:

yep, happy to do that -- I know I'll need to do 3.7, but should I also do 3.6? 
3.5?

--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2019-05-29 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 0c2f9305640f7655ba0cd5f478948b2763b376b3 by Gregory P. Smith in 
branch 'master':
bpo-22385: Support output separators in hex methods. (#13578)
https://github.com/python/cpython/commit/0c2f9305640f7655ba0cd5f478948b2763b376b3


--

___
Python tracker 

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



[issue37086] time.sleep error message misleading

2019-05-29 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

While not exactly the same, issue35707 is also about time.sleep and floats.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Petr Viktorin


New submission from Petr Viktorin :


New changeset aacc77fbd77640a8f03638216fa09372cc21673d by Petr Viktorin (Jeroen 
Demeyer) in branch 'master':
bpo-36974: implement PEP 590 (GH-13185)
https://github.com/python/cpython/commit/aacc77fbd77640a8f03638216fa09372cc21673d


--

___
Python tracker 

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



[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 4e1e887203ef069bf293ecabd945f7567d6a4879 by Miss Islington (bot) 
in branch '3.7':
bpo-36794: Document that Lock.acquire is fair. (GH-13082)
https://github.com/python/cpython/commit/4e1e887203ef069bf293ecabd945f7567d6a4879


--

___
Python tracker 

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

It looks like the backports need to be done manually. Hopefully you'll feel up 
to that, otherwise we can close without doing the backports.

--

___
Python tracker 

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



[issue36983] typing.__all__ has drifted from actual contents

2019-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset d30da5dd9a8a965cf24a22bbaff8a5b1341c2944 by Miss Islington (bot) 
(Anthony Sottile) in branch 'master':
bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456)
https://github.com/python/cpython/commit/d30da5dd9a8a965cf24a22bbaff8a5b1341c2944


--
nosy: +miss-islington

___
Python tracker 

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



[issue37086] time.sleep error message misleading

2019-05-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think it's reasonable to change the TypeError to say integer or float. That's 
what _PyTime_FromObject is looking for.

--
nosy: +eric.smith

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Wow!
Thanks for the report.
Internally it is pretty close to freebsd problem.
The test is unstable, not asyncio code itself.
The test uses future objects to synchronize client and server socket processing 
but looks like there are race conditions still.

Please let me work on it.
If the problem is very annoying I can temporarily disable these problematic 
tests while working on their improvements

--

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-29 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

test_stream_shutdown_hung_task_prevents_cancellation was added as part of this 
issue. Seems to be a random error : 
https://ci.appveyor.com/project/python/cpython/builds/24901585

==
ERROR: test_stream_shutdown_hung_task_prevents_cancellation 
(test.test_asyncio.test_streams.StreamTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\asyncio\windows_events.py", line 453, in 
finish_recv
return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1605, 
in test_stream_shutdown_hung_task_prevents_cancellation
self.loop.run_until_complete(test())
  File "C:\projects\cpython\lib\asyncio\base_events.py", line 608, in 
run_until_complete
return future.result()
  File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1601, 
in test
await task
  File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1586, 
in client
self.assertEqual(b'', await stream.readline())
  File "C:\projects\cpython\lib\asyncio\streams.py", line 1545, in readline
line = await self.readuntil(sep)
  File "C:\projects\cpython\lib\asyncio\streams.py", line 1638, in readuntil
await self._wait_for_data('readuntil')
  File "C:\projects\cpython\lib\asyncio\streams.py", line 1521, in 
_wait_for_data
await self._waiter
  File "C:\projects\cpython\lib\asyncio\proactor_events.py", line 279, in 
_loop_reading
data = fut.result()
  File "C:\projects\cpython\lib\asyncio\windows_events.py", line 808, in _poll
value = callback(transferred, key, ov)
  File "C:\projects\cpython\lib\asyncio\windows_events.py", line 457, in 
finish_recv
raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer 
available
--

--
nosy: +xtreak

___
Python tracker 

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



[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13551
pull_request: https://github.com/python/cpython/pull/13659

___
Python tracker 

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



[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue22454] Adding the opposite function of shlex.split()

2019-05-29 Thread Berker Peksag


Change by Berker Peksag :


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



[issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6

2019-05-29 Thread miss-islington

miss-islington  added the comment:


New changeset 34f4f5efea730504216ee19f237734e0bb0104ee by Miss Islington (bot) 
(Hrvoje Nikšić) in branch 'master':
bpo-36794: Document that Lock.acquire is fair. (GH-13082)
https://github.com/python/cpython/commit/34f4f5efea730504216ee19f237734e0bb0104ee


--
nosy: +miss-islington

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Steve Dower


Steve Dower  added the comment:

Great, thanks Zackery! (And thanks for the ping - I don't notice GitHub 
notifications.)

Had a few comments about error handling, but it looks great.

--

___
Python tracker 

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



[issue33071] Document that PyPI no longer requires 'register'

2019-05-29 Thread miss-islington


miss-islington  added the comment:


New changeset 103b8d9f9179089019ddb363ec0098b63816001b by Miss Islington (bot) 
(Hai Shi) in branch '2.7':
[2.7] bpo-33071: remove outdated PyPI docs (GH-13087) (GH-13584)
https://github.com/python/cpython/commit/103b8d9f9179089019ddb363ec0098b63816001b


--

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-05-29 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

On May 28, 2019, at 17:38, Ned Deily  wrote:
> 
> Ned Deily  added the comment:
> 
>> To be clear, what is unsafe on macOS (as of 10.13, but even more so on 
>> 10.14) is calling into the Objective-C runtime between fork and exec.
> 
> No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS 
> tries much harder at runtime to detect such cases and more predictably cause 
> an error rather than letter than let the process run on and possibly fail 
> nondeterministically.

Right, thanks for the additional nuance.  I think what changed is that in 
10.13, Apple added a warning output when this condition occurred, and in 10.14 
they actually abort the subprocess.

--

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Eryk Sun


Change by Eryk Sun :


--
nosy:  -eryksun

___
Python tracker 

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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov


New submission from Yury Selivanov :

When asyncio event loop is created in a non-main thread, it needs to initialize 
a so called ChildWatcher for it (a helper object to intercept subprocesses 
exits).  Doing that requires to run code in the main thread.

I propose to add a 'sys.addpendingcall' function that will simply expose the 
already existing Py_AddPendingCall to the pure Python land.

--
components: Interpreter Core, asyncio
messages: 343897
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: Add a way to schedule a function to be called from the main thread
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



[issue37088] Add a way to schedule a function to be called from the main thread

2019-05-29 Thread Yury Selivanov


Change by Yury Selivanov :


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

___
Python tracker 

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



[issue37087] Adding native id support for openbsd

2019-05-29 Thread David Carlier


New submission from David Carlier :

Following up on bpo-36084

--
messages: 343896
nosy: David Carlier
priority: normal
pull_requests: 13549
severity: normal
status: open
title: Adding native id support for openbsd
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



[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-29 Thread David Carlier


Change by David Carlier :


--
pull_requests: +13548
pull_request: https://github.com/python/cpython/pull/13654

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-05-29 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On May 28, 2019, at 17:21, STINNER Victor  wrote:
> 
> 
> STINNER Victor  added the comment:
> 
>> To be clear, what is unsafe on macOS (as of 10.13, but even more so on 
>> 10.14) is calling into the Objective-C runtime between fork and exec.  The 
>> problem for Python is that it’s way too easy to do that implicitly, thus 
>> causing the macOS to abort the subprocess in surprising ways.
> 
> Do only a few Python module use the Objective-C runtime? Or is it basically 
> "everything"?
> 
> If it's just a few, would it be possible to emit a warning or even an 
> exception if called in a child process after fork?

I think it’s hard to know, but I found it through a path that lead from 
requests to _scproxy.c.  Here’s everything I know about the subject:

https://wefearchange.org/2018/11/forkmacos.rst.html

So yes, it’s theoretically possible to do *some* between fork and exec and not 
crash, and it’s of course perfectly safe to call exec pretty much right after 
fork.  It’s just hard to know for sure, and there are surprising ways to get 
into the Objective-C runtime.

I think we won’t be able to work around all of Apple’s choices here.  
Documentation is the best way to handle it in <=3.7, and changing the default 
makes sense to me for 3.8.

--

___
Python tracker 

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



[issue37086] time.sleep error message misleading

2019-05-29 Thread Michele Angrisano


Michele Angrisano  added the comment:

The doc (3.7) says that the argument "may be a floating point number to 
indicate a more precise sleep time."
I think that TypeError message is right because you can choose how much 
precision you need but it's optional.
What do you think about that?

--
nosy: +mangrisano

___
Python tracker 

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



[issue14656] Add a macro for unreachable code

2019-05-29 Thread Zackery Spytz


Zackery Spytz  added the comment:

The Py_UNREACHABLE() macro was implemented in bpo-31338, so this issue can be 
closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue37007] Implement socket.if_{nametoindex, indextoname} for Windows

2019-05-29 Thread Zackery Spytz


Zackery Spytz  added the comment:

Well, it turns out that implementing if_nameindex() on Windows using 
GetIfTable2Ex() was also quite simple. I've updated the PR.

--

___
Python tracker 

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



[issue36842] Implement PEP 578

2019-05-29 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



[issue36842] Implement PEP 578

2019-05-29 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9ddc416e9f6635376312c3615193f19480ac772a by Steve Dower in branch 
'master':
bpo-36842: Fix reference leak in tests by running out-of-proc (GH-13556)
https://github.com/python/cpython/commit/9ddc416e9f6635376312c3615193f19480ac772a


--

___
Python tracker 

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



[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate 
explicit loop parameter in all public asyncio APIs

___
Python tracker 

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



[issue31829] Portability issues with pickle

2019-05-29 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Bumping this discussion in case the should be merged for 3.8b1.  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-05-29 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi
> There is no need to jumbo PR, you can split the work into PR-per-module if it 
> is more comfortable to you.
Yes, I think that is better split I will try it.
> I'm ok with reviewing any approach.
Thanks!

--
title: Deprecate explicit loop parameter in all public asyncio APIs -> 
asyncio.gather: no docs for deprecated loop parameter

___
Python tracker 

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



[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate 
explicit loop parameter in all public asyncio APIs

___
Python tracker 

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



[issue36373] Deprecate explicit loop parameter in all public asyncio APIs

2019-05-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-05-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thank you.

The change is pretty straightforward.

There is no need to jumbo PR, you can split the work into PR-per-module if it 
is more comfortable to you.

I'm ok with reviewing any approach.

--

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-05-29 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

hello, I will work on it, if there are no objection. :-)

--

___
Python tracker 

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



[issue31749] Request: Human readable byte amounts in the standard library

2019-05-29 Thread desbma


Change by desbma :


--
nosy: +desbma

___
Python tracker 

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



[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-05-29 Thread Ned Deily


Ned Deily  added the comment:

FWIW, my opinion on making this kind of wholesale change has not changed: see 
the discussion in PR 7800.  I think the changes made there were not an 
improvement for all the reasons stated, primarily because this now requires 
people reading the code base to learn *two* different ways of doing the same 
thing since these changes only affect the tests and not the 
platform-conditional code in the standard library modules themselves (which are 
not and should not be changed). Also, this means that backports of fixes from 
3.8 will be complicated.  Note there ware already some "translation" errors 
detected and fixed in the PR re-spin; how many others remain?

--
nosy: +ned.deily

___
Python tracker 

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



[issue33918] Hooking into pause/resume of iterators/coroutines

2019-05-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue33918] Hooking into pause/resume of iterators/coroutines

2019-05-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

decimal was changed from threading.local to contextvar usage.
The module is "safe" not only for asyncio but for threading, trio etc.

unittest.mock doesn't use explicit context all for patching.
It changes global interpreter-wide objects instead.

So, mock.patch fails not only if two async tasks are executed in parallel but 
two threads also.

I doubt if thread-local (or contextvar) can be applied to mock because it 
changes the current behavior -- but this is a different story.

*Any* library that needs to modify a global state, e.g. your MyLogger.enabled 
can use contextvars for handling it.

Say again, contextvars is not for asyncio-only but a generic instrument for 
handling context-aware variables.

I'm going to close the issue.

--

___
Python tracker 

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



[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-29 Thread Michael Felt

Michael Felt  added the comment:

On 25/05/2019 00:19, Erwan Le Pape wrote:
> Erwan Le Pape  added the comment:
>
> Thanks for testing that. It's good that you used an actual address because 
> that eliminates the possibility that AIX doesn't handle addresses it doesn't 
> really know about.
>
> On the other hand, even when properly specified to a real scoped IPv6 
> address, `getaddrinfo` doesn't seem to get the necessary scope ID from the 
> underlying C call which socket.getaddrinfo > _socket.getaddrinfo is pretty 
> much mapped to.
>
> I'm looking at cpython/master for the socketmodule implementation:
> https://github.com/python/cpython/blob/6dbbe748e101a173b4cff8aada41e9313e287e0f/Modules/socketmodule.c#L6400
>  is `getaddrinfo`
> https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1294 is 
> `makesockaddr` which actually creates the 4-tuple returned as the last 
> element of the `getaddrinfo` tuples.
> The fourth element (ie. the scope ID) is clearly `a->sin6_scope_id` which 
> should contain the scope ID.
>
> At this stage, I don't know if this is a bug from the socketmodule which I 
> doubt or if the AIX `getaddrinfo` simply just doesn't handle scoped IP 
> addresses properly.

I also doubt a bug in the socketmodule - my assumption is that AIX may
be wrong - although I prefer different, i.e., has idiosyncrasies.

++ If we "accept" or "conclude" that AIX's getaddrinfo() routine is not
working as needed for this test - would "you" (Python-core) accept a
@SkipIf for this test - as is already done re: IPv6 re:

bpo-34490 Fix test_asyncio for AIX - do not call 
transport.get_extra_info('sockname')

++ Further, I have a start on "send/receive" stubs in C and am trying
out different ideas - learn as I go. "netstat" clearly shows, as does
ifconfig -a

root@x066:[/]ifconfig -a
en0:
flags=1e080863,c0
    inet 192.168.129.66 netmask 0xff00 broadcast 192.168.129.255
    inet6 fe80::221:5eff:fea3:c746/64
 tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1:
flags=1e080863,480
    inet6 fe80::f8d1:8cff:fe32:8305%2/64
lo0:
flags=e08084b,c0
    inet 127.0.0.1 netmask 0xff00 broadcast 127.255.255.255
    inet6 ::1%1/128
 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

Sadly, I have a lot to learn re: IPv6 - and I expect how "host-based
routing" is concerned*, so movement forward will be slow going.

* from years ago, I recall a discussion where one of the improvements in
IPv6 compared to IPv4 is that the "work" of routing would be shared by
all end-points, rather than focused in router(-hubs) whose performance
basically determine the performance limits of a connection (or connections).

>
> If you're still okay to proxy tests for AIX, I'll try and come up with either 
> a simple C snippet to see what's in the returned structure or ctype the AIX 
> `libc` `getaddrinfo`.
Repeating - always willing.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-29 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
pull_requests: +13547
pull_request: https://github.com/python/cpython/pull/13653

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I would say that if requests a designed from scratch more idiomatic way could be

with requests.Session() as session:
session.get('https://example.com/')

or

session = requests.Session()
session.get('https://example.com/')
session.close()

Like the recommended way to handle files.

--

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-05-29 Thread Sihoon Lee


Change by Sihoon Lee :


--
pull_requests: +13545
pull_request: https://github.com/python/cpython/pull/12524

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-05-29 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +13546
pull_request: https://github.com/python/cpython/pull/11768

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-05-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

A champion is welcome :)

--

___
Python tracker 

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



[issue19184] dis module has incorrect docs for RAISE_VARARGS

2019-05-29 Thread Michele Angrisano


Change by Michele Angrisano :


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

___
Python tracker 

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



[issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10

2019-05-29 Thread Peter Edwards


Change by Peter Edwards :


--
pull_requests: +13543
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13649

___
Python tracker 

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



[issue33164] Blake 2 module update

2019-05-29 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset d8b755167235e0621814eb5ac39163b3db6879bb by Inada Naoki (David 
Carlier) in branch 'master':
bpo-33164: blake2 fix for HP-UX (GH-13633)
https://github.com/python/cpython/commit/d8b755167235e0621814eb5ac39163b3db6879bb


--

___
Python tracker 

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



  1   2   >