[issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x

2020-06-17 Thread Christian Heimes


Christian Heimes  added the comment:

Commit bb6ec14479f18c32e71e43f2785f177aa17aabbd fixed a problem with tests, so 
the test is now executed. Does FreeBSD have an implementation of memfd_create 
that behaves slightly differently than memfd_create on Linux?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue41020] Could not build the ssl module!

2020-06-17 Thread Christian Heimes


Christian Heimes  added the comment:

I'm closing the ssl related issue. Please follow the documentation to install 
the necessary dependencies.

--
assignee:  -> christian.heimes
components: +SSL
nosy: +christian.heimes
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
type:  -> compile error

___
Python tracker 

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



[issue35018] Sax parser provides no user access to lexical handlers

2020-06-17 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +20136
pull_request: https://github.com/python/cpython/pull/20958

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-06-17 Thread hai shi


Change by hai shi :


--
pull_requests: +20135
pull_request: https://github.com/python/cpython/pull/20957

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-06-17 Thread Ned Deily


Ned Deily  added the comment:


New changeset 0d70a98f449d58311aff3374ab5f203a401fc3bf by Ned Deily in branch 
'3.7':
bpo-40204: Pin Sphinx version to 2.3.1 in Doc/Makefile
https://github.com/python/cpython/commit/0d70a98f449d58311aff3374ab5f203a401fc3bf


--

___
Python tracker 

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



[issue39580] Check for COMMAND_LINE_INSTALL variable in Python_Documentation.pkg

2020-06-17 Thread Ned Deily


Ned Deily  added the comment:


New changeset 966036af0e5e1dff8fedd423d90a246067537345 by Ned Deily in branch 
'3.7':
bpo-39580: add check for CLI installation on macOS
https://github.com/python/cpython/commit/966036af0e5e1dff8fedd423d90a246067537345


--

___
Python tracker 

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



[issue41002] HTTPResponse.read with amt is slow

2020-06-17 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +inada.naoki
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-17 Thread Inada Naoki


Inada Naoki  added the comment:

There is no strict guarantee.

I think ASCII, UTF-8, latin1 with surrogateescape guarantee roundtrip.

Other legacy encodings like cp932 may not roundtrip. But it is not a huge 
problem because only Windows use them typically.
On Windows:

* wchar_t is used in most case, instead of fsencoding
* fsencoding is now UTF-8 by default

In other words, if you are using legacy encoding on Unix, it may be not 
roundtripping.

--

___
Python tracker 

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



[issue41020] Could not build the ssl module!

2020-06-17 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi,

All issue opened seems to be the same:
https://bugs.python.org/issue41019
https://bugs.python.org/issue41018
https://bugs.python.org/issue41017
https://bugs.python.org/issue41016
https://bugs.python.org/issue41015
https://bugs.python.org/issue41014

Maybe should be great close them?

--
nosy: +eamanu

___
Python tracker 

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



[issue41020] Could not build the ssl module!

2020-06-17 Thread Ned Deily


New submission from Ned Deily :

Thank you for your report but please stop filing all of these separate issues. 
:)  As is true on many platforms, you can't build Python on macOS without 
additional third-party libraries.  The Python Developer's Guide, among other 
places, has more information. https://devguide.python.org/setup/#macos-and-os-x

--

___
Python tracker 

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



[issue41020] Could not build the ssl module!

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
components: macOS
files: python.compile.log
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: Could not build the ssl module!
Added file: https://bugs.python.org/file49248/python.compile.log

___
Python tracker 

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



[issue41019] The necessary bits to build these optional modules were not found:

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
components: macOS
files: python.compile.log
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: The necessary bits to build these optional modules were not found:
Added file: https://bugs.python.org/file49247/python.compile.log

___
Python tracker 

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



[issue41018] warning: 'Tk_MainWindow' is deprecated: first deprecated

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
components: macOS
files: python.compile.log
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: warning: 'Tk_MainWindow' is deprecated: first deprecated
Added file: https://bugs.python.org/file49246/python.compile.log

___
Python tracker 

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



[issue41017] warning: 'Tk_Init' is deprecated: first deprecated

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
components: macOS
files: python.compile.log
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: warning: 'Tk_Init' is deprecated: first deprecated
Added file: https://bugs.python.org/file49245/python.compile.log

___
Python tracker 

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



[issue41016] warning: 'Tk_GetNumMainWindows' is deprecated

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
components: macOS
files: python.compile.log
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: warning: 'Tk_GetNumMainWindows' is deprecated
type: enhancement
Added file: https://bugs.python.org/file49244/python.compile.log

___
Python tracker 

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



[issue41014] warning: 'sqlite3_trace' is deprecated

2020-06-17 Thread Sree Vaddi


Change by Sree Vaddi :


--
title: sqlite3_trace deprecated -> warning: 'sqlite3_trace' is deprecated

