[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 9960230f76eb555d6dfbe8a324efed35610c85f9 by Łukasz Langa 
(Dong-hee Na) in branch 'master':
bpo-22367: Update test_fcntl.py for spawn process mode (#17154)
https://github.com/python/cpython/commit/9960230f76eb555d6dfbe8a324efed35610c85f9


--

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16749
pull_request: https://github.com/python/cpython/pull/17253

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16748
pull_request: https://github.com/python/cpython/pull/17252

___
Python tracker 

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



[issue21767] singledispatch docs should explicitly mention support for abstract base classes

2019-11-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 24555ce2f969bd69517011d23aaf8cc481090211 by Łukasz Langa (Batuhan 
Taşkaya) in branch 'master':
bpo-21767: explicitly mention abc support in functools.singledispatch docs 
(#17171)
https://github.com/python/cpython/commit/24555ce2f969bd69517011d23aaf8cc481090211


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue21767] singledispatch docs should explicitly mention support for abstract base classes

2019-11-19 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

https://dev.azure.com/python/cpython/_build/results?buildId=54136&view=results

Looks okay at this time.
It was nerve-racking, I worried about my mistake affect publishing Python 3.9.0 
alpha1.

Thank you everyone who helps me.

--

___
Python tracker 

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



[issue38722] runpy should use io.open_code() instead of open()

2019-11-19 Thread Tal Einat


Tal Einat  added the comment:

Thanks for the clarification Steve! I've backported this to 3.8.

--

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-19 Thread Jukka Väisänen

Jukka Väisänen  added the comment:

I had a quick search through github for calls to create_datagram_endpoint() and 
the reuse_address is either not set or set explicitly to True, probably due to 
the error in the documentation.

Only in one case (of my admittedly small sample) did it seem like the parameter 
was set to True intentionally to get the behavior of binding multiple processes 
to the same port.

Due to the nature of the function, it is also often buried inside packages 
implementing higher level protocols (SIP, STUN, DNS, RTP) which want to create 
a convenience function to create asyncio servers and clients.

The deprecation warning and getting it into 3.6 and later sounds very 
reasonable to me.

--

___
Python tracker 

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



[issue36424] Pickle fails on frozen dataclass that has slots

2019-11-19 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36424] Pickle fails on frozen dataclass that has slots

2019-11-19 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya
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



[issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks

2019-11-19 Thread Batuhan

Batuhan  added the comment:

Is there a consensus about fixing this? By the way, this isn't valid in the 
current tokenizer too. 
1,0-1,2:NAME   'iÌ'
1,2-1,3:ERRORTOKEN '‡'
1,4-1,5:OP '='
1,6-1,7:NUMBER '5'
1,7-1,8:NEWLINE'\n'

--
nosy: +BTaskaya

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Pierre Chatelier  added the comment:

Can't reproduce any more.
It might have been specific to the Visual Studio version I used at that time.

--

___
Python tracker 

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



[issue38845] test_shared_memory_SharedMemoryServer_ignores_sigint and others fail on Guix

2019-11-19 Thread tlecarrour

New submission from tlecarrour :

Dear Python Bugs Team,

Some tests fail when building Python 3.8 on Guix, for instance :

```
FAIL: test_shared_memory_SharedMemoryServer_ignores_sigint 
(test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
--
Traceback (most recent call last):
  File 
"/tmp/guix-build-python-3.8.0.drv-0/Python-3.8.0/Lib/test/_test_multiprocessing.py",
 line 3824, in test_shared_memory_SharedMemoryServer_ignores_sigint
os.kill(os.getpid(), signal.SIGINT)
AssertionError: KeyboardInterrupt not raised
```

This is because, on Guix, there is no TTY available during the build process.
A patch (cf attachment) has been added to the package definition [1], but it 
would make sense to have it integrated in Python.

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38208#14

It adds the following decorator to the failing tests:

```
@unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY 
device")
```

Regards

--
components: Tests
files: python-3.8-fix-tests.patch
keywords: patch
messages: 356959
nosy: tlecarrour
priority: normal
severity: normal
status: open
title: test_shared_memory_SharedMemoryServer_ignores_sigint and others fail on 
Guix
versions: Python 3.8
Added file: https://bugs.python.org/file48720/python-3.8-fix-tests.patch

___
Python tracker 

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



[issue38828] http.cookiejar handle cookie.version to be None

2019-11-19 Thread Alex


Alex  added the comment:

Hi, it looks like this needs a fix - I'll write a patch to fix up the handling 
and add some more testing to cover this scenario.

--
nosy: +alclarks

___
Python tracker 

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



[issue38680] PyGILState_Release does not release gil correctly, resulting in deadlock

2019-11-19 Thread Damien LEFEVRE


Damien LEFEVRE  added the comment:

Back to testing this.

I have the same issue on Linux, i.e: the deadlock on PyGILState_Ensure.

I cannot test 3.8 because many of the modules are not yet available for this 
version.

I'll try making a small test application to reproduce the issue.

--

___
Python tracker 

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



[issue38846] async: Return context manager from open(_unix)_connection

2019-11-19 Thread Sebastian Rittau


New submission from Sebastian Rittau :

As a convenience it would be useful if async.open_connection() and 
open_unix_connection() would return a context manager that closes the writer on 
exit:

with await open_unix_connection(...) as (reader, writer):
...

This could be achieved by using a custom sub-class of tuple:

class _ConnectionContext(tuple):
def __enter__(self):
return self
def __exit__(self, *args):
self[1].close()

I can submit a PR if wanted.

--
components: asyncio
messages: 356962
nosy: asvetlov, srittau, yselivanov
priority: normal
severity: normal
status: open
title: async: Return context manager from open(_unix)_connection
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



[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Fabio Zadrozny


Fabio Zadrozny  added the comment:

@Mark @Brett

Well, PEP 523 still works (it's just more inconvenient to use now).

Still, if PEP 523 will still be supported I think that having the setter/getter 
makes sense.

If it is to be deprecated as @Mark is suggesting it doesn't really make sense 
to add it (but then, it should really be deprecated and ideally there'd be some 
replacement for the current debugger use... not sure about other use cases such 
as a jit, which was the initial target of PEP 523 -- @Mark, do you want to go 
that route/create a PEP to deprecate it so that this discussion takes place in 
a proper place?).

p.s.: as a note, bytecode modification on the actual object is not a usable 
approach for the debugger because users could break that in real-world use 
cases (i.e.: what happens if the user creates a **new** code and sets it to the 
code which had the breakpoint? What about breakpoint changes? Right now the 
debugger evaluates all assumptions just before the frame is executed, so, it's 
easier to get things right -- the case you posted currently does what's 
expected on pydevd). Still, a callback before the execution so that it could 
change the frame code before it's executed without the remainder of PEP 523 
would be enough (and maybe it could be adopted in other Python implementations 
too) -- actually, for the debugger it'd be awesome if the frame code could be 
changed from inside a trace call and then that stack would restart execution 
(close to what happens with setting the frame line to be executed), but I guess 
this would be a completely different request ;)

p.s.: please don't reply to my previous p.s. here (let's move the discussion to 
another place -- either by @Mark creating a PEP for discussion or acknowledging 
the issue is ok given the current status quo).

--

___
Python tracker 

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



[issue38846] async: Return context manager from open(_unix)_connection

2019-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

>From my understanding, Yuri doesn't want to improve the existing streaming API 
>but invent something blessing new.

The improvement like you proposed has a very low chance to be accepted.

--

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Batuhan


New submission from Batuhan :

I was going through old issues and I found @inada.naoki's comment on issue 36551

> How about converting `[x for x in it]` to `[*it]` in AST?

Is this feature still wanted? I can try to work on an implementation for this 
if there is a need. Also should this cover set (`{x for x in it}`) 
comprehensions?

--
messages: 356965
nosy: BTaskaya, inada.naoki
priority: normal
severity: normal
status: open
title: AST Optimization for Single Target List Comprehension

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Batuhan


Change by Batuhan :


--
nosy: +vstinner

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Batuhan


Change by Batuhan :


--
components: +Interpreter Core
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



[issue27724] PEP3119 inconsintent with actual CPython impl

2019-11-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

Presumably when the implementation was done the IS_ABSTRACT name sounded more 
logical than just ABSTRACT. Since the PEP doesn't *specify* the name of this 
flag[1] I see no reason to change anything. Closing.

_
[1] The PEP mentions this flag exactly once:

(If this were implemented in CPython, an internal flag
``Py_TPFLAGS_ABSTRACT`` could be used to speed up this check [6]_.)

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



[issue38837] struct.pack: Unable to pack more than 256 bytes at a time

2019-11-19 Thread Dave Lotton


Dave Lotton  added the comment:

Mark, you are absolutely correct.  I'm an idiot.  

Focused on wrong thing.  Thank you.

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 8e0de2a4808d7c2f4adedabff89ee64e0338790a by Miss Islington (bot) 
(Vincent Michel) in branch 'master':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/8e0de2a4808d7c2f4adedabff89ee64e0338790a


--
nosy: +miss-islington

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16752
pull_request: https://github.com/python/cpython/pull/17258

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16751
pull_request: https://github.com/python/cpython/pull/17257

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 6c3b471c8c0bfd49c664d8ee7e95da3710fd6069 by Miss Islington (bot) 
in branch '3.8':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/6c3b471c8c0bfd49c664d8ee7e95da3710fd6069


--

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 4ffc569b47bef9f95e443f3c56f7e7e32cb440c0 by Miss Islington (bot) 
in branch '3.7':
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
https://github.com/python/cpython/commit/4ffc569b47bef9f95e443f3c56f7e7e32cb440c0


--

___
Python tracker 

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



[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib)
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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks for reporting back.  If you find that you can provide a reliable 
reproducer later, do please reopen and attach it.

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Pierre Chatelier  added the comment:

Just reproduced and solved it at the same time !
It happened with Debug build, where I linked to pythonxx.lib instead of 
pythonxx_d.lib, because I did not download the debug binaries.
Ultimately : my fault.

--

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Change by Pierre Chatelier :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier


Pierre Chatelier  added the comment:

Aaand finally there is still something : it depends on the call context. Once 
in a C++/CLI class, the link bug occurs again.
Here is attached a minimal project.

--
status: closed -> open
Added file: https://bugs.python.org/file48721/PythonFromC.zip

___
Python tracker 

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



[issue38848] test_compileall fails when the platform lacks a functional sem_open()

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

See also the related issues:
#32126: [asyncio] test failure when the platform lacks a functional  sem_open()
#28668: instanciation of multiprocessing.Queue raises ImportError in 
test_logging

The test failure on android API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_compileall -m 
test_workers
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://andro
id.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2579
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_compileall
test_workers (test.test_compileall.CommandLineTestsNoSourceEpoch) ... FAIL
test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch) ... FAIL

==
FAIL: test_workers (test.test_compileall.CommandLineTestsNoSourceEpoch)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_py_compile.py", line 20, 
in wrapper
return fxn(*args, **kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
707, in test_workersself.assertRunOK(self.directory, '-j', '0')
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
397, in assertRunOK
rc, out, err = script_helper.assert_python_ok(
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 157, in assert_pyt
hon_ok
return _assert_python(True, *args, **env_vars)
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 143, in _assert_py
thon
res.fail(cmd_line)
  File "/data/local/tmp/python/lib/python3.9/test/support/script_helper.py", 
line 70, in fail
raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/data/local/tmp/python/bin/python', '-X', 'faulthandler', '-I', 
'-S', '-m', 'compile
all', '/data/local/tmp/python/tmp/tmpc1hy_667', '-j', '0']

stdout:
---

---

stderr:
---
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/synchronize.py", 
line 28, in 
from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock' from '_multiprocessing' 
(/data/local/tmp/python/lib/python
3.9/lib-dynload/_multiprocessing.cpython-39d.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/runpy.py", line 192, in 
_run_module_as_main
return _run_code(code, main_globals, None,
  File "/data/local/tmp/python/lib/python3.9/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 425, in 

exit_status = int(not main())
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 403, in main
if not compile_dir(dest, maxlevels, args.ddir,
  File "/data/local/tmp/python/lib/python3.9/compileall.py", line 91, in 
compile_dir
with ProcessPoolExecutor(max_workers=workers) as executor:
  File "/data/local/tmp/python/lib/python3.9/concurrent/futures/process.py", 
line 555, in __init__
self._call_queue = _SafeQueue(
  File "/data/local/tmp/python/lib/python3.9/concurrent/futures/process.py", 
line 165, in __init__
super().__init__(max_size, ctx=ctx)
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/queues.py", line 
42, in __init__
self._rlock = ctx.Lock()
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/context.py", line 
67, in Lock
from .synchronize import Lock
  File "/data/local/tmp/python/lib/python3.9/multiprocessing/synchronize.py", 
line 30, in 
raise ImportError("This platform lacks a functioning sem_open" +
ImportError: This platform lacks a functioning sem_open implementation, 
therefore, the required sync
hronization primitives needed will not function, see issue 3770.
---

==
FAIL: test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch)
==  
[38/374]
FAIL: test_workers (test.test_compileall.CommandLineTestsWithSourceEpoch)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_py_compile.py", line 30, 
in wrapper
return fxn(*args, **kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
707, in test_workers
self.assertRunOK(self.directory, '-j', '0')
  File "/data/local/tmp/python/lib/python3.9/test/test_compileall.py", line 
397, in assertRunOK
rc, out, err = script_helper.assert_python_ok(
  

[issue25172] Unix-only crypt should not be present on Windows.

2019-11-19 Thread Xavier de Gaye


Change by Xavier de Gaye :


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

___
Python tracker 

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



[issue38849] test_timestamp_naive fails on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

test_timestamp_naive of test_datetime fails on android API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_datetime -m 
test_timestamp_naive
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2606
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_datetime
test_timestamp_naive (test.datetimetester.TestDateTime_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Pure) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTime_Fast) ... FAIL
test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Fast) ... FAIL
test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Fast) ... FAIL

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTime_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Pure)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTime_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_n
aive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestDateTimeTZ_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_naive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

==
FAIL: test_timestamp_naive (test.datetimetester.TestSubclassDateTime_Fast)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/support/__init__.py", line 
1833, in inner
return func(*args, **kwds)
  File "/data/local/tmp/python/lib/python3.9/test/datetimetester.py", line 
2367, in test_timestamp_naive
self.assertEqual(t.timestamp(), 18000.0)
AssertionError: 14400.0 != 18000.0

--

Ran 6 tests in 0.026s

FAILED (failures=6)
test test_datetime failed
test_datetime failed

== Tests result: FAILURE ==

1 test failed:
test_datetime

Total duration: 331 ms
Tests result: FAILURE

--
components: Tests
messages: 356975
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_timestamp_naive fails on android
type: behavior
versions: Python 3.9

___
Python tracker 

___

[issue38850] test_largefile fails on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

The failure on andoid API 24:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_largefile -m 
test_it
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://andro
id.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_2626
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_largefile
test_it (test.test_largefile.TestCopyfile) ... ERROR
test_it (test.test_largefile.TestSocketSendfile) ... Exception in thread 
Thread-1:
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/threading.py", line 944, in 
_bootstrap_inner
self.run()
  File "/data/local/tmp/python/lib/python3.9/threading.py", line 882, in run
self._target(*self._args, **self._kwargs)
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 193, 
in run
f.write(chunk)
OSError: [Errno 28] No space left on device
ERROR

==
ERROR: test_it (test.test_largefile.TestCopyfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 160, 
in test_it
shutil.copyfile(TESTFN, TESTFN2)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 270, in copyfile
_fastcopy_sendfile(fsrc, fdst)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 163, in 
_fastcopy_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 149, in 
_fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 28] No space left on device: '@test_2626_tmp' -> 
'@test_2626_tmp2'

==
ERROR: test_it (test.test_largefile.TestSocketSendfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 207, 
in test_it
shutil.copyfile(TESTFN, TESTFN2)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 270, in copyfile
_fastcopy_sendfile(fsrc, fdst)
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 163, in 
_fastcopy_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/shutil.py", line 149, in 
_fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 28] No space left on device: '@test_2626_tmp' -> 
'@test_2626_tmp2'

==
ERROR: test_it (test.test_largefile.TestSocketSendfile)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_largefile.py", line 207, 
in test_it
client.sendfile(f)
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 483, in sendfile
return self._sendfile_use_sendfile(file, offset, count)
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 400, in 
_sendfile_use_sendfile
raise err from None
  File "/data/local/tmp/python/lib/python3.9/socket.py", line 386, in 
_sendfile_use_sendfile
sent = os_sendfile(sockno, fileno, offset, blocksize)
BrokenPipeError: [Errno 32] Broken pipe

--

Ran 2 tests in 1.207s

FAILED (errors=2)
test test_largefile failed
test_largefile failed

== Tests result: FAILURE ==

1 test failed:
test_largefile

Total duration: 1.4 sec
Tests result: FAILURE

--
components: Tests
messages: 356976
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_largefile fails on android
type: behavior
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



[issue38850] test_largefile fails on android

2019-11-19 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

I got the same failures on Fedora rawhide. See 
https://bugs.python.org/issue37096

--
nosy: +cstratak

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +16753
pull_request: https://github.com/python/cpython/pull/17260

___
Python tracker 

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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Do I understand you correctly: is Android forbids UDP Unix sockets for non-root 
user?
Maybe the socket path should point on another location to get the test passed?

--

___
Python tracker 

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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

No, it is the SELinux configuration on android devices that forbids binds to 
named UNIX sockets. Changing from a named UNIX socket to an unnamed UNIX socket 
would fix the problem. I don't know if all platforms support unnamed UNIX 
sockets.

The fix in issue #28684 (referenced in the OP) provides a new decorator to skip 
the test for platforms such as android.

--

___
Python tracker 

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



[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:

I've assigned this to Joannah to decide if she wants to backport this.

--
assignee:  -> nanjekyejoannah
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:

I think the real question is whether this is part of the CPython public API or 
the CPython internal API.

@Fabio how burdensome would it be if we placed this in the internal API that 
you can get access to but we don't make backwards-compatibility guarantees 
about? For instance, Victor wants to start passing in thread state which will 
change the API for 3.9, but we wouldn't expect to change it in a bugfix release.

--

___
Python tracker 

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



[issue26278] BaseTransport.close() does not trigger connection_lost()

2019-11-19 Thread Sümer Cip

Sümer Cip  added the comment:

Closing the issue seems like a good idea: as it seems nobody seems to have 
spotted similar issue and I have only been able to reproduce it in Python 3.4. 

Just for future ref.: The uncommon thing is that the server I was using is a 
TCP game server holding long-running connections as opposed to short-lived HTTP 
connections, maybe there is a very random issue at the core but as it is 
happening very randomly.

--

___
Python tracker 

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



[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-19 Thread Fabio Zadrozny


Fabio Zadrozny  added the comment:

@Bret

I don't really see a problem in breaking the API in major releases (so, having 
access for it in the internal API but without a backwards-compatibility 
guarantee seems like a good fit for me).

--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread Thomas Wouters


Thomas Wouters  added the comment:


New changeset 54b32c987146123f2237f0e21b1d02b1c1ebdf6f by T. Wouters (Brandt 
Bucher) in branch 'master':
bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)
https://github.com/python/cpython/commit/54b32c987146123f2237f0e21b1d02b1c1ebdf6f


--
nosy: +twouters

___
Python tracker 

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



[issue38851] UDPLITE tests fail on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

Attached test_socket.txt is the output of running 'python -m test -v 
test_socket' on android API 24. The 108 tests in error are UDPLITE tests 
introduced in issue #37345.

--
components: Tests
files: test_socket.txt
messages: 356985
nosy: asvetlov, gappleto97, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: UDPLITE tests fail on android
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file48722/test_socket.txt

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Change by Brett Cannon :


--
title: Some unused functions in test suite -> Fix some unused functions in test 
suite

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 892221bfa04a41cf581f988ba19dc263f557e157 by Brett Cannon (Adam 
Johnson) in branch 'master':
bpo-38839: Fix some unused functions in tests (GH-17189)
https://github.com/python/cpython/commit/892221bfa04a41cf581f988ba19dc263f557e157


--
nosy: +brett.cannon

___
Python tracker 

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



[issue38839] Fix some unused functions in test suite

2019-11-19 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset c6b20be85c0de6f2355c67ae6e7e578941275cc0 by Miss Islington (bot) 
(Jake Tesler) in branch 'master':
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
https://github.com/python/cpython/commit/c6b20be85c0de6f2355c67ae6e7e578941275cc0


--
nosy: +miss-islington

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16754
pull_request: https://github.com/python/cpython/pull/17261

___
Python tracker 

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



[issue38852] test_recursion_limit in test_threading crashes with SIGSEGV on android

2019-11-19 Thread Xavier de Gaye


New submission from Xavier de Gaye :

Actually it is the script that is spawned by test_recursion_limit that crashes 
with SIGSEGV on android API 24. Lowering the recursion limit in the script from 
1000 to 100 with sys.setrecursionlimit() fixes the problem.

Here is the error:

generic_x86_64:/data/local/tmp/python $ python -m test -v test_threading -m 
test_recursion_limit   
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang 
8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
== Linux-3.10.0+-x86_64-with-libc little-endian
== cwd: /data/local/tmp/python/tmp/test_python_4603
== CPU count: 2
== encodings: locale=UTF-8, FS=utf-8
0:00:00 Run tests sequentially
0:00:00 [1/1] test_threading
test_recursion_limit (test.test_threading.ThreadingExceptionTests) ... FAIL

==
FAIL: test_recursion_limit (test.test_threading.ThreadingExceptionTests)
--
Traceback (most recent call last):
  File "/data/local/tmp/python/lib/python3.9/test/test_threading.py", line 
1086, in test_recursion_limit
self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode())
AssertionError: -11 != 0 : Unexpected error: 

--

Ran 1 test in 0.148s

FAILED (failures=1)
test test_threading failed
test_threading failed

== Tests result: FAILURE ==

1 test failed:
test_threading

Total duration: 354 ms
Tests result: FAILURE

--
components: Tests
messages: 356988
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: test_recursion_limit in test_threading crashes with SIGSEGV on android
type: crash
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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 829593a9262e67c72167c6cb20d383203b2ea410 by Miss Islington (bot) 
in branch '3.8':
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
https://github.com/python/cpython/commit/829593a9262e67c72167c6cb20d383203b2ea410


--

___
Python tracker 

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



[issue26278] BaseTransport.close() does not trigger connection_lost()

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

If a bug cannot be reproduced, it cannot be fixed. So I close the issue ;-)

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Cat Chenal


New submission from Cat Chenal :

S = {19,8,-1,25,0,1,2,3,4,5,6,7}
print('Set S = {{19,8,-1,25,0,1,2,3,4,5,6,7}}')

The set is represented by a new string-ordered set:
print(f'Its repr is:\n{S}\n')
Output:
{0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 25, -1}

This is a breach of the contract stated in the docstring: "Build an unordered 
collection of unique elements."

--
components: ctypes
messages: 356991
nosy: Ylem
priority: normal
severity: normal
status: open
title: set.repr breaches docstring contract
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Thank you Jake for the report and PR!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue38854] Decorator breaks inspect.getsource

2019-11-19 Thread Guido Imperiale


New submission from Guido Imperiale :

Python 3.7.5 and 3.8.0
A decorator causes inspect.getsource() to return clipped output:



from collections import defaultdict
from functools import wraps
import inspect


def foo(*args):
def decorator(func):
@wraps(func)
def wrapper():
pass
return wrapper
return decorator


@foo(dict(), defaultdict(lambda: 1))
def f():
pass


print(inspect.getsource(f))



Output:

@foo(dict(), defaultdict(lambda: 1))

Expected output:

@foo(dict(), defaultdict(lambda: 1))
def f():
pass


These changes to the decorator parameters cause the problem to disappear:

- @foo({}, defaultdict(lambda: 1))
- @foo(dict(), defaultdict(list))

--
messages: 356993
nosy: crusaderky
priority: normal
severity: normal
status: open
title: Decorator breaks inspect.getsource
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



[issue38855] test_unpack.py does not catch the unpacking of a set

2019-11-19 Thread Cat Chenal


New submission from Cat Chenal :

S = {19,8,-1,25,0,1,2,3,4,5,6,7}

a, *b, c = S
print('a:', a)
print('b:', b)
print('c:', c)

Output:
a: 0
b: [1, 2, 3, 4, 5, 6, 7, 8, 19, 25]
c: -1

Either test_unpack.py needs a test for "non-indexable object" to prevent this 
unpacking of a non-sequence, or the unpacking of a set should be implemented 
(granted the ordered repr of a set is changed to unordered, see Issue38853).

Being able to "unpack" a set would be nice to have, imho, because one would use 
that operation to obtain a partition (over unordered elements).

--
components: Tests, ctypes
messages: 356994
nosy: Ylem
priority: normal
severity: normal
status: open
title: test_unpack.py does not catch the unpacking of a set
versions: Python 3.6

___
Python tracker 

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



[issue38841] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2019-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Please feel free to make a PR for applying @skip_unless_bind_unix_socket 
decorator.

--

___
Python tracker 

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



[issue38856] wait_closed() can raise ConnectionResetError

2019-11-19 Thread Yury Selivanov


New submission from Yury Selivanov :

The exception should probably be just ignored.  Andrew, thoughts?

Here's an example error traceback:

  Traceback (most recent call last):
File "c:\projects\asyncpg\asyncpg\connection.py", line 1227, in _cancel
  await w.wait_closed()
File "C:\Python38\lib\asyncio\streams.py", line 376, in wait_closed
  await self._protocol._get_close_waiter(self)
File "c:\projects\asyncpg\asyncpg\connection.py", line 1202, in _cancel
  await r.read()  # Wait until EOF
File "C:\Python38\lib\asyncio\streams.py", line 694, in read
  block = await self.read(self._limit)
File "C:\Python38\lib\asyncio\streams.py", line 701, in read
  await self._wait_for_data('read')
File "C:\Python38\lib\asyncio\streams.py", line 534, in _wait_for_data
  await self._waiter
File "C:\Python38\lib\asyncio\proactor_events.py", line 280, in 
_loop_reading
  data = fut.result()
File "C:\Python38\lib\asyncio\windows_events.py", line 808, in _poll
  value = callback(transferred, key, ov)
File "C:\Python38\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

--
messages: 356996
nosy: asvetlov, lukasz.langa, yselivanov
priority: release blocker
severity: normal
status: open
title: wait_closed() can raise ConnectionResetError
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



[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I'm sorry, I don't understand what part of the documentation you think is 
violated here. The docs say that sets are unordered, but of course when 
printing the elements have to be given in *some* order.

The given output seems unordered to me: -1 is smaller than 25, but it appears 
last in the output.

The specific order you see will depend on the specific values in the set, as 
well as the order that they were inserted, deleted, and/or re-inserted in some 
arbitrary way. For example:

>>> repr({4, 5, 2**31+1, 2, 2**31+2, 3, 2**31, 0})
'{0, 2147483648, 2, 3, 2147483650, 2147483649, 5, 4}'


I don't think there is a bug here. Can you explain what you think the bug is, 
in detail please?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue38707] Multiprocessing: bug with Native ID for threading.mainthread()

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix. That was an interesting bug ;-) I like the simplicity of 
the fix.

--

___
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-11-19 Thread Dan


Dan  added the comment:

According to this -
https://wiki.tcl-lang.org/page/Building+with+Visual+Studio+2017
the issue will be fixed in the next version (8.6.10). TLDR explanation: Tcl/Tk 
has variables with names that are now reserved keywords in VS2017, meaning that 
it can't be build with recent compilers and since VS2017 is the first compiler 
that has official ARM64 support it means that it currently can't be built for 
that target.
Anyway when version 8.6.10 is eventually released then it should (hopefully) 
build fine with the current scripts.
Maybe we can add it later when that happens?

--

___
Python tracker 

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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


New submission from Jason Fried :

If you are trying to use AsyncMock to mock a coroutine that returns awaitable 
objects, AsyncMock awaits on those objects instead of returning them as is. 

Example:
  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()  # blocks on trying to await the future

Expected:
  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()
  assert isisnstance(v, asyncio.Future)

This problem affects side_effects and wraps.

--
components: Library (Lib)
messages: 357000
nosy: fried, lisroach
priority: normal
severity: normal
status: open
title: AsyncMock issue with awaitable return_value/side_effect/wraps
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



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

2019-11-19 Thread STINNER Victor


New submission from STINNER Victor :

Currently, new_interpreter() is a subset of Py_InitializeFromConfig(): the code 
was duplicated. I would prefer that both functions stay in sync and so that 
new_interpreter() reuses more Py_InitializeFromConfig() code.

--
components: Interpreter Core
messages: 357001
nosy: vstinner
priority: normal
severity: normal
status: open
title: new_interpreter() should reuse more Py_InitializeFromConfig() code
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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ac2235432c607ce2c0faf6dff5d9b2534d2f6652 by Victor Stinner 
(Brandt Bucher) in branch 'master':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/ac2235432c607ce2c0faf6dff5d9b2534d2f6652


--
nosy: +vstinner

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16756
pull_request: https://github.com/python/cpython/pull/17264

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16755
pull_request: https://github.com/python/cpython/pull/17263

___
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-11-19 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 5bd2af9c79796aa03b06d1e35ab6df7e28364e24 by Miss Islington (bot) 
in branch '3.7':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/5bd2af9c79796aa03b06d1e35ab6df7e28364e24


--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset a5ed2fe0eedefa1649aa93ee74a0bafc8e628a10 by Miss Islington (bot) 
in branch '3.8':
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
https://github.com/python/cpython/commit/a5ed2fe0eedefa1649aa93ee74a0bafc8e628a10


--

___
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-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ef5aa9af7c7e493402ac62009e4400aed7c3d54e by Victor Stinner in 
branch 'master':
bpo-38858: Reorganize pycore_init_types() (GH-17265)
https://github.com/python/cpython/commit/ef5aa9af7c7e493402ac62009e4400aed7c3d54e


--

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b by Pablo Galindo in 
branch 'master':
bpo-37957: Allow regrtest to receive a file with test (and subtests) to ignore 
(GH-16989)
https://github.com/python/cpython/commit/e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b


--

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16758
pull_request: https://github.com/python/cpython/pull/17266

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

IMHO, I think is such a specific use case that is not worth the maintenance 
cost. Especially because of such list comprehension is very uncommon as you can 
simply do `list(it)` which more readable and anecdotally faster.

--
nosy: +pablogsal

___
Python tracker 

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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


Change by Jason Fried :


--
type:  -> behavior

___
Python tracker 

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



[issue38859] AsyncMock says it raises StopIteration but that is Impossible

2019-11-19 Thread Jason Fried


New submission from Jason Fried :

If an AsyncMock uses a side_effect that is an Iterable, if called more than 
items exist its suppose to raise StopIteration according to the docs but PEP 
479 says that is impossible. 

My Suggestion is that we update the docs and the code to Raise a 
StopAsyncIteration since it will not be converted to a RuntimeError

--
components: Library (Lib)
messages: 357008
nosy: fried, lisroach
priority: normal
severity: normal
status: open
title: AsyncMock says it raises StopIteration but that is Impossible
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 444b39bb64aa894d3f1831210a8ce40042a5a532 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in handle_legacy_finalizers() (GH-17266)
https://github.com/python/cpython/commit/444b39bb64aa894d3f1831210a8ce40042a5a532


--

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16759
pull_request: https://github.com/python/cpython/pull/17267

___
Python tracker 

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



[issue38753] AsyncMock not cited as new in 3.8

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16760
pull_request: https://github.com/python/cpython/pull/17268

___
Python tracker 

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



[issue38753] AsyncMock not cited as new in 3.8

2019-11-19 Thread Lisa Roach


Lisa Roach  added the comment:


New changeset 279d8df5e5e8bbd4429420649359f7afcb4c8cce by Lisa Roach (John 
Belmonte) in branch 'master':
bpo-38753: AsyncMock added in version 3.8 (GH-17102)
https://github.com/python/cpython/commit/279d8df5e5e8bbd4429420649359f7afcb4c8cce


--

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-19 Thread David Cuthbert


David Cuthbert  added the comment:

I'm working on patches for the deprecation bits (targeting 3.6 for now; will 
work my way up from there) for review, including documentation. Unless someone 
tells me to stop. :-)

