[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue40011] Tkinter widget events are of type Tuple

2020-03-18 Thread Hênio Tierra Sampaio

Hênio Tierra Sampaio  added the comment:

Sorry for the similar messages. The second one was to remove the paragraph 
stating that it would be possible to circumvent the problem of the Listbox - it 
is not.

--

___
Python tracker 

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



[issue40011] Tkinter widget events are of type Tuple

2020-03-18 Thread Hênio Tierra Sampaio

Hênio Tierra Sampaio  added the comment:

I'm maintainer for a project for the RaspberryPi, a GUI for OMXPlayer called 
TBOPlayer. This GUI was originally made for Python 2, but with Python 2 
deprecation, I decided to convert it to Python 3. After (supposedly) converting 
all of it I had a surprise to see that the events that worked in the original 
code with Python 2 didn't work anymore in Python 3 with errors like

File "/home/henio/Projetos/tboplayer/lib/tboplayer.py", line 1566, in 
select_track
sel = event.widget.curselection()
AttributeError: 'tuple' object has no attribute 'widget'


And upon investigation, I noticed all the widget events (originally of type 
tkinter.Event) were now of type Tuple. WTF. Ok, I tried to circumvent this by 
using the tuple "attributes", like, in the event

(('17685', '1', '??', '??', '??', '256', '59467466', '??', '212', '11', 
'??', '0', '??', '??', '.!listbox', '5', '1030', '344', '??'),)

I can access the x position of the cursor in relation to the widget by doing:

event[0][8]

Which I did. However, I obviously cannot use any of the Event methods, and this 
way I cannot get the current selection from a Listbox, for example, and trying 
to gives me the exact error mentioned above. This renders TBOPlayer useless as 
the user cannot even select a track for playing.

And unfortunately, I was unable to reproduce this issue with a minimum code, so 
I have no idea what's going on.

This issue comment describes how to reproduce the bug inside of TBOPlyaer: 
https://github.com/KenT2/tboplayer/issues/175#issuecomment-600861514

--

___
Python tracker 

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



[issue38500] PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


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



[issue39947] Make the PyThreadState structure opaque (move it to the internal C API)

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

I added PyInterpreterState_Get() and PyThreadState_GetInterpreter() functions 
to get the interpreter.

--

___
Python tracker 

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



[issue31200] address sanitizer build fails

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

FYI there is bpo-1635741 which tries to cleanup more things at Python exit.

--
nosy: +vstinner

___
Python tracker 

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



[issue36479] Exit threads when interpreter is finalizing rather than runtime.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to close this issue, I don't think that it can be implemented because 
of daemon threads.

--

> This behavior should instead be triggered by the thread's interpreter 
> finalizing rather than the runtime.

What is the motivation for that?

--

take_gil() cannot access interp->finalizing since interp memory is freed during 
Python finalization.

take_gil() can only rely on a global variable like _PyRuntime to check if a 
daemon thread must exit during the Python finalization.

I modified take_gil() recently to fix 2 or 3 different crashes caused by daemon 
threads during Python finalization. Extract of ceval.c:

/* Check if a Python thread must exit immediately, rather than taking the GIL
   if Py_Finalize() has been called.

   When this function is called by a daemon thread after Py_Finalize() has been
   called, the GIL does no longer exist.

   tstate must be non-NULL. */
static inline int
tstate_must_exit(PyThreadState *tstate)
{
/* bpo-39877: Access _PyRuntime directly rather than using
   tstate->interp->runtime to support calls from Python daemon threads.
   After Py_Finalize() has been called, tstate can be a dangling pointer:
   point to PyThreadState freed memory. */
_PyRuntimeState *runtime = &_PyRuntime;
PyThreadState *finalizing = _PyRuntimeState_GetFinalizing(runtime);
return (finalizing != NULL && finalizing != tstate);
}


And simplified take_gil():