___
Python tracker 

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



[issue41015] warning: 'sqlite3_enable_shared_cache' is deprecated

2020-06-17 Thread Sree Vaddi


New submission from Sree Vaddi :

details in the attached python.compile.log

--
components: macOS
files: python.compile.log
messages: 371785
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: warning: 'sqlite3_enable_shared_cache' is deprecated
type: enhancement
Added file: https://bugs.python.org/file49243/python.compile.log

___
Python tracker 

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



[issue41014] sqlite3_trace deprecated

2020-06-17 Thread Sree Vaddi


New submission from Sree Vaddi :

details in the attached python.compile.log

--
components: macOS
files: python.compile.log
messages: 371784
nosy: ned.deily, ronaldoussoren, svaddi
priority: normal
severity: normal
status: open
title: sqlite3_trace deprecated
type: enhancement
Added file: https://bugs.python.org/file49242/python.compile.log

___
Python tracker 

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



[issue34820] binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘arcs’)

2020-06-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm seeing this as well when attempting to run an optimised Python 3.8 build on 
an old Debian 9 system (with the curses and socket extension modules).

For example:

cpython/Modules/socketmodule.c: In function ‘PyInit__socket’:
cpython/Modules/socketmodule.c:8304:1: error: the control flow of function 
‘PyInit__socket’ does not match its profile data (counter ‘arcs’) 
[-Werror=coverage-mismatch]
cpython/Modules/socketmodule.c:8304:1: error: the control flow of function 
‘PyInit__socket’ does not match its profile data (counter ‘time_profiler’) 
[-Werror=coverage-mismatch]

That said, I did install missing optional dependendencies and then do a 
reconfigure without doing a "make clean", which is pretty dubious.

So David's assessment here sounds good to me: the bug is that "make clean" 
should be removing the intermediate PGO files, but is currently leaving them 
lying around.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2c2a4f3d8545784c6e4ca8128bfc706916080712 by Victor Stinner in 
branch 'master':
bpo-41006: What's New: less => fewer modules (GH-20955)
https://github.com/python/cpython/commit/2c2a4f3d8545784c6e4ca8128bfc706916080712


--

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1bf7959dce0597e312c6f35476a7cc957fd0323c by Victor Stinner in 
branch 'master':
bpo-41006: Remove init_sys_streams() hack (GH-20954)
https://github.com/python/cpython/commit/1bf7959dce0597e312c6f35476a7cc957fd0323c


--

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20134
pull_request: https://github.com/python/cpython/pull/20955

___
Python tracker 

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



[issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +koobs

___
Python tracker 

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



[issue41013] test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x

2020-06-17 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/152/builds/1024
...
test_makedir (test.test_os.MakedirTests) ... ok
test_mode (test.test_os.MakedirTests) ... ok
Timeout (0:25:00)!
Thread 0x000800b54000 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_os.py", 
line 3520 in test_memfd_create
  ...

--
components: Tests
messages: 371780
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_os.test_memfd_create() fails on AMD64 FreeBSD Shared 3.x
versions: Python 3.10

___
Python tracker 

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



[issue41012] Some code comments refer to removed initfsencoding()

2020-06-17 Thread Manuel Jacob


New submission from Manuel Jacob :

Some code comments refer to initfsencoding(), which was however removed after 
Python 3.7.

--
messages: 371779
nosy: mjacob
priority: normal
severity: normal
status: open
title: Some code comments refer to removed initfsencoding()

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20133
pull_request: https://github.com/python/cpython/pull/20954

___
Python tracker 

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



[issue17110] sys.argv docs should explaining how to handle encoding issues

2020-06-17 Thread Manuel Jacob


Manuel Jacob  added the comment:

The actual startup code uses Py_DecodeLocale() for converting argv from bytes 
to unicode. Since which Python version is it guaranteed that Py_DecodeLocale() 
and os.fsencode() roundtrip?

--
nosy: +mjacob

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4c18fc8f1def7030e5ec5d1ffb9355d7453dc408 by Victor Stinner in 
branch 'master':
bpo-41006: Document the runpy optimization (GH-20953)
https://github.com/python/cpython/commit/4c18fc8f1def7030e5ec5d1ffb9355d7453dc408


--

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20132
pull_request: https://github.com/python/cpython/pull/20953

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. Making more imports lazy doesn't bring much benefit.

--

With the 3 changes, runpy now imports 55 modules, instead of 70.

The startup time is 1.3x faster, 18 ms instead of 24 ms:

Mean +- std dev: [before] 23.7 ms +- 0.4 ms -> [after] 17.8 ms +- 0.6 ms: 1.33x 
faster (-25%)

--

Avoiding itertools and types doesn't bring much benefit:

Mean +- std dev: [after] 17.8 ms +- 0.6 ms -> [WIP] 17.2 ms +- 0.4 ms: 1.03x 
faster (-3%)

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



[issue41011] [venv] record which executable and command were used to create a virtual environment

2020-06-17 Thread Brett Cannon


New submission from Brett Cannon :

When a virtual environment is created, the resulting pyvenv.cfg specifies the 
directory which contained the Python executable and the version of Python (see 
https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L147). 
Unfortunately that may not be enough to work backwards to which binary was used 
to create the virtual environment.

My idea is to add an `executable` and `command` key to pyvenv.cfg which record 
the Python executable name and the command used to construct the virtual 
environment, respectively. The former would disambiguate which exact Python 
interpreter was used, and the `command` key could be used by e.g. virtualenv to 
record what was used to construct the virtual environment. That potentially 
could be used to make recreating a broken virtual environment easier.

--
components: Library (Lib)
messages: 371775
nosy: brett.cannon, vinay.sajip
priority: normal
severity: normal
status: open
title: [venv] record which executable and command were used to create a virtual 
environment
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9e09849d20987c131b28bcdd252e53440d4cd1b3 by Victor Stinner in 
branch 'master':
bpo-41006: importlib.util no longer imports typing (GH-20938)
https://github.com/python/cpython/commit/9e09849d20987c131b28bcdd252e53440d4cd1b3


--

___
Python tracker 

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



[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-06-17 Thread obserience


obserience  added the comment:

I looked into this in greater depth a while back and never followed up.

In "Modules/_tkinter.c"  the Tkapp_Dealloc() function has a commented out check 
that would ensure it isn't called from the wrong thread.

Tkapp_Dealloc(PyObject *self)
{
PyObject *tp = (PyObject *) Py_TYPE(self);
/*CHECK_TCL_APPARTMENT;*/
ENTER_TCL
Tcl_DeleteInterp(Tkapp_Interp(self));
LEAVE_TCL
PyObject_Del(self);
Py_DECREF(tp);
DisableEventHook();
}

If this is uncommented, garbage collection from a non-main thread will fail and 
the object will be leaked.
Adding a warning would be a good idea so the user knows that a memory leak has 
occurred.

**Doing this makes the code safe.** No more crashes. It should be done a bugfix 
regardless of anything else.


>> I propose that the Tkapp object can only be created in the main thread

Restricting interpreter object creation/destruction to the main thread is very 
much an API change that would break any code that puts the interpreter in a 
non-main thread.

Since we're keeping the objects around till the interpreter exits we still 
"leak" the memory and calling the destructor before the process exits has no 
benefits. Directly leaking the memory isn't any worse in terms of memory 
consumption and doesn't break currently working code.


My opinion is we should leak the memory, warn the user and forget about it. TCL 
interpreters are tiny and anyone who was doing this before was crashing their 
application anyway.

A nice to have would be changing the python tkinter code to cleanup the 
references when the associated GUI exits (as it arguably should)
--root.quit() doesn't do what the docs say and is regularly abused(ignore it)
--root.destroy() is more clear cut and a better candidate for adding cleanup 
behavior

implementations:
1)explicitly manage multiple references to the interpreter removing when 
appropriate (messy)
  --remove widget.tk refs on widget.destroy()
  --remove variable._tk when root.destroy() called (requires tracking variables 
with weakrefs)
2)replace root.tk with a weakproxy at initialisation and everything references 
the weakproxy (no other code changes)
3)replace widget.tk and variable._tk with a property that fetches root.tk
  --no weakrefs or explicit cleanup needed
  --**I favor this options**

For all implementations we need code to handle post-cleanup tk retrieval 
failure:
--Calls to root.quit() and other NOP equivalent methods should be ignored
--Variable sets should be ignored but trigger a warning
--Variable reads should RuntimeError since the TCL interpreter is dead

The user can shoot themselves in the foot by grabbing an explicit reference to 
the TCL interpreter but I've never seen that done and now it only causes a 
memory leak (which we can warn about).

Again, the python changes are nice to have but the "Modules/_tkinter.c" 
"CHECK_TCL_APPARTMENT;" macro needs to be uncommented.

I'd be happy to do the python side-changes if that's likely to be accepted.

--
title: tkinter objects garbage collected from non-tkinter thread cause panic 
and core dump -> tkinter objects garbage collected from non-tkinter thread 
cause crash

___
Python tracker 

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



[issue40637] Allow users to disable builtin hash modules on compile time

2020-06-17 Thread miss-islington

miss-islington  added the comment:


