[issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close()

2018-11-14 Thread Martin Panter

Martin Panter  added the comment:

There are actually two “close” methods in the WSGI package: ServerHandler’s 
implementation extends the BaseHandler implementation. Making the “close” 
methods do nothing if called a second time would avoid the error about 
“self.status” being None, but won’t help very much with other problems, such as:

* If no response has been sent when the exception happens, the first call to 
“ServerHandler.close” still won’t have a HTTP status code or response size to 
log. It is more useful in this case to log the 500 code in the second “close” 
call after the error page is generated, which is what happens in 2.6.

* If the response was started when the exception happens, the first call to 
“BaseHandler.close” will still reset “self.headers_sent”, which fools 
“handle_error” into trying to generate a 500 response despite already having 
started the application response.

To be clear, what I had in mind last week was to adjust “finish_response” to 
look something like:

class BaseHandler:
...
def finish_response(self):
try:
...
except:
# Limited version of “close” method on exception
if hasattr(self.result, 'close'):
self.result.close()
raise
self.close()  # Full “close” method when no exception

For the record: This is related to Issue 27682, specifically about handling 
ConnectionAbortedError and other network errors.

--

___
Python tracker 

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



[issue35243] readline timeout too long for async gfx use

2018-11-14 Thread pmpp


New submission from pmpp :

unlike 
https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame 
which is fires about each 1/60 second : the callback for gui via PyOS_InputHook 
is as long as 0.1 second.

https://github.com/python/cpython/blob/8e0b05e2f4b9fd703cbe1ae8d058852ef3781f44/Modules/readline.c#L1192

using repl asyncronously with such a timer is a bad experience when using async 
opengl based gui : asyncio loop steps should be able to be served at vsync 
speed which is not actually possible because of hardcoded value.

0.008 seconds would not be so bad, best would be plan next call to hit T+ 
frametime ( with a default to 0.016 ) each pass inside the loop.

a use case for python would be panda3d and its various gui.

real life example in other mainstream language : the javascript repl in the 
browser console.

--
components: Extension Modules
messages: 329891
nosy: pmpp
priority: normal
severity: normal
status: open
title: readline timeout too long for async gfx use
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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

@gus.goulart you have reproduced it. The screenshot showing `-11` means the 
process dumped core. Because it's the child that dumps core, it's masked by 
abrt.

Observe:

$ python3 --version
Python 3.7.1
$ python3 ~/Downloads/test_lock_sigsegv.py 
Parent r_q: , , 

-11
$ abrt
61bdd28 1x /usr/bin/python3.7 2018-11-14 04:18:06
$ uname -a
Linux myhost 4.18.17-300.fc29.x86_64 #1 SMP Mon Nov 5 17:56:16 UTC 2018 x86_64 
x86_64 x86_64 GNU/Linux

--

___
Python tracker 

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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

@taleinat The above has been reproduced on Fedora 29.

--

___
Python tracker 

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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread Arcadiy Ivanov


Change by Arcadiy Ivanov :


Added file: https://bugs.python.org/file47933/coredump

___
Python tracker 

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



[issue35230] Remove _Py_REF_DEBUG_COMMA

2018-11-14 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset a757649fd6535c5e65481eb1077e30687421b92b by INADA Naoki in branch 
'master':
bpo-35230: dict: Remove some macros (GH-10513)
https://github.com/python/cpython/commit/a757649fd6535c5e65481eb1077e30687421b92b


--

___
Python tracker 

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



[issue35230] Remove _Py_REF_DEBUG_COMMA

2018-11-14 Thread INADA Naoki


Change by INADA Naoki :


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



[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2018-11-14 Thread Petr Viktorin


Petr Viktorin  added the comment:

Should be fixed in PR9665 (bpo-34784), thanks to Eddie Elizondo.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2018-11-14 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue35230] Remove _Py_REF_DEBUG_COMMA

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks. I almost started my project to convert macros to static inline 
functions just to remove ugly things like:

#define _Py_REF_DEBUG_COMMA ,


(Well, there are other reasons to move to proper functions.)

--

___
Python tracker 

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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9790

___
Python tracker 

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



[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

I'd say yes. In general python may have been compiled with -flto, but it's 
still a bit buggy from the compilers' side. It doesn't work well always or at 
all depending on the toolchain, and even if python was compiled with -flto, 
that doesn't mean that all c extensions compiled using that python build, would 
work properly with -flto.

In my opinion that should be a flag reserved for python only, if used for its 
compilation, and not having it propagated to c extensions, similarly to the PGO 
related flags.

--

___
Python tracker 

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



[issue35241] [3.7] test_embed fails on MacOS buildbots

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_embed fails on MacOS buildbots -> [3.7] test_embed fails on MacOS 
buildbots

___
Python tracker 

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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

> At a minimum I think there should be a check trying to reduce arguments via 
> incompatible context's process to prevent a SEGV.

I'm not sure that I understand the bug. The reproducer script pass a 
multiprocessing.Queue to a child process and then the child crash when 
attempting to call multiprocessing.synchronize.Lock.__repr__().

Does the child reuse a copy of the lock of the parent process? Or does the 
child create a new SemLock?


I reproduced the bug on Fedora 26. I attached the child process in gdb. The 
crash occurs on sem_getvalue() in the child process.

Program received signal SIGSEGV, Segmentation fault.
0x7f29a5156610 in sem_getvalue@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
(gdb) where
#0  0x7f29a5156610 in sem_getvalue@@GLIBC_2.2.5 () from 
/lib64/libpthread.so.0
#1  0x7f299c60e7bb in semlock_getvalue (self=0x7f299a95e2b0, 
_unused_ignored=0x0)
at /home/haypo/prog/python/master/Modules/_multiprocessing/semaphore.c:541
#2  0x00434537 in _PyMethodDef_RawFastCallKeywords 
(method=0x7f299c8102e0 , 
self=<_multiprocessing.SemLock at remote 0x7f299a95e2b0>, 
args=0x7f299c5f47e8, nargs=0, kwnames=0x0) at Objects/call.c:629
#3  0x00607aff in _PyMethodDescr_FastCallKeywords 
(descrobj=, args=0x7f299c5f47e0, 
nargs=1, 
kwnames=0x0) at Objects/descrobject.c:288
#4  0x00512f92 in call_function (pp_stack=0x7ffd3591f730, oparg=1, 
kwnames=0x0) at Python/ceval.c:4595
(...)