In an attempt to make this not-so-Linux-specific, I'm reviewing how this works 
on non-Linux platforms (MacOS, FreeBSD) as well.

Reading Linux's socket(7) man page makes it seem like reuse_port is the issue 
(but that actually has protections to ensure you're only doing it across the 
same UID at least). I had to write my own test jig to (re-)convince myself 
that, indeed, reuse_addr is the problem.

--

___
Python tracker 

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



[issue38859] AsyncMock says it raises StopIteration but that is Impossible

2019-11-19 Thread Jason Fried


Change by Jason Fried :


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

___
Python tracker 

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



[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2019-11-19 Thread Jason Fried


Change by Jason Fried :


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

___
Python tracker 

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



[issue36287] Make ast.dump() not output optional default fields

2019-11-19 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

No objections from me assuming you are going forward along the way proposed by 
Serhiy (i.e. only skip values for certain fields if value is the default, not a 
blanket skip for all Nones and empty lists).

--

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2e96906da764402b4c8062dbf99171ca506f9e12 by Victor Stinner in 
branch 'master':
bpo-36710: Pass tstate parameter to GC collect() (GH-17267)
https://github.com/python/cpython/commit/2e96906da764402b4c8062dbf99171ca506f9e12


--

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16763
pull_request: https://github.com/python/cpython/pull/17270

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16765
pull_request: https://github.com/python/cpython/pull/17272

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 33b671e72450bf4b5a946ce0dde6b7fe21150108 by Victor Stinner 
(Brandt Bucher) in branch 'master':
bpo-38823: Fix refleak in marshal init error path (GH-17260)
https://github.com/python/cpython/commit/33b671e72450bf4b5a946ce0dde6b7fe21150108


--

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16764
pull_request: https://github.com/python/cpython/pull/17271

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

I'm trying to keep regrtest in sync between 3.7, 3.8 and master branches. Maybe 
backport this change to 3.7 and 3.8 branches once buildbots validated the 
change? I'm keeping them in sync mostly to make bugfixes easier, but also to 
make my life easier when I debug issues in 3.7 or 3.8 branch.

--

___
Python tracker 

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



[issue37957] Allow regrtest to receive a file with test (and subtests) to ignore

2019-11-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, I reopen until the backports

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

___
Python tracker 

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



[issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 01b1cc12e7c6a3d6a3d27ba7c731687d57aae92a by Victor Stinner in 
branch 'master':
bpo-36710: Add PyInterpreterState.runtime field (GH-17270)
https://github.com/python/cpython/commit/01b1cc12e7c6a3d6a3d27ba7c731687d57aae92a


--

___
Python tracker 

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



[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-19 Thread David Cuthbert


David Cuthbert  added the comment:

FreeBSD 12.1 and MacOS 10.15.1 (Catalina) appear to have saner and safer 
behavior.

Both require the use of SO_REUSEPORT for this behavior to happen as well. 
FreeBSD also requires the UID to be the same or 0 for subsequent processes to 
make the bind() call. I'll call this out as being Linux-specific in the 
deprecation message for now. (I don't have an AIX, HP-UX, or Solaris system 
handy to test, nor do I really want one if I'm being honest. :-) .)

--

___
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-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16766
pull_request: https://github.com/python/cpython/pull/17273

___
Python tracker 

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



[issue38823] Improve stdlib module initialization error handling.

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

The Azure Pipelines are sick tonight (unable to publish test results). PR 
#17272 and PR #17271 are blocked by this CI.

--

___
Python tracker 

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



[issue38847] AST Optimization for Single Target List Comprehension

2019-11-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Pablo.

Thank you for the suggestion though.

--
nosy: +rhettinger
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



  1   2   >