New changeset 9a58f03dc21d15c076d051d902ce1d0324db9741 by stratakis in branch 
'3.9':
[3.9] bpo-40637: Do not emit warnings for disabled builtin hashes (GH… 
(GH-20951)
https://github.com/python/cpython/commit/9a58f03dc21d15c076d051d902ce1d0324db9741


--

___
Python tracker 

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



[issue40997] python 3.8.2: datetime.datetime(1969, 1, 1).timestamp() yields OSError

2020-06-17 Thread SilentGhost


SilentGhost  added the comment:

This looks like a duplicate of #37527.

--
nosy: +SilentGhost, belopolsky, p-ganssle
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Timestamp conversion on windows fails with timestamps close to 
EPOCH

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w


martin w  added the comment:

Forgot to add, this applies to all versions, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5

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

___
Python tracker 

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



[issue40637] Allow users to disable builtin hash modules on compile time

2020-06-17 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +20131
pull_request: https://github.com/python/cpython/pull/20951

___
Python tracker 

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



[issue41000] IDLE: only allow single instance

2020-06-17 Thread E. Paine


E. Paine  added the comment:

I appreciate your concerns Terry and I guess I must start by saying as much as 
I like notepad++, I don't like how their instances work. This issue shouldn't 
change any behaviour (from a user's perspective) other than not being able to 
open the same file twice.

The idea is that each group (what we pretend is an instance) will be almost 
completely self-contained. Each instance will have its own shell (they will not 
share, etc.) and the windowed design will remain (for now...).

What they will share is the main tkinter root (Tk instance) and the bottom 
layer of a stack-like file-list system (which I failed to properly describe in 
the original message). Calls will only descend the stack as far as necessary, 
but it allows one group to bring another group's editor to the front when the 
file tries to open a second time (like how an instance can raise any of its 
editors).

The finer details are yet to be confirmed as I don't have any code, but it is 
likely that settings will take effect immediately across all groups and I have 
yet to decide whether the 'window' menu should be unified of per-group.

I understand that the immediate benefits of this issue are not worth the change 
required, however I believe it would be highly beneficial going forward for 
groups to be able to communicate (like my previous example of creating a tabbed 
interface).

--
title: IDLE only allow single instance -> IDLE: only allow single instance

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w


Change by martin w :


--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +easy

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

Good catch. Your approach seems like a good one.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +20130
pull_request: https://github.com/python/cpython/pull/20949

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +20129
pull_request: https://github.com/python/cpython/pull/20948

___
Python tracker 

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



[issue40637] Allow users to disable builtin hash modules on compile time

2020-06-17 Thread miss-islington


miss-islington  added the comment:


New changeset 236a0f5cf022b59dbb6ea17a8e7a677c573d39b9 by stratakis in branch 
'master':
bpo-40637: Do not emit warnings for disabled builtin hashes (GH-20937)
https://github.com/python/cpython/commit/236a0f5cf022b59dbb6ea17a8e7a677c573d39b9


--

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +20128
pull_request: https://github.com/python/cpython/pull/20947

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 98ce7b107e6611d04dc35a4f5b02ea215ef122cf by Victor Stinner in 
branch 'master':
bpo-41006: pkgutil imports lazily re (GH-20939)
https://github.com/python/cpython/commit/98ce7b107e6611d04dc35a4f5b02ea215ef122cf


--

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7824cc05bfe7f8181b21848a52007ddaf5612b9b by Victor Stinner in 
branch 'master':
bpo-41006: collections imports lazily heap (GH-20940)
https://github.com/python/cpython/commit/7824cc05bfe7f8181b21848a52007ddaf5612b9b


--

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3d974b2fc681ddd0ec722cf631008d5941da52b8 by Victor Stinner in 
branch '3.8':
bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945) 
(GH-20946)
https://github.com/python/cpython/commit/3d974b2fc681ddd0ec722cf631008d5941da52b8


--

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread miss-islington


miss-islington  added the comment:


New changeset bb6ec14479f18c32e71e43f2785f177aa17aabbd by Christian Heimes in 
branch 'master':
bpo-41009: fix requires_OS_version() class decorator (GH-20942)
https://github.com/python/cpython/commit/bb6ec14479f18c32e71e43f2785f177aa17aabbd


--
nosy: +miss-islington

___
Python tracker 

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



[issue40999] implicit-int-float-conversion warnings in time and math code

2020-06-17 Thread Mark Dickinson


Mark Dickinson  added the comment:

I think #39277 is related.

--
nosy: +vstinner

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

I created 3 PRs. I have a few more local branches to avoid types and itertools 
imports. I may create PRs for these ones as well.

--

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20127
pull_request: https://github.com/python/cpython/pull/20946

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b39d41ba1b77f7bc51c4d6f6d0e336693192cb3a by Victor Stinner in 
branch '3.9':
bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945)
https://github.com/python/cpython/commit/b39d41ba1b77f7bc51c4d6f6d0e336693192cb3a


--

___
Python tracker 

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



[issue37369] Issue with pip in venv on Powershell in Windows

2020-06-17 Thread Steve Dower


Steve Dower  added the comment:

Hi Miika

Please create a new issue.