static void
take_gil(PyThreadState *tstate)
{
if (tstate_must_exit(tstate)) {
/* bpo-39877: If Py_Finalize() has been called and tstate is not the
   thread which called Py_Finalize(), exit immediately the thread.

   This code path can be reached by a daemon thread after Py_Finalize()
   completes. In this case, tstate is a dangling pointer: points to
   PyThreadState freed memory. */
PyThread_exit_thread();
}

(... logic to acquire the GIL ...)

if (must_exit) {
/* bpo-36475: If Py_Finalize() has been called and tstate is not
   the thread which called Py_Finalize(), exit immediately the
   thread.

   This code path can be reached by a daemon thread which was waiting
   in take_gil() while the main thread called
   wait_for_thread_shutdown() from Py_Finalize(). */
drop_gil(ceval, ceval2, tstate);
PyThread_exit_thread();
}
}

--

___
Python tracker 

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



[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-38865: "Can Py_Finalize() be called if the current interpreter is 
not the main interpreter?".

--
nosy: +vstinner

___
Python tracker 

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



[issue38865] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-36225: "Lingering subinterpreters should be implicitly cleared on 
shutdown".

--

___
Python tracker 

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



[issue40011] Tkinter widget events are of type Tuple

2020-03-18 Thread Hênio Tierra Sampaio

Change by Hênio Tierra Sampaio :


--
title: Widget events are of type Tuple -> Tkinter widget events are of type 
Tuple

___
Python tracker 

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



[issue40011] Widget events are of type Tuple

2020-03-18 Thread Hênio Tierra Sampaio

New submission from Hênio Tierra Sampaio :

I'm maintainer for a project for the RaspberryPi, a GUI for OMXPlayer called 
TBOPlayer. This GUI was originally made for Python 2, but with Python 2 
deprecation, I decided to convert it to Python 3. After (supposedly) converting 
all of it I had a surprise to see that the events that worked in the original 
code with Python 2 didn't work anymore in Python 3 with errors like

File "/home/henio/Projetos/tboplayer/lib/tboplayer.py", line 1566, in 
select_track
sel = event.widget.curselection()
AttributeError: 'tuple' object has no attribute 'widget'


And upon investigation, I noticed all the widget events (originally of type 
tkinter.Event) were now of type Tuple. WTF. Ok, I tried to circumvent this by 
using the tuple "attributes", like, in the event

(('17685', '1', '??', '??', '??', '256', '59467466', '??', '212', '11', 
'??', '0', '??', '??', '.!listbox', '5', '1030', '344', '??'),)

I can access the x position of the cursor in relation to the widget by doing:

event[0][8]

Which I did. However, I obviously cannot use any of the Event methods, and this 
way I cannot get the current selection from a Listbox, for example, and trying 
to gives me the exact error mentioned above. This renders TBOPlayer useless as 
the user cannot even select a track for playing.

I could circumvent this specific problem by keeping track of the previous 
clicked position over the Listbox and do a simple math calculation to get the 
current list item, but that's is very annoying, and not the right way to do it, 
meaning it would make the code more complex than it should be, and making 
maintaing more difficult.

And unfortunately, I was unable to reproduce this issue with a minimum code, so 
I have no idea what's going on.

This issue comment describes how to reproduce the bug inside of TBOPlyaer: 
https://github.com/KenT2/tboplayer/issues/175#issuecomment-600861514

--
components: Tkinter
files: tboplayer.py
hgrepos: 387
messages: 364586
nosy: Hênio Tierra Sampaio
priority: normal
severity: normal
status: open
title: Widget events are of type Tuple
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48982/tboplayer.py

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 50e6e991781db761c496561a995541ca8d83ff87 by Victor Stinner in 
branch 'master':
bpo-39984: Move pending calls to PyInterpreterState (GH-19066)
https://github.com/python/cpython/commit/50e6e991781db761c496561a995541ca8d83ff87


--

___
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()

2020-03-18 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset e176e0c105786e9f476758eb5438c57223b65e7f by Matěj Cepl in branch 
'2.7':
[2.7] closes bpo-38576: Disallow control characters in hostnames in 
http.client. (GH-19052)
https://github.com/python/cpython/commit/e176e0c105786e9f476758eb5438c57223b65e7f


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



[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

I found this issue while working on PR 19066 of bpo-39984.

--
stage: patch review -> 

___
Python tracker 

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



[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39939] Add str methods to remove prefixes or suffixes

2020-03-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sounds good.

--

___
Python tracker 

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



[issue39939] Add str methods to remove prefixes or suffixes

2020-03-18 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

If no one has started, I can draft such a PEP.

--

___
Python tracker 

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



[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
type:  -> performance

___
Python tracker 

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



[issue40010] Inefficient sigal handling in multithreaded applications

2020-03-18 Thread STINNER Victor


New submission from STINNER Victor :

When a thread gets a signal, SIGNAL_PENDING_SIGNALS() sets signals_pending to 1 
and eval_breaker to 1. In this case, _PyEval_EvalFrameDefault() calls 
handle_signals(), but since it's not the main thread, it does nothing and 
signals_pending value remains 1. Moreover, eval_breaker value remains 1 which 
means that the following code will be called before executing *each* bytecode 
instruction.

if (_Py_atomic_load_relaxed(eval_breaker)) {
(...)
opcode = _Py_OPCODE(*next_instr);
if (opcode == SETUP_FINALLY || ...) {
...
}
if (_Py_atomic_load_relaxed(>signals_pending)) {
if (handle_signals(tstate) != 0) {
goto error;
}
}
if (_Py_atomic_load_relaxed(>pending.calls_to_do)) {
...
}

if (_Py_atomic_load_relaxed(>gil_drop_request)) {
...
}
if (tstate->async_exc != NULL) {
...
}
}

This is inefficient.

I'm working on a PR modifying SIGNAL_PENDING_SIGNALS() to not set eval_breaker 
to 1 if the current thread is not the main thread.

--
components: Interpreter Core
messages: 364580
nosy: vstinner
priority: normal
severity: normal
status: open
title: Inefficient sigal handling in multithreaded applications
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



[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-18 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

I've been in touch with the FreeBSD SCTP maintainer and will continue to 
investigate that avenue. 

In the meantime, I'm re-running the last successful 3.x build (382 [1]) to see 
if that fails or not to isolate Cpython code changes as contributing causes

[1] https://buildbot.python.org/all/#/builders/152/builds/382

--

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18420
pull_request: https://github.com/python/cpython/pull/19066

___
Python tracker 

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



[issue39985] str.format and string.Formatter subscript behaviors diverge

2020-03-18 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


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

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-03-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will try to investigate that but it think this is because without 
OBJECT_MODE=64 the value of decimal.MAX_PREC is much lower (42500
instead 99) so whatever is happening downstream with the higher 
does not happen with the lower one.

I will update If I found something useful on what is going on.

--

___
Python tracker 

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



[issue22699] Module source files not found when cross-compiling

2020-03-18 Thread Steve Dower


Steve Dower  added the comment:

Perhaps sysconfig needs an overhaul to be able to handle _PYTHON_PROJECT_BASE 
properly? I see so many values in there that are taken from the running 
interpreter (sys.prefix, for example) that ought to come from the 
cross-compilation target. Wouldn't surprise me if the host's CFLAGS are leaking 
through and adding those extra includes.

--

___
Python tracker 

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



[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-03-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-03-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue39220] constant folding affects annotations despite 'from __future__ import annotations'

2020-03-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d112c600ab3f5e2910345bcc4bfc39439917ed87 by Pablo Galindo in 
branch 'master':
bpo-39220: Do not optimise annotation if 'from __future__ import annotations' 
is used (GH-17866)
https://github.com/python/cpython/commit/d112c600ab3f5e2910345bcc4bfc39439917ed87


--

___
Python tracker 

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



[issue22699] Module source files not found when cross-compiling

2020-03-18 Thread Steve Dower


Steve Dower  added the comment:

Trimmed a bit from setup.py here, but I think this is the cause:

def build_extensions(self):
self.srcdir = sysconfig.get_config_var('srcdir')
self.srcdir = os.path.abspath(self.srcdir)

[SNIP]

# Fix up the autodetected modules, prefixing all the source files
# with Modules/.
moddirlist = [os.path.join(self.srcdir, 'Modules')]

In my build, I've set PYTHON_FOR_BUILD=python3.8, and the contents of 
moddirlist is '/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/Modules'. So it's 
picking the wrong source directory.

I replaced the second line of the function above with:
self.srcdir = os.path.dirname(os.path.abspath(__file__))

Which made things a little better (I can launch my build now), but all the 
-I/usr/* options need to be replaced as well or there are no dynamically loaded 
modules.

--
title: cross-compilation of Python3.4 -> Module source files not found when 
cross-compiling

___
Python tracker 

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



[issue22699] cross-compilation of Python3.4

2020-03-18 Thread Steve Dower


Steve Dower  added the comment:

I'm now hitting this too, on nearly all the compiled modules in the stdlib. One 
example:

building '_codecs_jp' extension
x86_64-my-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse 
--sysroot=/opt/my-generic/0.0.1-dev/sysroots/core2-64-my-linux -fPIC 
-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 
-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-I../Include/internal -I. -IObjects -IInclude -IPython 
-I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/usr/include/python3.8 
-c cjkcodecs/_codecs_jp.c -o build/temp.linux-x86_64-3.8/cjkcodecs/_codecs_jp.o
x86_64-my-linux-gcc: error: cjkcodecs/_codecs_jp.c: No such file or directory
x86_64-my-linux-gcc: fatal error: no input files
compilation terminated.

I think the working directory is incorrect at some stage - note that the first 
two -I would make sense from Modules, but the next three do not.

--
nosy: +steve.dower
versions: +Python 3.8, Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue40008] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


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



[issue40009] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


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



[issue40009] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -Jack Reigns
title: Best Mac Cleaner Apps to Optimize and Speed up your Mac -> Spam
type: performance -> 

___
Python tracker 

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



[issue40009] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue40009] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


Removed file: https://bugs.python.org/file48981/MacOptimizerPro.jpg

___
Python tracker 

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



[issue40008] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue40008] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


Removed file: https://bugs.python.org/file48980/MacOptimizerPro.jpg

___
Python tracker 

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



[issue40008] Spam

2020-03-18 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -Jack Reigns
title: Best Mac Cleaner Software and Optimization Utilities -> Spam
type: performance -> 

___
Python tracker 

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



[issue40009] Best Mac Cleaner Apps to Optimize and Speed up your Mac

2020-03-18 Thread Jack Reigns

New submission from Jack Reigns :

Mac Optimizer Pro's simple drag and drop functionality makes it the best 
program to clean up Mac. Apart from this, you can also select an app and view 
its detailed information so that you know what is hogging up your device’s 
space. Moreover, it lets you clean the cache and rebuild the database 
regardless of the OS version you are using. Other than this, it also has some 
premium features such as software uninstaller and updater to optimize and give 
your Mac’s hard disk the much-needed breathing space.
Call at +1 866-252-2104 for more info or 
visit:- https://www.macoptimizerpro.com/

--
files: MacOptimizerPro.jpg
messages: 364572
nosy: Jack Reigns
priority: normal
severity: normal
status: open
title: Best Mac Cleaner Apps to Optimize and Speed up your Mac
type: performance
Added file: https://bugs.python.org/file48981/MacOptimizerPro.jpg

___
Python tracker 

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



[issue38865] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

This issue became a blocker issue while working on bpo-39984, when I tried to 
move pending calls from _PyRuntimeState to PyInterpreterState.

I wrote PR 19063 to deny calling Py_FinalizeEx() from a subinterpreter.


Eric:
> On the other hand, if the "main" interpreter isn't special after runtime init 
> is done (i.e. a subinterpreter is effectively indistinguishable by nature) 
> then it certainly would not matter which one finalizes (or is active during 
> fork() for that matter).  On top of that, the effort we are making to 
> identify the main interpreter (both in the code and in the docs) becomes 
> unnecessary.

Well. Maybe we will be able to reach this point later, but right now, there are 
concrete implementation issues. The main interpreter remains special. Only the 
main interpreter is allowed to call fork(), spawn daemon threads, handle 
signals, etc.

If we manage to make subinterpreters less special, we can change 
Py_FinalizeEx() again later.


I asked:
> Is Python supposed to magically destroy the 3 interpreters?

Currently, Py_FinalizeEx() fails with a fatal error if there are remaining 
subinterpreters:
---
Fatal Python error: PyInterpreterState_Delete: remaining subinterpreters
Python runtime state: finalizing (tstate=0xfaa1c0)

Abandon (core dumped)
---

IMHO it's a good behavior.

if we want, we can modify Py_FinalizeEx() to magically end subinterpters later. 
The opposite may be more annoying for embedders.

--

___
Python tracker 

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



[issue38865] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39917] new_compiler() called 2nd time causes error

2020-03-18 Thread Todd Levi


Todd Levi  added the comment:

In looking through the setup.py file for uvloop, I see that they purposely do 
not call super().initialize_options() or super().finalize_options() in their 
code if they've already been called once.

I think that is why their code is revealing this problem - the 2nd command to 
be run is inheriting the self.compiler value from the first command since 
build_ext.initialize_options() isn't being called to (re)set self.compiler to 
be None.

I'm not sure if there's a "rule" that says each command must call 
initialize_options() to "sanitize" the object or not but that does explain why 
the 2nd command is seeing a CCompiler object() for self.compiler on the 2nd 
time through.

--

___
Python tracker 

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



[issue40008] Best Mac Cleaner Software and Optimization Utilities

2020-03-18 Thread Jack Reigns


New submission from Jack Reigns :

Mac Optimizer Pro a bunch of tools that can be used to perform various actions 
on your Mac. A number of the tools on offer can be used to clean your Mac.

--
files: MacOptimizerPro.jpg
messages: 364570
nosy: Jack Reigns
priority: normal
severity: normal
status: open
title: Best Mac Cleaner Software and Optimization Utilities
type: performance
Added file: https://bugs.python.org/file48980/MacOptimizerPro.jpg

___
Python tracker 

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


Bar Harel  added the comment:

Patch done, ready for upload.
No http experts for nosy, triage needed.

--
type:  -> behavior

___
Python tracker 

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



[issue28009] Fix uuid.uuid1() core logic of uuid.getnode() needs refresh

2020-03-18 Thread Tal Einat


Tal Einat  added the comment:

Your fix LGTM, Victor.

--

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-03-18 Thread Riccardo Polignieri


Riccardo Polignieri  added the comment:

Three years later, this problem seems on the way to fix itself 
(https://xkcd.com/1822/).

Versioned shebangs (and versioned "/env" shebangs) used to be a more prominent 
issue when you needed a way to tell Python 2 / Python 3 scripts apart. With the 
sunset of Python 2.7-3.3 almost completed, now we have a reasonably homogeneous 
block of inter-compatible Pythons.
True, py.exe won't cope very well with versioned shebangs, but this seems to 
become less and less annoying by the day.

As for the other problem from issue 39785, ie Python 2 still being selected as 
"default" in deference to some arcane Linux convention that we have been 
dragging for ten years (even on Windows!)... it would be nice to finally have 
*that* fixed. 
But then again, having Python 2 installed on your Windows box is becoming 
increasingly rare. Most users are likely never hitting this weirdness any more. 



In the meantime, now we have yet another way of installing Python on Windows... 
versioned executables from the Store! With no py.exe! So, who knows, maybe 
py.exe is the past, versioned executable are the future...

To sum up, while I would certainly add a note to the docs, to clarify that 
py.exe does not support versioned "/env" shebangs, IMO today the work needed to 
specify a behaviour for all possible cases, possibly even extending/modifying 
Linux conventions, is just too much to be worth the effort.

--

___
Python tracker 

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



[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-18 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

How's that for service ;)

Glad to hear it worked. I'm going to close this as won't fix (as it was 
reported against 3.7 and 3.8 and changing it for them would be 
backward-incompatible, even if more correct). Please report back if that 
outcome is unsatisfactory.

--

___
Python tracker 

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



[issue39980] importlib.resources.path() may return incorrect path when using custom loader

2020-03-18 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
resolution:  -> wont fix
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



[issue40007] An attempt to make asyncio.transport.writelines (selector) use Scatter I/O

2020-03-18 Thread tzickel


New submission from tzickel :

I have a code that tries to be smart and prepare data to be chunked efficiently 
before sending, so I was happy to read about:

https://docs.python.org/3/library/asyncio-protocol.html#asyncio.WriteTransport.writelines

Only to see that it simply does:

self.write(b''.join(lines))

So I've attempted to write an version that uses sendmsg (scatter I/O) instead 
(will be attached in PR).

What I've learnt is:
1. It's hard to benchmark (If someone has an good example on checking if it's 
worth it, feel free to add such).
2. sendmsg has an OS limit on how many items can be done in one call. If the 
user does not call writer.drain() it might have too many items in the buffer, 
in that case I concat them (might be an expensive operation ? but that should 
not be th enormal case).
3. socket.socket.sendmsg can accept any bytes like iterable, but os.writev can 
only accept sequences, is that a bug ?
4. This is for the selector stream socket for now.

--
components: asyncio
messages: 364565
nosy: asvetlov, tzickel, yselivanov
priority: normal
pull_requests: 18416
severity: normal
status: open
title: An attempt to make asyncio.transport.writelines (selector) use Scatter 
I/O
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Tim Peters


Tim Peters  added the comment:

u1 is a global _only_ in a process that runs `function()`, which declares u1 
global and assigns it a value.  You have no sane expectation that a worker 
process (none of which run `function()`) will know anything about it.

Are you sure you're running 2.7 and 3.7 on the same machine?  It's impossible 
that this code ever "worked" under Windows, but it might under Linux-y systems, 
which use `fork()` to create worker processes.

The traceback you showed was obviously run under Windows.  Under Python 2.7.11 
on Windows, I get the same kind of error:

NameError: global name 'u1' is not defined

This is the code:

from multiprocessing import Pool
import traceback

class Utils:
def __init__(self):
   self.count = 10

def function():
global u1
u1 = Utils()
l1 = range(3)
process_pool = Pool(1)
try:
process_pool.map(add, l1, 1)
process_pool.close()
process_pool.join()
except Exception as e:
process_pool.terminate()
process_pool.join()
print(traceback.format_exc())
print(e)

def add(num):
 total = num + u1.count
 print(total)

if __name__ == "__main__":
function()

--
nosy: +tim.peters

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Bharat Solanki


Bharat Solanki  added the comment:

u1 is global variable. So I can use it any where. Rigth!

Thanks
Bharat

On Thu, Mar 19, 2020, 2:09 AM Bharat Solanki  wrote:

>
> Bharat Solanki  added the comment:
>
> When you run this test.py in 2.7. you will get output (10 11 20), But in
> 3.7, Its getting failed. Its showing below error:
>
> "Traceback (most recent call last):
>   File "test.py", line 14, in function
> process_pool.map(add, l1, 1)
>   File "C:\Users\Bharat Solanki\Anaconda3\lib\multiprocessing\pool.py",
> line 268, in map
> return self._map_async(func, iterable, mapstar, chunksize).get()
>   File "C:\Users\Bharat Solanki\Anaconda3\lib\multiprocessing\pool.py",
> line 657, in get
> raise self._value
> NameError: name 'u1' is not defined"
>
> Please let me know if you need any other information.
>
> Thanks
> Bharat
>
> --
> Added file: https://bugs.python.org/file48979/test.py
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Bharat Solanki


Bharat Solanki  added the comment:

When you run this test.py in 2.7. you will get output (10 11 20), But in 3.7, 
Its getting failed. Its showing below error: 

"Traceback (most recent call last):
  File "test.py", line 14, in function
process_pool.map(add, l1, 1)
  File "C:\Users\Bharat Solanki\Anaconda3\lib\multiprocessing\pool.py", line 
268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
  File "C:\Users\Bharat Solanki\Anaconda3\lib\multiprocessing\pool.py", line 
657, in get
raise self._value
NameError: name 'u1' is not defined"

Please let me know if you need any other information.

Thanks 
Bharat

--
Added file: https://bugs.python.org/file48979/test.py

___
Python tracker 

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



[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2020-03-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue40006] enum: Add documentation for _create_pseudo_member_ and composite members

2020-03-18 Thread Ram Rachum


New submission from Ram Rachum :

Looking at the enum source code, there's a method `_create_pseudo_member_` 
that's used in a bunch of places. Its docstring says "Create a composite member 
iff value contains only members", which would have been useful if I had any 
idea what "composite member" meant.

It would be good if the documentation for the enum module would include more 
information about these two concepts.

--
assignee: docs@python
components: Documentation
messages: 364561
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: enum: Add documentation for _create_pseudo_member_ and composite members
type: enhancement
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Eric V. Smith


Eric V. Smith  added the comment:

Note that 2.7 is no longer supported.

If you think you found a bug in 3.7, then please:
- Reformat your code so that we can understand it.
- Show us what output you actually get.
- Show us what output you expect, and why.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-18 Thread Bharat Solanki


New submission from Bharat Solanki :

Hi Team,

Below code is giving different result in python 2.7 and 3.7 version. Code is 
running fine when i am using 2.7 but in 3.7, it is showing error.  

from multiprocessing import Pool
import traceback
class Utils: def __init__(self): self.count = 10

def function(): global u1 u1 = Utils() l1 = range(3) process_pool = Pool(1) 
try: process_pool.map(add, l1, 1) process_pool.close() process_pool.join() 
except Exception as e: process_pool.terminate() process_pool.join() 
print(traceback.format_exc()) print(e)
def add(num): total = num + u1.count print(total)
if __name__ == "__main__": function()

Could you please help me on this how can it run in 3.7 version.

Thanks,
Bharat

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 364559
nosy: Bharatsolanki
priority: normal
severity: normal
status: open
title: Getting different result in python 2.7 and 3.7.
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue21087] imp.frozen_init() incorrectly removes module during reload

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

No one has cared in nearly 6 years, so I'm closing as "won't fix". :)

--
resolution:  -> wont fix
stage: test needed -> 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



[issue20890] Miscellaneous PEP 101 additions

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

These parts of the devguide don't seem to exist anymore, so I'm closing as 
outdated.

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



[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel


Bar Harel  added the comment:

For reference, docs already state:

"On encountering an invalid cookie, CookieError is raised, so if your cookie 
data comes from a browser you should always prepare for invalid data and catch 
CookieError on parsing."

--

___
Python tracker 

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



[issue20899] Nested namespace imports do not work inside zip archives

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20613] Wrong line information in bytecode generated by compiler module

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

Since 2.7 development is done there is no compiler packages anymore to worry 
about. :)

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



[issue21078] multiprocessing.managers.BaseManager.__init__'s "serializer" argument is not documented

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20459] No Argument Clinic documentation on how to specify a return converter

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20360] inspect.Signature could provide readable expressions for default values for builtins

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20439] inspect.Signature: Add Signature.format method to match formatargspec functionality

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20341] Argument Clinic: add "nullable ints"

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20461] Argument Clinic included return converters hard code use of ``_return_value``

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20506] Command to display all available Import Library

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

When a replacement for pkgutil.walk_packages() is added to importlib to work 
appropriately with the import system then this should be doable. See 
https://bugs.python.org/issue19939 for work to replace pkgutil as appropriate.

--

___
Python tracker 

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



[issue20123] pydoc.synopsis fails to load binary modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20205] inspect.getsource(), P302 loader and '<..>' filenames

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue20125] We need a good replacement for direct use of load_module(), post-PEP 451

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

I don't think this is still needed as the importlib docs now has enough 
examples to show people how to get to get similar results with a few method 
calls.

--
resolution:  -> out of date
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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

> Same bug on AMD64 FreeBSD Non-Debug 3.x:
> https://buildbot.python.org/all/#/builders/214/builds/472

Oh, test_crash failed twice, but not on the same test case:

* ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) [crash 
during func execution on worker]
* ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest) [crash 
during func execution on worker]

The second failure was when test_concurrent_futures was re-run sequentially.

--

___
Python tracker 

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



[issue21242] Generalize configure check for working Python executable

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
resolution:  -> out of date
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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8849e5962ba481d5d414b3467a256aba2134b4da by Victor Stinner in 
branch 'master':
bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)
https://github.com/python/cpython/commit/8849e5962ba481d5d414b3467a256aba2134b4da


--

___
Python tracker 

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



[issue21459] DragonFlyBSD support

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21108] Add examples for importlib in doc

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

There are now examples in the importlib docs.

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



[issue21249] removing pythonXY.zip from sys.path results in additional test failures

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8849e5962ba481d5d414b3467a256aba2134b4da by Victor Stinner in 
branch 'master':
bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)
https://github.com/python/cpython/commit/8849e5962ba481d5d414b3467a256aba2134b4da


--

___
Python tracker 

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



[issue21199] [2.7] Python on 64-bit Windows uses signed 32-bit type for read length

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3 doesn't have this issue. Python 2 no longer accepts bugfixes. I close 
the issue.

Note: there was a similar issue specific to macOS: bpo-24658 and PR 9938 
(closed since Python 2 moved to end of life).

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
title: Python on 64-bit Windows uses signed 32-bit type for read length -> 
[2.7] Python on 64-bit Windows uses signed 32-bit type for read length

___
Python tracker 

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



[issue21243] Auto-generate exceptions.c from a Python file

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


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



[issue21242] Generalize configure check for working Python executable

2020-03-18 Thread Brett Cannon


Brett Cannon  added the comment:

`make regen-all` has probably taken care of this.

--

___
Python tracker 

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

Same bug on AMD64 FreeBSD Non-Debug 3.x:
https://buildbot.python.org/all/#/builders/214/builds/472

==
ERROR: test_crash 
(test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) [crash 
during func execution on worker]
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_concurrent_futures.py",
 line 1119, in test_crash
executor.shutdown(wait=True)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/concurrent/futures/process.py",
 line 721, in shutdown
self._executor_manager_thread_wakeup.wakeup()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/concurrent/futures/process.py",
 line 93, in wakeup
self._writer.send_bytes(b"")
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 416, in _send_bytes
self._send(header + buf)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/multiprocessing/connection.py",
 line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor

Stdout:
8.35s 

Stderr:
Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 
3)
Dangling thread: <_MainThread(MainThread, started 34369908736)>
Dangling thread: <_ExecutorManagerThread(Thread-114, stopped daemon 
34396434432)>
Dangling thread: 

--

--

___
Python tracker 

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



[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

trip_signal() has another problem. If pending->finishing is non-zero, 
_PyEval_AddPendingCall() uses the C API whereas the current thread may not hold 
the GIL. That's forbidden by the C API.

The more I think about it, the more I think that pending->finishing is fragile 
and should be removed.

I understood that pending->finishing was added to workaround crashes during 
Python finalization. I fixed multiple crashes related to daemon threads during 
Python finalization in bpo-39877. Maybe the bugs that I fixed were the ones 
which pending->finishing was supposed to work around.

--

___
Python tracker 

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



[issue21614] Case sensitivity problem in multiprocessing.

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


STINNER Victor  added the comment:

My notes on Python finalization: 
https://pythondev.readthedocs.io/finalization.html

--

___
Python tracker 

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



[issue21577] Help for ImportError should show a more useful signature.

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
versions: +Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor

STINNER Victor  added the comment:

> pending->finishing was addd in bpo-33608 by the change: commit 
> 842a2f07f2f08a935ef470bfdaeef40f87490cfc

Since this change, Py_AddPendingCall() now requires the thread to have a Python 
thread state: it is used if pending->finishing is non-zero.

The function documentation says:

"This function doesn’t need a current thread state to run, and it doesn’t need 
the global interpreter lock."

https://docs.python.org/dev/c-api/init.html#c.Py_AddPendingCall

The current implementation seems to contradict the documentation.

We may update the documentation to replace "doesn't need" with "requires" (a 
Python thread state).

Or the implementation can use PyGILState_Ensure() and PyGILState_Release() to 
create a temporary Python thread state if the thread doesn't have one.

Removing pending->finishing would only partially fix the issue. With PR 19061, 
tstate is required to access "ceval" structure.

trip_signal() called by the C signal handler has a similar issue: it only 
requires non-NULL tstate if pending->finishing is non-zero.

--

___
Python tracker 

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



[issue21550] Add Python implementation of the tar utility

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21760] inspect documentation describes module type inaccurately

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21737] runpy.run_path() fails with frozen __main__ modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21736] Add __file__ attribute to frozen modules

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue21724] resetwarnings doesn't reset warnings registry

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +18415
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/19061

___
Python tracker 

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



[issue39984] Move some ceval fields from _PyRuntime.ceval to PyInterpreterState.ceval

2020-03-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18414
pull_request: https://github.com/python/cpython/pull/19061

___
Python tracker 

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



[issue22858] unittest.__init__:main shadows unittest.main

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue22789] Compress the marshalled data in PYC files

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue22543] -W option cannot use non-standard categories

2020-03-18 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



  1   2   >