(gdb) py-bt
Traceback (most recent call first):
  File "/home/haypo/prog/python/master/Lib/multiprocessing/synchronize.py", 
line 170, in __repr__
elif self._semlock._get_value() == 1:
  File "/home/haypo/prog/python/master/test_lock_sigsegv.py", line 20, in child
print("Child r_q: %r, %r, %r" % (r_q._rlock, r_q._wlock, r_q._sem), 
flush=True)
  File "/home/haypo/prog/python/master/Lib/multiprocessing/process.py", line 
99, in run
self._target(*self._args, **self._kwargs)
  File "/home/haypo/prog/python/master/Lib/multiprocessing/process.py", line 
297, in _bootstrap
self.run()
  File "/home/haypo/prog/python/master/Lib/multiprocessing/spawn.py", line 130, 
in _main
return self._bootstrap()
  File "/home/haypo/prog/python/master/Lib/multiprocessing/spawn.py", line 629, 
in spawn_main
  File "", line 1, in 

--

___
Python tracker 

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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bc09ee8bc9c0ce4873cdaab6ca524a3ee3a36be1 by Victor Stinner in 
branch '3.7':
bpo-35233: Fix test_embed.InitConfigTests on macOS (GH-10539)
https://github.com/python/cpython/commit/bc09ee8bc9c0ce4873cdaab6ca524a3ee3a36be1


--

___
Python tracker 

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



[issue35241] [3.7] test_embed fails on MacOS buildbots

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

I merged https://github.com/python/cpython/pull/10539

--

___
Python tracker 

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



[issue35241] [3.7] test_embed fails on MacOS buildbots

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

macOS buildbots are back to green.

Thanks Pablo for creating the issue!

I forgot the subtle differences on Py_HasFileSystemDefaultEncoding on Python 
3.7... Python 3.8 has a more "portable" behavior now.

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