It would also be helpful if you gave us some idea of what your username looks 
like, even if you change it a bit to hide it from the internet. The most common 
cause of this error is spaces or non-ASCII characters in your username - hiding 
those makes it impossible to rule out the issue.

--

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


Christian Heimes  added the comment:

Clarification: By "ignored" I mean that the entire class is ignored and none of 
the tests in the class is executed. I ran into the issue when I was working on 
eventfd PR.

--

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

> What needs to happen to get this 15 year old bug fixed? It prevents C++ 
> Python modules from being compiled in situations where the user needs to 
> supply CXXFLAGS.

Someone has to propose a PR, someone else to review it, and a core developer 
has to take the responsibility to merge that PR. So far, there is no PR created.

--

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20126
pull_request: https://github.com/python/cpython/pull/20945

___
Python tracker 

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



[issue38377] test_asyncio.test_events.GetEventLoopTestsMixin.test_get_event_loop_new_process mixin breaks in the Unix environment without working /dev/shm

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 3.0 -> 4.0
pull_requests: +20125
pull_request: https://github.com/python/cpython/pull/20944

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8362893e3fe083df2ec8bb94c28b1a78383eadbf by Victor Stinner in 
branch 'master':
bpo-41003: Fix test_copyreg when numpy is installed (GH-20935)
https://github.com/python/cpython/commit/8362893e3fe083df2ec8bb94c28b1a78383eadbf


--

___
Python tracker 

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



[issue41010] email.message.EmailMessage.get_body

2020-06-17 Thread patrick totzke


New submission from patrick totzke :

I am trying to use EmailMessage.get_body() on the attached spam email.
Although that message may be malformed, I believe that this method should fail 
gracefully.

To reproduce

```
with open('msg', 'rb') as f: 
m = email.message_from_binary_file(f, _class=email.message.EmailMessage) 

 m.get_body()   

---
AttributeErrorTraceback (most recent call last)
 in 
> 1 m.get_body()

/usr/lib/python3.8/email/message.py in get_body(self, preferencelist)
   1016 best_prio = len(preferencelist)
   1017 body = None
-> 1018 for prio, part in self._find_body(self, preferencelist):
   1019 if prio < best_prio:
   1020 best_prio = prio

/usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist)
987 if subtype != 'related':
988 for subpart in part.iter_parts():
--> 989 yield from self._find_body(subpart, preferencelist)
990 return
991 if 'related' in preferencelist:

/usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist)
987 if subtype != 'related':
988 for subpart in part.iter_parts():
--> 989 yield from self._find_body(subpart, preferencelist)
990 return
991 if 'related' in preferencelist:

/usr/lib/python3.8/email/message.py in _find_body(self, part, preferencelist)
976 
977 def _find_body(self, part, preferencelist):
--> 978 if part.is_attachment():
979 return
980 maintype, subtype = part.get_content_type().split('/')

AttributeError: 'str' object has no attribute 'is_attachment'

```

I am on Python 3.8.3 on debian testing.

--
components: Library (Lib)
files: msg
messages: 371755
nosy: patrick totzke
priority: normal
severity: normal
status: open
title: email.message.EmailMessage.get_body
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file49241/msg

___
Python tracker 

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



[issue34908] netrc parsing is overly strict

2020-06-17 Thread Theresa O'Connor


Theresa O'Connor  added the comment:

Emacs' netrc library supports some other keywords, namely 'port'. (This helps 
distinguish SMTP and IMAP auth information for the same machine.)

Documentation is here: 
https://www.gnu.org/software/emacs/manual/html_node/auth/Help-for-users.html

--
nosy: +hober

___
Python tracker 

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



[issue41002] HTTPResponse.read with amt is slow

2020-06-17 Thread Bruce Merry


Change by Bruce Merry :


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

___
Python tracker 

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



[issue40485] Provide an abstraction for a select-able Event

2020-06-17 Thread Christian Heimes


Change by Christian Heimes :


--
dependencies: +Provide wrapper for eventfd

___
Python tracker 

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue10118] Tkinter does not find font

2020-06-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If this is not out of date, it is, and was, a tcl/tk (3rd party) issue.  
tkinter.font.families basically wraps a tk call. 
  return root.tk.splitlist(root.tk.call("font", "families", *args))

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



[issue41009] @support.requires_*_version broken for classes

2020-06-17 Thread Christian Heimes


New submission from Christian Heimes :

The decorators requires_linux_version, requires_freebsd_version, and 
requires_mac_ver don't work as class decorators. Decorated classes are ignored 
completely and not used in tests. The problem affects a couple of tests in 
test_os and maybe more cases.

--
components: Tests
messages: 371752
nosy: christian.heimes
priority: high
severity: normal
status: open
title: @support.requires_*_version broken for classes
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40275: "test.support has way too many imports".

--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-41006: "Reduce number of modules imported by runpy".

--

___
Python tracker 

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



[issue41000] IDLE only allow single instance

2020-06-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am somewhat dubious about this.  IDLE *must* allow side-by-side windows.  
AFAIK, single instance Notepad++ does not allow this.  Tiles rather than only 
tabbed windows can potentially be done with with one process (turtledemo), but 
we are not there yet.  I have no idea how easy it is to enforce 'one process' 
across platforms.

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +20122
pull_request: https://github.com/python/cpython/pull/20941

___
Python tracker 

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



[issue41008] multiprocessing.Connection.poll raises BrokenPipeError on Windows

2020-06-17 Thread David Adam


New submission from David Adam :

On Windows 10 (1909, build 18363.900) in 3.7.7 and 3.9.0b3, poll() on a 
multiprocessing.Connection object can produce an exception:

--
import multiprocessing

def run(output_socket):
for i in range(10):
output_socket.send(i)
output_socket.close()

def main():
recv, send = multiprocessing.Pipe(duplex=False)
process = multiprocessing.Process(target=run, args=(send,))
process.start()
send.close()

while True:
if not process._closed:
if recv.poll():
try:
print(recv.recv())
except EOFError:
process.join()
break

if __name__ == "__main__":
main()
--

On Linux/macOS this prints 0-9 and exits successfully, but on Windows produces 
a backtrace as follows:

  File "mptest.py", line 17, in main
if recv.poll():
  File "C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.179.0_x64__qbz5n2kfra8p0\lib\multiprocessing\connection.py",
 line 262, in poll
return self._poll(timeout)
  File "C:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.179.0_x64__qbz5n2kfra8p0\lib\multiprocessing\connection.py",
 line 333, in _poll
_winapi.PeekNamedPipe(self._handle)[0] != 0):
BrokenPipeError: [WinError 109] The pipe has been ended

--
messages: 371748
nosy: zanchey
priority: normal
severity: normal
status: open
title: multiprocessing.Connection.poll raises BrokenPipeError on Windows
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20121
pull_request: https://github.com/python/cpython/pull/20940

___
Python tracker 

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



[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-17 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum
nosy_count: 5.0 -> 6.0
pull_requests: +20120
pull_request: https://github.com/python/cpython/pull/20921

___
Python tracker 

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



[issue40353] Add an optional "strict" check to zip

2020-06-17 Thread Brandt Bucher


Brandt Bucher  added the comment:

Looks like two issues were created. I'm going to close this one in favor of 
40636, which has PRs attached and is specific to PEP 618.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Provide a strict form of zip (PEP-618) requiring same length 
inputs
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20119
pull_request: https://github.com/python/cpython/pull/20939

___
Python tracker 

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



[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-17 Thread Brandt Bucher


Change by Brandt Bucher :


--
assignee:  -> brandtbucher
components: +Interpreter Core
nosy: +cool-RR
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

> Currently, runpy imports +21 modules:
> * ./python mod.py: Total 33
> * ./python -m mod: Total 54 (+21)

Oops sorry, that's with my local changes!

Currently, runpy imports not less than 37 modules:

* ./python mod.py: Total 33
* ./python -m mod: Total 70 (+37)

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8e34e92caa73259620dd242b92d26edd0949b4ba by Inada Naoki in branch 
'master':
bpo-36346: Make unicodeobject.h C89 compatible (GH-20934)
https://github.com/python/cpython/commit/8e34e92caa73259620dd242b92d26edd0949b4ba


--

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20118
pull_request: https://github.com/python/cpython/pull/20938

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-39791 native hooks for importlib.resources.files (GH-20576)
> https://github.com/python/cpython/commit/843c27765652e2322011fb3e5d88f4837de38c06

This change introduced bpo-41007 "test_importlib logs ResourceWarning: 
test_path.CommonTests.test_importing_module_as_side_effect()" regression.

--
nosy: +vstinner
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41007] test_importlib logs ResourceWarning: test_path.CommonTests.test_importing_module_as_side_effect()

2020-06-17 Thread STINNER Victor


New submission from STINNER Victor :

It seems like the issue was introduced in bpo-39791 by:


commit 843c27765652e2322011fb3e5d88f4837de38c06
Author: Jason R. Coombs 
Date:   Sun Jun 7 21:00:51 2020 -0400

bpo-39791 native hooks for importlib.resources.files (GH-20576)


The warning:

$ ./python -X tracemalloc=20 -m test  test_importlib -m 
test.test_importlib.test_path.CommonTests.test_importing_module_as_side_effect 
-v
== CPython 3.10.0a0 (heads/importlib_typing:d1b0d052cf, Jun 17 2020, 16:09:52) 
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)]
== Linux-5.6.18-300.fc32.x86_64-x86_64-with-glibc2.31 little-endian
== cwd: /home/vstinner/python/master/build/test_python_67972
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 0.44 Run tests sequentially
0:00:00 load avg: 0.44 [1/1] test_importlib
test_importing_module_as_side_effect 
(test.test_importlib.test_path.CommonTests) ... 
/home/vstinner/python/master/Lib/contextlib.py:124: ResourceWarning: unclosed 
file <_io.BufferedReader 
name='/home/vstinner/python/master/Lib/test/test_importlib/data01/utf-8.file'>
  next(self.gen)