[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-14 Thread Jaime Torres


New submission from Jaime Torres :

Clang is not in the list of allowed compilers when executed:
python setup.py build --help-compiler

  --compiler=bcpp Borland C++ Compiler
  --compiler=cygwin   Cygwin port of GNU C Compiler for Win32
  --compiler=mingw32  Mingw32 port of GNU C Compiler for Win32
  --compiler=msvc Microsoft Visual C++
  --compiler=unix standard UNIX-style compiler

I've tried to use the value unix in windows, to see if it will search for 
environment variables CC and CXX, but without success.

--
components: Distutils
messages: 329902
nosy: Jaime Torres, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Allow to setup Clang as default compiler for modules build
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



[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I confirm the issue, the main issue we have to support the CLang compiler into 
distutils.

--
nosy: +matrixise

___
Python tracker 

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



[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-14 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
versions: +Python 3.8

___
Python tracker 

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



[issue35143] `from __future__ import annotations` has no effect inside `ast.parse`

2018-11-14 Thread Łukasz Langa

Łukasz Langa  added the comment:

I think this is a bug, actually. It's going to be an incompatibility in 
`ast.parse` so we'll probably want to only enable it in Python 3.8.

This should have stringified annotations:

>>> p = ast.parse("""
... from __future__ import annotations
... a: 1
... """)
>>> p.body[1].annotation  # ACTUAL
<_ast.Num object at 0x1048cf470>

>>> p.body[1].annotation  # EXPECTED
<_ast.Str object at 0x1048cf6a0>

--
assignee:  -> lukasz.langa
stage:  -> needs patch
title: Annotations future requires unparse, but not accessible from Python -> 
`from __future__ import annotations` has no effect inside `ast.parse`
type: enhancement -> behavior

___
Python tracker 

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



[issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished

2018-11-14 Thread Sergei Zobov


Change by Sergei Zobov :


--
components: +Library (Lib)

___
Python tracker 

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



[issue35239] _PySys_EndInit() doesn't copy main interpreter configuration

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

Python has 3 kind of configurations:

* global configuration variables like Py_VerboseFlag
* core configuration: _PyCoreConfig
* main interpreter configuration: _PyMainInterpreterConfig

I tried to keep them consistency. Yesterday, I rewrote 
test_embed.InitConfigTests to really test that these 3 configurations are 
consistent... And I found multiple bugs :-) (I fixed them as well)

sys.flags is immutable, but some configurations are only used to "initialize" 
Python which can then be modified. sys.path is a good example.

I don't think that we can ensure that sys.path is always consistent with the 
main/core configuration (module_search_paths). It's possible to write "sys.path 
= ['/new/path']". There is no machinery at the module level to call a function 
when a sys module is *replaced*.

I propose to try to ensure that the configuration is not modified during Python 
lifecycle, and so that sys.path is a *copy* of the configuration. Same 
rationale for sys.warnoptions (list) and sys._xoptions (dict).

Attached PR 10532 implements this solution: copy lists and dicts.

--

___
Python tracker 

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



[issue35245] list comprehension for flattened or nested list differ too much

2018-11-14 Thread Yechoh


New submission from Yechoh :

Suppose we have:
forest = [[1,2],[3,4]]
and we want:
l1 = [['1','2'],['3','4']]
we could write:
l1 = [[str(leaf) for leaf in tree] for tree in forest]

Now if we want:
l2 = ['1','2','3','4']
What I expect to need to write is:
l2 = [str(leaf) for leaf in tree for tree in forest]
However, this gives an error:
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'tree' is not defined
Instead, I should write:
l2 = [str(leaf) for tree in forest for leaf in tree]
Notice the different order.
I would prefer if the first version of constructing l2 over the second, since 
it follows closer to the reading order.
Also, it is closer to the comprehension for a nested list, so changing a nested 
list comprehension to a flattened list comprehension is easy.

--
messages: 329906
nosy: Yechoh
priority: normal
severity: normal
status: open
title: list comprehension for flattened or nested list differ too much
type: enhancement

___
Python tracker 

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



[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

2018-11-14 Thread lilydjwg


New submission from lilydjwg :

When I pass pathlib.Path to asyncio.create_subprocess_exec I get:

TypeError: program arguments must be a bytes or text string, not PosixPath

It's not so good when subprocess accepts this kind of arguments without issues. 
So can you add support for this?

--
components: asyncio
messages: 329907
nosy: asvetlov, lilydjwg, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.create_subprocess_exec doesn't accept pathlib.Path like 
subprocess does
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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread Gus Goulart


Gus Goulart  added the comment:

@vstinner, on Debian 9 I can see the problem as well but wasn't able to debug 
with the level of details you did. Could you please share the process you 
followed?

What I found was:

./python -X dev test_lock_sigsegv.py
Parent r_q: , , 

Fatal Python error: Segmentation fault

Current thread 0x7fab36124480 (most recent call first):
  File "/home/gus/Workspace/cpython/Lib/multiprocessing/synchronize.py", line 
170 in __repr__
  File "/home/gus/Workspace/cpython/test_lock_sigsegv.py", line 17 in child
  File "/home/gus/Workspace/cpython/Lib/multiprocessing/process.py", line 99 in 
run
  File "/home/gus/Workspace/cpython/Lib/multiprocessing/process.py", line 297 
in _bootstrap
  File "/home/gus/Workspace/cpython/Lib/multiprocessing/spawn.py", line 130 in 
_main
  File "/home/gus/Workspace/cpython/Lib/multiprocessing/spawn.py", line 117 in 
spawn_main
  File "", line 1 in 
-11

Using GDB:

(gdb) set follow-fork-mode child
(gdb) run test_lock_sigsegv.py 
Starting program: /home/gus/Workspace/cpython/python test_lock_sigsegv.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Parent r_q: , , 

[New process 4941]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 4941 is executing new program: /home/gus/Workspace/cpython/python
-11
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Inferior 2 (process 4941) exited normally]
(gdb) where
No stack.
(gdb) py-bt
Unable to locate python frame
(gdb)

--

___
Python tracker 

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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-11-14 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

@vstinner

> I'm not sure that I understand the bug.

The bug is, if a user makes an error and passes a Queue from context 'fork' to 
a child that is spawned using 'spawn', the passed Queue is, for obvious 
reasons, broken. 

The 'print("Child r_q: %r, %r, %r" % (r_q._rlock, r_q._wlock, r_q._sem), 
flush=True)' is simply a demonstration of a broken state of the SemLock 
observed in the child. 

The expected fix would be to stop the mixed context use of MP objects on the 
API level (ValueError?) or at least prevent a segfault.

--

___
Python tracker 

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



[issue35245] list comprehension for flattened or nested list differ too much

2018-11-14 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> l2 = [str(leaf) for leaf in tree for tree in forest]

Expanded to nested loops, that becomes:

l2 = []
for leaf in tree:
for tree in forest:
l2.append(str(leaf))

which of course gives a NameError, because you are trying to iterate over a 
tree that you haven't defined yet.

The correct way to write this nested comprehension is to put the loops in the 
same order that they will appear in a nested loop:

[str(leaf) for tree in forest for leaf in tree]

There are thousands, or more, of nested comprehensions using the existing order 
in code around the world, if we swapped to your proposed "backwards" order it 
would change the meaning of their code and break it. That's not going to happen 
without an excellent reason.

I'm closing this "rejected". If you want to debate this and push for the 
proposed change, you should discuss it on the Python-Ideas mailing list first.

--
nosy: +steven.daprano
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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9791

___
Python tracker 

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



[issue32429] Outdated Modules/Setup warning is invisible

2018-11-14 Thread Julien Palard


Julien Palard  added the comment:

Fixed in 961d54c5c1916c09883ebcf7191babc969e5a5cf.

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread Julien Palard


Julien Palard  added the comment:


New changeset 64313478bcbd0a708c3ce5d4d14f977da56e4be9 by Julien Palard in 
branch 'master':
bpo-32613: Update window FAQ (GH-5552)
https://github.com/python/cpython/commit/64313478bcbd0a708c3ce5d4d14f977da56e4be9


--

___
Python tracker 

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



[issue33196] multiprocessing: serialization must ensure that contexts are compatible (the same)

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

> The bug is, if a user makes an error and passes a Queue from context 'fork' 
> to a child that is spawned using 'spawn', the passed Queue is, for obvious 
> reasons, broken. 

Ok. I rewrote the issue title.

--

___
Python tracker 

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



[issue33196] multiprocessing: serialization must ensure that contexts are compatible (the same)

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
title: SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched 
-> multiprocessing: serialization must ensure that contexts are compatible (the 
same)

___
Python tracker 

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



[issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely

2018-11-14 Thread markmcclain


New submission from markmcclain :

test.test_socket.RDSTest.testPeek() can hang indefinitely. ThreadableTest 
attempts to ensure ordering of operations, but allows both the client and 
server to proceed without guaranteeing that the data is sent prior to the 
blocking attempt to peek at the socket's contents.

Either the test needs to make recvfrom non-blocking with a timeout/retry loop 
or ensure data is sent prior to allowing the server to proceed.

--
components: Tests
messages: 329914
nosy: markmcclain
priority: normal
severity: normal
status: open
title: test.test_socket.RDSTest.testPeek hangs indefinitely
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:

FYI I removed RDSTest.testCongestion() in bpo-34587.

> test.test_socket.RDSTest.testPeek() can hang indefinitely.

Any advice to explain how to reproduce the issue? Can you try to put a sleep() 
somewhere to make the race condition more likely?

--
nosy: +vstinner

___
Python tracker 

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



[issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal

___
Python tracker 

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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 01de89cb59107d4f889aa503a1c0350dae4aebaf by Victor Stinner in 
branch 'master':
bpo-35233: InitConfigTests tests more config vars (GH-10541)
https://github.com/python/cpython/commit/01de89cb59107d4f889aa503a1c0350dae4aebaf


--

___
Python tracker 

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread Julien Palard


Change by Julien Palard :


--
pull_requests: +9792

___
Python tracker 

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread Julien Palard


Change by Julien Palard :


--
pull_requests: +9793

___
Python tracker 

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread miss-islington


miss-islington  added the comment:


New changeset 9053d2f2e09f9583473fb3c1960cba9bda8f3be1 by Miss Islington (bot) 
(Julien Palard) in branch '3.7':
[3.7] bpo-32613: Update window FAQ (GH-5552). (GH-10544)
https://github.com/python/cpython/commit/9053d2f2e09f9583473fb3c1960cba9bda8f3be1


--
nosy: +miss-islington

___
Python tracker 

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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9794

___
Python tracker 

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread miss-islington


miss-islington  added the comment:


New changeset 137da0c5300c0a196084ab9efa61d116304de224 by Miss Islington (bot) 
(Julien Palard) in branch '3.6':
[3.6] bpo-32613: Update window FAQ (GH-5552). (GH-10545)
https://github.com/python/cpython/commit/137da0c5300c0a196084ab9efa61d116304de224


--

___
Python tracker 

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



[issue32613] Use PEP 397 py launcher in windows faq

2018-11-14 Thread Julien Palard


Change by Julien Palard :


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



[issue33196] multiprocessing: serialization must ensure that contexts are compatible (the same)

2018-11-14 Thread Davin Potts


Change by Davin Potts :


--
nosy: +davin

___
Python tracker 

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



[issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished

2018-11-14 Thread Davin Potts


Change by Davin Potts :


--
nosy: +davin

___
Python tracker 

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



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


Change by Mathieu Lamarre :


--
components: Library (Lib)
nosy: Mathieu Lamarre
priority: normal
severity: normal
status: open
title: RawArray causes FileNotFoundError at cleanup
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



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


New submission from Mathieu Lamarre :

Running:

from multiprocessing.sharedctypes import RawArray
from ctypes import c_uint32
if __name__ == '__main__':
shared_array = RawArray(c_uint32, 1500)

Causes:
Traceback (most recent call last):
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", 
line 262, in _run_finalizers
finalizer()
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", 
line 186, in __call__
res = self._callback(*self._args, **self._kwargs)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 480, in 
rmtree
_rmtree_safe_fd(fd, path, onerror)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 438, in 
_rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 436, in 
_rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'pym-10314-v8aznmmb'


Python 3.6.6 |Anaconda, Inc.| (default, Oct  9 2018, 12:34:16)
[GCC 7.3.0] on linux

--

___
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

2018-11-14 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

FWIW, I suspect that setting the environment variable only helps if it's done 
before the process starts.  You cannot set it before the fork and have it 
affect the child.

--

___
Python tracker 

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



[issue35233] _PyMainInterpreterConfig_Copy() doesn't copy install_signal_handlers

2018-11-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9ee1d42f019ac827f73479ce241e95733d050e67 by Victor Stinner in 
branch '3.7':
bpo-35233: InitConfigTests tests more config vars (GH-10541) (GH-10546)
https://github.com/python/cpython/commit/9ee1d42f019ac827f73479ce241e95733d050e67


--

___
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

2018-11-14 Thread Davin Potts


Davin Potts  added the comment:

Barry's effort as well as comments in other links seem to all suggest that 
OBJC_DISABLE_INITIALIZE_FORK_SAFETY is not comprehensive in its ability to make 
other threads "safe" before forking.

"Objective-C classes defined by the OS frameworks remain fork-unsafe" (from 
@kapilt's first link) suggests we furthermore remain at risk using certain 
MacOS system libraries prior to any call to fork.

"To guarantee that forking is safe, the application must not be running any 
threads at the point of fork" (from @kapilt's second link) is an old truth that 
we continue to fight with even when we know very well that it's the truth.

For newly developed code, we have the alternative to employ spawn instead of 
fork to avoid these problems in Python, C, Ruby, etc.  For existing legacy code 
that employed fork and now surprises us by failing-fast on MacOS 10.13 and 
10.14, it seems we are forced to face a technical debt incurred back when the 
choice was first made to spin up threads and afterwards to use fork.

If we didn't already have an "obvious" (zen of Python) way to avoid such 
problems with spawn versus fork, I would feel this was something to solve in 
Python.  As to helping the poor unfortunate souls who must fight the good fight 
with legacy code, I am not sure what to do to help though I would like to be 
able to help.

--

___
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

2018-11-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Legacy code is easy to migrate as long as it uses Python 3.  Just call

  mp.set_start_method('forkserver')

at the top of your code and you're done.  Some use cases may fail (if sharing 
non-picklable types), but they're probably not very common.

--

___
Python tracker 

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



[issue35248] RawArray causes FileNotFoundError at cleanup

2018-11-14 Thread Mathieu Lamarre


Mathieu Lamarre  added the comment:

To repro, the temp directory returned by tempfile must be a network mount to 
reproduce this error. I have this on server with minimal disk space in /home 
and TMPDIR points to CIFS mounted volume. So maybe can only be reproduced if 
shutils operations on the temp dir are slow (or buggy). 

We have been using a network temp dir in a large project and RawArray is the 
only object giving us error so far. Maybe the error could be ignored, if it's 
only dual delete issue.

--

___
Python tracker 

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



[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Ned Deily


Ned Deily  added the comment:

This does sound like a regression bug that should be fixed in all branches.  
Another issue is that, if it is propagated to third-party extension module 
builds through distutils, there is no guarantee that the extension module is 
being built with the same compiler as Python itself was.

--
nosy: +ned.deily
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



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

2018-11-14 Thread Ned Deily


Ned Deily  added the comment:

_scproxy has been known to be problematic for some time, see for instance 
Issue31818.  That issue also gives a simple workaround: setting urllib's 
"no_proxy" environment variable to "*" will prevent the calls to the System 
Configuration framework.

--

___
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

2018-11-14 Thread Davin Potts


Davin Potts  added the comment:

Given the original post mentioned 2.7.15, I wonder if it is feasible to fork 
near the beginning of execution, then maintain and pass around a 
multiprocessing.Pool to be used when needed instead of dynamically forking?  
Working with legacy code is almost always more interesting than you want it to 
be.

--

___
Python tracker 

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



[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-14 Thread Davin Potts


Davin Potts  added the comment:

Resolution is marked dupe but status is still open.  Are we closing this one or 
is there a more specific remedy for this situation (as opposed to what 
issue33725 discusses) that would be helpful to document?

--
nosy: +davin

___
Python tracker 

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



[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset b6f4472dc4190e2fd668490d86aeefd2ab0df935 by Gregory P. Smith in 
branch '2.7':
[2.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) 
(GH-10538)
https://github.com/python/cpython/commit/b6f4472dc4190e2fd668490d86aeefd2ab0df935


--

___
Python tracker 

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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Jules Lasne


New submission from Jules Lasne :

When working on the Documentation or when translating it, I often have to 
rebuild the doc locally to see the changes I made and see how it looks.

However, with the current configuration, It takes (on my computer at least) 
more than 4 minutes to build.

After investigating, I've found out that the build options on the Makefile of 
python-docs-fr and of cpython/Docs both have the `E` and `a` options set, which 
forces a complete rebuild, even when running locally.

https://github.com/python/cpython/blob/9ee1d42f019ac827f73479ce241e95733d050e67/Doc/Makefile#L178-L208
https://github.com/python/python-docs-fr/commit/af8c7a95ab5bc50523ba919c74bb6e6b89d16962

My proposal is to add a `make dev` in the `python-docs-fr` Makefile and add in 
`cpython/Docs` a mode which will only recompile the needed files.

--
components: Build
messages: 329930
nosy: seluj78
priority: normal
severity: normal
status: open
title: Docs Makefile always rebuilds entire doc
type: performance
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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Julien Palard


Julien Palard  added the comment:

A `make html` builds the doc in 11s on my machine on the 2nd run, I think this 
is the build you're searching?

--
nosy: +mdk

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-14 Thread Shane


New submission from Shane :

I noticed a slight mismatch in the parameter documentation for one of turtle's 
functions.  onclick() accepts the parameters (fun, btn, add), but the 
documentation describes the parameters (fun, num, add).  A minor issue, to be 
sure, but I wanted to point it out since I just noticed it.  I'm using Python 
3.7.1 but I suspect it's not isolated to that.

>>> help(turtle.Turtle().onclick)
Help on method onclick in module turtle:

onclick(fun, btn=1, add=None) method of turtle.Turtle instance
Bind fun to mouse-click event on this turtle on canvas.

Arguments:
fun --  a function with two arguments, to which will be assigned
the coordinates of the clicked point on the canvas.
num --  number of the mouse-button defaults to 1 (left mouse button).
add --  True or False. If True, new binding will be added, otherwise
it will replace a former binding.

--
assignee: docs@python
components: Documentation
messages: 329932
nosy: Shane Smith, docs@python
priority: normal
severity: normal
status: open
title: Minor parameter documentation mismatch for turtle

___
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

2018-11-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 14, 2018, at 10:11, Davin Potts  wrote:
> 
> 
> Davin Potts  added the comment:
> 
> Barry's effort as well as comments in other links seem to all suggest that 
> OBJC_DISABLE_INITIALIZE_FORK_SAFETY is not comprehensive in its ability to 
> make other threads "safe" before forking.

Right.  Setting the env var will definitely not make it thread safe.  My 
understanding (please correct me if I’m wrong!) isn’t that this env var makes 
it safe, just that it prevents the ObjC runtime from core dumping.  So it’s 
still up to the developer to know whether threads are involved or not.  In our 
cases, these are single threaded applications.  I’ve read elsewhere that ObjC 
doesn’t care if threads have actually been spun up or not.

> "Objective-C classes defined by the OS frameworks remain fork-unsafe" (from 
> @kapilt's first link) suggests we furthermore remain at risk using certain 
> MacOS system libraries prior to any call to fork.

Actually, it’s unsafe to call anything between fork and exec.  Note that this 
doesn’t just affect Python; this is a pretty common idiom in other scripting 
languages too, from what I can tell.  It’s certainly very common in Python.

Note too that urllib.request.getproxies() will end up calling into the ObjC 
runtime via _scproxy, so you can’t even use requests after a fork but before 
exec.

What I am still experimenting with is to see if I can define a pthread_atfork 
handler that will initialize the ObjC runtime before fork is actually called.  
I saw a Ruby approach like this, but it’s made more difficult in Python because 
pthread_atfork isn’t exposed to Python.  I’m trying to see if I can implement 
it in ctypes, before I write an extension.

> "To guarantee that forking is safe, the application must not be running any 
> threads at the point of fork" (from @kapilt's second link) is an old truth 
> that we continue to fight with even when we know very well that it's the 
> truth.

True, but do realize this problem affects you even in single threaded 
applications.

> For newly developed code, we have the alternative to employ spawn instead of 
> fork to avoid these problems in Python, C, Ruby, etc.  For existing legacy 
> code that employed fork and now surprises us by failing-fast on MacOS 10.13 
> and 10.14, it seems we are forced to face a technical debt incurred back when 
> the choice was first made to spin up threads and afterwards to use fork.

It’s tech debt you incur even if you don’t spin up threads.  Just fork and do 
some work in the child before calling exec.  If that work enters the ObjC 
runtime (as in the getproxies example), your child will coredump,

> If we didn't already have an "obvious" (zen of Python) way to avoid such 
> problems with spawn versus fork, I would feel this was something to solve in 
> Python.  As to helping the poor unfortunate souls who must fight the good 
> fight with legacy code, I am not sure what to do to help though I would like 
> to be able to help.

*If* we can provide a hook to initialize the ObjC runtime in pthread_atfork, I 
think that’s something we could expose in Python.  Then we can say legacy code 
can just invoke that, and at least you will avoid the worst outcome.

--

___
Python tracker 

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



[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2018-11-14 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2018-11-14 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


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

___
Python tracker 

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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Jules Lasne


Jules Lasne  added the comment:

Fixed in https://github.com/python/python-docs-fr/pull/426

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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Julien Palard


Change by Julien Palard :


--
resolution:  -> works for me
stage: resolved -> patch review

___
Python tracker 

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



[issue35249] Docs Makefile always rebuilds entire doc

2018-11-14 Thread Julien Palard


Change by Julien Palard :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-14 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Closing in favor of issue33725

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



[issue35251] FTPHandler.ftp_open documentation error

2018-11-14 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

On 
https://docs.python.org/3/library/urllib.request.html?highlight=request#ftphandler-objects
 there is the sentence "The login is always done with empty username and 
password.", but in the (not so rare) case I am not missing something here, the 
code does parse the username and password and passes it on to connect_ftp, 
which then uses them. Should we update the docs?

--
components: email
messages: 329936
nosy: barry, lys.nikolaou, r.david.murray
priority: normal
severity: normal
status: open
title: FTPHandler.ftp_open documentation error
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



[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue31354] Fixing a bug related to LTO only build

2018-11-14 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue35252] test_functools dead code after FIXME

2018-11-14 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

In test_functools.TestSingleDispatch.test_invalid_registrations 
(https://github.com/python/cpython/blob/4c596d54aa6a55e9d2a3db78891e656ebbfb63c8/Lib/test/test_functools.py#L2299)
 there is a FIXME with an immediate return afterwards that says that the code 
after the return should only be allowed to run after PEP 560 is implemented. 
Now that it is implemented the dead code should work fine, so the return has to 
be deleted.

--
components: Tests
messages: 329937
nosy: lys.nikolaou
priority: normal
severity: normal
status: open
title: test_functools dead code after FIXME
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



[issue35252] test_functools dead code after FIXME

2018-11-14 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue35251] FTPHandler.ftp_open documentation error

2018-11-14 Thread R. David Murray


Change by R. David Murray :


--
components: +Library (Lib) -email
nosy:  -barry, r.david.murray

___
Python tracker 

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



[issue35253] Linker warning LNK4281

2018-11-14 Thread Jorge Ramos


New submission from Jorge Ramos :

When building python 3.6.7 x64 from source I get multiple warnings:


LINK : LNK4281 - "undesirable base address 0x1D11 for x64 image; set base 
address above 4GB for best ASLR optimization".


after that, the build gives the offending module: 

--
[..\PCbuild\pythoncore.vcxproj]
---

(e.g., there are many others) the .. means whatever parent directory the build 
files are on. I use the following batch file:


Tools\msi\buildrelease.bat -x64 --pgo '-m test -q --pgo'
-

Is this a problem?

--
components: Build
messages: 329938
nosy: neyuru
priority: normal
severity: normal
status: open
title: Linker warning LNK4281
type: compile error
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



[issue34784] Heap-allocated StructSequences

2018-11-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bfb855bef6b428d639693caaf4e4c84cbb8a2f51 by Pablo Galindo in 
branch 'master':
bpo-34784: Implement correct cleanup in PyStructSequence new implementation 
(GH-10536)
https://github.com/python/cpython/commit/bfb855bef6b428d639693caaf4e4c84cbb8a2f51


--

___
Python tracker 

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



[issue35252] test_functools dead code after FIXME

2018-11-14 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

It actually seems like the test after the FIXME is wrong and should be changed 
or deleted altogether. Can someone give a pointer or two on what would be the 
best choice here?

--

___
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

2018-11-14 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I have a reliable way to call *something* in the pthread_atfork prepare 
handler, but I honestly don't know what to call to prevent the crash.

In the Ruby thread, it seemed to say that you could just dlopen 
/System/Library/Frameworks/Foundation.framework/Foundation but that does not 
work for me.  Neither does also loading the CoreFoundation and 
SystemConfiguration frameworks.

If anybody has something that will reliably initialize the runtime, I can post 
my approach (there are a few subtleties).  Short of that, I think there's 
nothing that can be done except ensure that exec is called right after fork.

--

___
Python tracker 

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



[issue22412] Towards an asyncio-enabled command line

2018-11-14 Thread pmpp


Change by pmpp :


--
nosy: +pmpp

___
Python tracker 

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



[issue35254] Process finished with exit code -1073741795 (0xC000001D)

2018-11-14 Thread mengdexiaolian


New submission from mengdexiaolian :

when i run the following script with face_recognition module, there is a 
unnormal exception occurs:
Process finished with exit code -1073741795 (0xC01D)

import face_recognition

encodings = []

filename1 = "catherine.jpg"
image1 = face_recognition.load_image_file(filename1)
print(image1)
encoding1 = face_recognition.face_encodings(image1)[0]
print("bobo",encoding1)
encodings.append(encoding1)
print(encodings)

filename2 = "william.jpg"
image2 = face_recognition.load_image_file(filename2)
encoding2 = face_recognition.face_encodings(image2)[0]
encodings.append(encoding2)
print(encodings)

--
components: Extension Modules
messages: 329942
nosy: mengdexiaolian
priority: normal
severity: normal
status: open
title: Process finished with exit code -1073741795 (0xC01D)
type: compile error
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



[issue35254] Process finished with exit code -1073741795 (0xC000001D)

2018-11-14 Thread Eryk Sun


Eryk Sun  added the comment:

0xC01D is STATUS_ILLEGAL_INSTRUCTION. This is probably due to a third-party 
bug that's corrupting the return address on the stack, so I'm closing this 
issue for now. It can be reopened if the developers of the face_recognition 
module determine that Python itself is at fault.

--
nosy: +eryksun
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type: compile error -> crash

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-11-14 Thread Michael Felt


Michael Felt  added the comment:

Historically, I started this issue because I saw that none of the calls made in 
uuid.py were working for AIX.

I also assumed that they ALL worked already, at least somewhere.

a) one cause is the difference between AIX and (all) others was the letter 
chosen to separate the six fields that from the hexadecimal macaddr. (AIX uses 
'.', others use ':').

b) on AIX only netstat -ia returns a macaddr - so the GETTERS array of routines 
to call could be shorter

c) as the tests accept (I'll call it) no response aka None this was "passing" 
for all calls on AIX, including the mock test which had ":" hard coded into the 
test procedure and the mock data.

d) the current test has to fail (i.e., always return None) when the output is 
coming from netstat because the output layout is fundamentally different. With 
netstat the keyword is in the first-line only and it determines the position, 
or index, of a potential value in the following lines. Other commands, such as 
ifconfig on linux, have the keyword and value on the same line with the keyword 
(position:index) proceeding the value (position:index+1)

All this time I thought this was ONLY and AIX issue but in examining other 
platforms I see that some (e.g., Linux) do not have a macaddr value in netstat 
output - while others do (e.g., macos).

In short, I would appreciate the current PR being merged so that AIX has at 
least basic support. However, I am ready to continue, as a new PR, re-working 
the tests (so that a response of None is at least a warning) when a macaddr is 
not found for a platform - rather than over customization of test_uuid.py (as I 
have started to do here for AIX).

For platforms that do return a macaddr using netstat I would like to hear if 
that platform uses the "inline" method such as the command 'ifconfig' does on 
Linux, or if it is the "header" method such as on AIX and macos.

Thank you for your consideration.

--

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for netstat

2018-11-14 Thread Michael Felt


Change by Michael Felt :


--
title: core logic of uuid.getnode() is broken for AIX - all versions -> core 
logic of uuid.getnode() is broken for netstat

___
Python tracker 

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



[issue35226] mock.call equality surprisingly broken

2018-11-14 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35226] mock.call equality surprisingly broken

2018-11-14 Thread Chris Withers


Chris Withers  added the comment:

Assuming the PR is merged, what do I need to do for 3.7 and 3.6 backports?
There's no doubt a doc for this somewhere, so please just point me at it :-)

--

___
Python tracker 

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