Object allocated at (most recent call last):
  File "/home/vstinner/python/master/Lib/unittest/runner.py", lineno 176
test(result)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122
test(result)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122
test(result)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122
test(result)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122
test(result)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 84
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/suite.py", lineno 122
test(result)
  File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 653
return self.run(*args, **kwds)
  File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 593
self._callTestMethod(testMethod)
  File "/home/vstinner/python/master/Lib/unittest/case.py", lineno 550
method()
  File "/home/vstinner/python/master/Lib/test/test_importlib/util.py", lineno 
509
self.execute(data01.__name__, 'utf-8.file')
  File "/home/vstinner/python/master/Lib/test/test_importlib/test_path.py", 
lineno 10
with resources.path(package, path):
  File "/home/vstinner/python/master/Lib/contextlib.py", lineno 117
return next(self.gen)
  File "/home/vstinner/python/master/Lib/importlib/resources.py", lineno 118
opener_reader = reader.open_resource(norm_resource)
  File "/home/vstinner/python/master/Lib/importlib/abc.py", lineno 465
return self.files().joinpath(resource).open('rb')
  File "/home/vstinner/python/master/Lib/pathlib.py", lineno 1238
return io.open(self, mode, buffering, encoding, errors, newline,
ok

--

Ran 1 test in 0.134s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 6.2 sec
Tests result: SUCCESS

--
components: Tests
messages: 371743
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_importlib logs ResourceWarning: 
test_path.CommonTests.test_importing_module_as_side_effect()
versions: Python 3.10

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w


Change by martin w :


--
type:  -> security

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

My local changes removed the following imports from runpy:

- '_heapq',
- '_locale',
- '_sre',
- 'collections.abc',
- 'copyreg',
- 'enum',
- 'heapq',
- 'importlib.abc',
- 'itertools',
- 're',
- 'sre_compile',
- 'sre_constants',
- 'sre_parse',
- 'typing',
- 'typing.io',
- 'typing.re',

--

___
Python tracker 

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



[issue41006] Reduce number of modules imported by runpy

2020-06-17 Thread STINNER Victor


New submission from STINNER Victor :

Currently, the runpy module imports many modules. runpy is used by "python3 -m 
module". I propose to attempt to reduce the number of imports to reduce Python 
startup time.


With my local changes, I reduce Python startup time from 24 ms to 18 ms:

Mean +- std dev: [ref] 24.3 ms +- 0.2 ms -> [patch] 18.0 ms +- 0.3 ms: 1.35x 
faster (-26%)

Timing measured by:

  ./python -m venv env
  python -m pyperf command -v -o patch.json -- env/bin/python -m empty


Currently, runpy imports +21 modules:

* ./python mod.py: Total 33
* ./python -m mod: Total 54 (+21)


Example with attached mod.py:

$ ./python -m mod
['__main__',
 '_abc',
 '_codecs',
 '_collections',
 '_collections_abc',
 '_frozen_importlib',
 '_frozen_importlib_external',
 '_functools',
 '_heapq',
 '_imp',
 '_io',
 '_locale',
 '_operator',
 '_signal',
 '_sitebuiltins',
 '_sre',
 '_stat',
 '_thread',
 '_warnings',
 '_weakref',
 '_weakrefset',
 'abc',
 'builtins',
 'codecs',
 'collections',
 'collections.abc',
 'contextlib',
 'copyreg',
 'encodings',
 'encodings.aliases',
 'encodings.ascii',
 'encodings.latin_1',
 'encodings.utf_8',
 'enum',
 'functools',
 'genericpath',
 'heapq',
 'importlib',
 'importlib._bootstrap',
 'importlib._bootstrap_external',
 'importlib.abc',
 'importlib.machinery',
 'importlib.util',
 'io',
 'itertools',
 'keyword',
 'marshal',
 'operator',
 'os',
 'os.path',
 'pkgutil',
 'posix',
 'posixpath',
 're',
 'reprlib',
 'runpy',
 'site',
 'sre_compile',
 'sre_constants',
 'sre_parse',
 'stat',
 'sys',
 'time',
 'types',
 'typing',
 'typing.io',
 'typing.re',
 'warnings',
 'weakref',
 'zipimport']
Total 70

--
components: Library (Lib)
files: mod.py
messages: 371741
nosy: vstinner
priority: normal
severity: normal
status: open
title: Reduce number of modules imported by runpy
versions: Python 3.10
Added file: https://bugs.python.org/file49240/mod.py

___
Python tracker 

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



[issue40637] Allow users to disable builtin hash modules on compile time

2020-06-17 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
nosy: +cstratak
nosy_count: 2.0 -> 3.0
pull_requests: +20116
pull_request: https://github.com/python/cpython/pull/20937

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-17 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +20115
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20936

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-17 Thread SBC King


SBC King  added the comment:

error was caused by the permission problem with 'xdg-settings'. I checked that 
Google Chrome is my default browser. I tried the following command by changing 
the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, 
and it can successfully open jupyter notebook in the browser Safari:
sudo jupyter notebook. this is just a workaround however.

--

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-17 Thread SBC King


New submission from SBC King :

error was caused by the permission problem with 'xdg-settings'. I checked that 
Google Chrome is my default browser. I tried the following command by changing 
the c.NotebookApp.allow_root to True in the jupyter_notebook_config.py file, 
and it can successfully open jupyter notebook in the browser Safari:
sudo jupyter notebook

--
messages: 371739
nosy: SBC King
priority: normal
severity: normal
status: open
title: Permission denied: 'xdg-settings' when executing 'jupyter notebook' from 
command line
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w


New submission from martin w :

In the ipaddress library there exists two classes IPv4Interface, and 
IPv6Interface. These classes' hash functions will always return 32 and 64 
respectively. If IPv4Interface or IPv6Interface objects then are put in a 
dictionary, on for example a server storing IPs, this will cause hash 
collisions, which in turn can lead to DOS.

The root of this is on line 1421 and 2095. On both lines, self._ip and 
self.network.network_address will both be same, and when xor is applied they 
will cancel eachother out, leaving return self._prefixlen .
Since self._prefixlen is a constant, 32 and 64 respectively, this will lead to 
a constant hash.

The fix is trivial, on line 1421, change to:
return hash((self._ip, self._prefixlen, int(self.network.network_address)))

and on line 2095, change to:
return hash((self._ip, self._prefixlen, int(self.network.network_address)))

--
components: Library (Lib)
messages: 371738
nosy: nnewram
priority: normal
severity: normal
status: open
title: Hash collisions in IPv4Interface and IPv6Interface
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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

The issue can be replaced by a fake numpy module:

$ cat Lib/numpy.py 
import warnings
warnings.simplefilter('ignore', UserWarning)

--

___
Python tracker 

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



[issue41003] test_copyreg: importing numpy changes warnings filters

2020-06-17 Thread STINNER Victor


New submission from STINNER Victor :

This issue is similar to bpo-40055: running test_copyreg fails with ENV_CHANGED 
if numpy is available. Example:

$ ./python -m venv env
$ env/bin/python -m pip install numpy
$ env/bin/python -m test --fail-env-changed -v test_copyreg -m 
== CPython 3.9.0b3+ (heads/getpath_platlibdir39:11462e9847, Jun 11 2020, 
17:49:13) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)]
(...)
Warning -- warnings.filters was modified by test_copyreg
  Before: (140498488250848, [], [])
  After:  (140498488250848, [], [('ignore', re.compile('numpy.ndarray size 
changed', re.IGNORECASE), , None, 0), ('ignore', 
re.compile('numpy.ufunc size changed', re.IGNORECASE), , None, 
0), ('ignore', re.compile('numpy.dtype size changed', re.IGNORECASE), , None, 0), ('always', None, , None, 0)]) 
(...)

--
components: Tests
messages: 371736
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_copyreg: importing numpy changes warnings filters
versions: Python 3.10

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:

> Oh, why I can not use C99?

PEP 7 requires C99 to build Python, but I think that we can try to keep C89 
compatibility for the public header files (Python C API).

--

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +20113
pull_request: https://github.com/python/cpython/pull/20934

___
Python tracker 

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



[issue36346] Prepare for removing the legacy Unicode C API

2020-06-17 Thread Inada Naoki

Inada Naoki  added the comment:

Oh, why I can not use C99?

```
/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:
 In function ‘Py_UNICODE_FILL’:
/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:56:5:
 error: ‘for’ loop initial declarations are only allowed in C99 mode
 for (Py_ssize_t i = 0; i < length; i++) {
 ^
/home/buildbot/buildarea/3.x.cstratak-RHEL7-ppc64le/build/Include/cpython/unicodeobject.h:56:5:
 note: use option -std=c99 or -std=gnu99 to compile your code
```

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2020-06-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 07923f32b16ba39165a58a5f47e807ca04ae17aa by Victor Stinner in 
branch 'master':
bpo-35059: Enhance _PyObject_GC_TRACK() macros (GH-20931)
https://github.com/python/cpython/commit/07923f32b16ba39165a58a5f47e807ca04ae17aa


--

___
Python tracker 

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



  1   2   >