[issue42041] venv subprocess call to python resolves to wrong interpreter

2020-10-14 Thread Mark Keller


New submission from Mark Keller :

Hey,

Wanted to report this weird behavior I saw recently. Let me first explain how 
to reproduce and then talk about where I think the issue comes from.

I attached a tar.gz file with 2 Python files in it.

Here's how to reproduce:
0. Make sure that pytest is unavailable in your command line, or please edit to 
another library that you don't have available from another Python install (make 
sure to update the import statement in `script1.py`).
1. Untar the 2 scripts into current working directory. Note: I reproduced on a 
Windows VM (Version 10.0.18363 Build 18363).
2. Make a Python 3.7, or 3.8 environment venv. Note: I used Python 3.8.2.
3. Activate venv and install pytest in it.
4. Run `python run_scripts.py` and observe the error.

Note: The same thing works on Python 3.6 as expected.

My team observed this issue when virtualenv released this Monday. It changed 
how it works with Windows and Python 3.7+, before it was not using the Windows 
redirect script generated by venv and just worked like how older versions on 
Windows do.
But what we are seeing is that if you start a subprocess call to `python` then 
that gets resolved to the system wide Python binary without the venv 
site-packages being in PYTHONPATH.
So the subprocess will fail when importing pytest in the subprocess.

If this is not clear please don't hesitate to ask me for clarification, or 
refer to https://github.com/pypa/virtualenv/issues/1981 for more debugging info.

Another interesting thing that I noticed is that if you make a subprocess call 
to `pytest` instead then that gets resolved correctly.

--
components: Windows
files: repro.tar.gz
messages: 378665
nosy: keller00, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
priority: normal
severity: normal
status: open
title: venv subprocess call to python resolves to wrong interpreter
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49520/repro.tar.gz

___
Python tracker 

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



[issue35823] Use vfork() in subprocess on Linux

2020-10-14 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Well, much later than promised, but I'm picking it up. Since in the meantime 
support for setting uid/gid/groups was merged, and I'm aware about potential 
issues with calling corresponding C library functions in a vfork()-child, I 
asked a question on musl mailing list: 
https://www.openwall.com/lists/musl/2020/10/12/1

So, it seems we'll need to fallback to fork() if set*id() is needed, which is 
in line with our previous discussion about avoidance of vfork() in privileged 
processes anyway.

I'm also discussing -Wclobbered warnings with a GCC developer. I wouldn't like 
to restructure code just to avoid GCC false positives, so currently I'm leaning 
towards disabling this warning entirely for subprocess_fork_exec() and 
documenting that arbitrary stores to local variables between vfork() and 
child_exec() are not allowed due to stack sharing, but we'll see if a better 
solution emerges.

--
assignee:  -> izbyshev

___
Python tracker 

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



[issue42040] Change IDLE 'more information' splash line, change doc name

2020-10-14 Thread Terry J. Reedy


New submission from Terry J. Reedy :

IDLE currently follows the version and system info line with 
 Type "help", "copyright", "credits" or "license()" for more information.  The 
last 3 are nearly useless, and duplicate the availability of the documents in a 
better format from About IDLE, where such things are usually found.  In any 
case, beginners are not likely to care, and most people will look at most once.

Entering 'help' prints the instruction to enter 'help()' for interaction or 
'help(object)' for info on object.

Proposed replacement:
  Type "help" (no quotes) or click Help above for more information.

On macOS, one must click IDLE for About IDLE, but macOS users should know and 
expect it there (which is why it is moved there on macOS).

Also, the menu entry "IDLE Help" should be "IDLE Doc".  I believe the current 
entry dates to when "IDLE Help" was a separate text from the IDLE doc rather 
than a copy thereof.

PR later.

--
assignee: terry.reedy
components: IDLE
messages: 378663
nosy: taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Change IDLE 'more information' splash line, change doc name
type: enhancement
versions: Python 3.10, 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



[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +Michael.Felt

___
Python tracker 

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



[issue42030] Drop support for dynload_aix

2020-10-14 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue24845] IDLE functional/integration testing

2020-10-14 Thread Tal Einat


Change by Tal Einat :


--
nosy: +taleinat
nosy_count: 4.0 -> 5.0
pull_requests: +21677
pull_request: https://github.com/python/cpython/pull/22682

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2020-10-14 Thread Bug Reporter


Bug Reporter  added the comment:

I reported a bug at 
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1899878

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21676
pull_request: https://github.com/python/cpython/pull/22707

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset d197b2bb3e401bed53987b65a7ceb6c712c4f5bd by Miss Skeleton (bot) 
in branch '3.9':
bpo-41984: GC track all user classes (GH-22701/GH-22702)
https://github.com/python/cpython/commit/d197b2bb3e401bed53987b65a7ceb6c712c4f5bd


--

___
Python tracker 

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



[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Inada Naoki


Inada Naoki  added the comment:

There are many code that an object is tracked/untracked. This API can cause 
fatal error too easily.
I think this API should be exposed only in _testcapi.

--
nosy: +methane

___
Python tracker 

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki


Inada Naoki  added the comment:

Thank you for finding/fixing.

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread miss-islington


miss-islington  added the comment:


New changeset f07448bef48d645c8cee862b1f25a99003a6140e by Miss Skeleton (bot) 
in branch '3.9':
bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)
https://github.com/python/cpython/commit/f07448bef48d645c8cee862b1f25a99003a6140e


--

___
Python tracker 

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread miss-islington


miss-islington  added the comment:


New changeset 47ca6799725bb4c40953bb26ebcd726d1d766361 by Miss Skeleton (bot) 
in branch '3.8':
bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)
https://github.com/python/cpython/commit/47ca6799725bb4c40953bb26ebcd726d1d766361


--

___
Python tracker 

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21675
pull_request: https://github.com/python/cpython/pull/22705

___
Python tracker 

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 2d2af320d94afc6561e8f8adf174c9d3fd9065bc by Kevin Adler in branch 
'master':
bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)
https://github.com/python/cpython/commit/2d2af320d94afc6561e8f8adf174c9d3fd9065bc


--

___
Python tracker 

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



[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +21674
pull_request: https://github.com/python/cpython/pull/22704

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Change by Brandt Bucher :


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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset c13b847a6f913b72eeb71651ff626390b738d973 by Brandt Bucher in 
branch 'master':
bpo-41984: GC track all user classes (GH-22701)
https://github.com/python/cpython/commit/c13b847a6f913b72eeb71651ff626390b738d973


--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21673
pull_request: https://github.com/python/cpython/pull/22703

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +21672
pull_request: https://github.com/python/cpython/pull/22702

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Change by Brandt Bucher :


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

___
Python tracker 

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



[issue42019] Override MagicMock special methods

2020-10-14 Thread Irit Katriel


Irit Katriel  added the comment:

I don't know whether this is intended behaviour of not, but it seems that 
MagicMock's __init__ is setting the magic methods, every time a mock instance 
is created. I was able to achieve what you tried to write with this class 
definition - it sets __len__ after super.__init__ has done what it needs to do.

class MagicMockChild(MagicMock):
def __init__(self):
super().__init__()
self.__len__ = lambda self : 9

This is not intended to be a satisfying answer, just to show what's going on.

--
components: +Library (Lib)
nosy: +iritkatriel

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

Actually, never mind. Because of the way finalization works, we need to create 
untracked *types* for these tests, not untracked *instances*.

PR up soon.

--

___
Python tracker 

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



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-14 Thread Sagar Pant


Change by Sagar Pant :


--
components: +Library (Lib) -C API

___
Python tracker 

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



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-14 Thread Sagar Pant


Change by Sagar Pant :


--
components: +Library (Lib) -C API

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-14 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

The most recent batch of commits added a jump table.
Between master and PR 22679 now, there are 151 cases slower than master and 463 
that faster than master.
The slower cases are at most twice as slow, but the faster cases are often 
10-20x faster.
I could add a cutoff to use a simpler algorithm instead, for needles of length 
less than ~10,
but I wanted to get the "purer" data out before making that change.

The benchmark data is here: https://pastebin.com/raw/bzQ4xQgM

--

___
Python tracker 

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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread ThatXliner


ThatXliner  added the comment:

In the end, I think python's argparse needs more built-in help formatters...


Should I close this?

--

___
Python tracker 

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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread ThatXliner


ThatXliner  added the comment:

Editing the description, etc. seems like a good way to do this. But it seems 
"hacky". The other answer on StackOverflow implements a custom class which does 
nice things, but not what I want.

--

___
Python tracker 

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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread paul j3


paul j3  added the comment:

Some StackOverFlow answers cusomizing this help method:

https://stackoverflow.com/questions/23936145/python-argparse-help-message-disable-metavar-for-short-options

https://stackoverflow.com/questions/18275023/dont-show-long-options-twice-in-print-help-from-argparse

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

I'll hold off until https://bugs.python.org/issue42039 is resolved.

--

___
Python tracker 

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



[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread ThatXliner


ThatXliner  added the comment:

> So if you can get by with just customizing _format_action_invocation, there's 
> no need for further action here.

Then maybe we could just make a new function that takes 2 arguments: Name of 
another action class (or the action class itself), and a tuple of the arg names 
to be displayed. It returns a new action class that contains the help text 
properties of the given action class with customized displayed arg names.


Maybe like

parser.add_argument("-f", "--foo", 
action=argparse.CustomArgName(action="store_true", name=("-F!!", "--FOO!"), 
help="TO foo a bar"))

--

___
Python tracker 

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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread ThatXliner


ThatXliner  added the comment:

Should I rename this to "Argparse: finer control on help txt"

--

___
Python tracker 

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



[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +tim.peters
stage: patch review -> 

___
Python tracker 

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



[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue42039] Add gc.track and gc.untrack

2020-10-14 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

We have C-API calls to track and untrack objects. Having similar calls in 
Python can be usefull to selectively deactivate the garbage collector for some 
objects for performance, debugging or testing purposes. For instance, in 
https://bugs.python.org/issue41984 this could have been very usefull

--
assignee: pablogsal
components: Interpreter Core
messages: 378645
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Add gc.track and gc.untrack
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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread paul j3


paul j3  added the comment:

That method could be customized in a HelpFormatter subclass.  There already are 
several subclasses (documented), and writing your own is allowed, if not 
actually encouraged.

https://docs.python.org/3/library/argparse.html#formatter-class

Adding an extra parameter to 'add_argument', and passing that on through the 
Action class (and subclasses) is, potentially, a bigger task.  

So if you can get by with just customizing _format_action_invocation, there's 
no need for further action here.

I'll look for some examples, here or on SO, of customizing this method.

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In any case, you can expose:

https://docs.python.org/3/c-api/gcsupport.html#c.PyObject_GC_UnTrack

in the testcapi module

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I'm not sure that's true... :)

Oh boy, I need toehemyeah I will be back inone second...

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

> there is gc.untrack()

I'm not sure that's true... :)

Although perhaps track()/untrack() functions *could* be useful to add to the gc 
module... but that's a separate conversation.

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>  I think I can just create a simple utility in _testcapi to untrack instances 
> for this purpose.

I have the feeling that I am misunderstanding what you refer to, but if is 
**untrack** what you need, there is gc.untrack()

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

No problem. I just need to rework some hacks in test_finalization where we use 
empty __slots__ to create non-GC types. I think I can just create a simple 
utility in _testcapi to untrack instances for this purpose.

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks a lot, Brandt for doing the benchmarking!

I think that unpack_sequence is **very** affected by code locality. I was 
debugging it recently with Linux perf 
(https://perf.wiki.kernel.org/index.php/Main_Page) and it shows that is 
extremely affected by L1-L2 cache performance. I still need to understand why, 
but yeah, I am fine ignoring it.

>All things considered, I believe we should fix this... I personally view 
>memory leaks as second only to crashes and incorrect behavior in terms of 
>severity.

Yeah, I very much agree with you. Could you convert your patch into a PR?

--

___
Python tracker 

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



[issue41984] Empty __slots__ can create untracked reference cycles

2020-10-14 Thread Brandt Bucher


Brandt Bucher  added the comment:

Using the following patch:

https://github.com/python/cpython/compare/master...brandtbucher:track-all-heap-types

I got the following pyperformance results (with PGO/LTO and CPU isolation, 
insignificant rows omitted):

2020-10-13_20-04-master-7992579cd27f.json.gz


Performance version: 1.0.0
Report on Linux-4.4.0-190-generic-x86_64-with-glibc2.23
Number of logical CPUs: 8
Start date: 2020-10-14 07:49:46.738847
End date: 2020-10-14 08:12:58.050557

2020-10-13_20-37-track-all-heap-types-63d8d25867b5.json.gz
==

Performance version: 1.0.0
Report on Linux-4.4.0-190-generic-x86_64-with-glibc2.23
Number of logical CPUs: 8
Start date: 2020-10-14 08:29:52.009796
End date: 2020-10-14 08:52:49.230214

+-+--++--+---+
| Benchmark   | 2020-10-13_20-04-master-7992579cd27f.json.gz | 
2020-10-13_20-37-track-all-heap-types-63d8d25867b5.json.gz | Change   | 
Significance  |
+=+==++==+===+
+-+--++--+---+
| chameleon   | 13.7 ms  | 13.1 
ms| 1.04x faster | 
Significant (t=7.27)  |
+-+--++--+---+
| chaos   | 163 ms   | 159 
ms | 1.03x faster | 
Significant (t=5.39)  |
+-+--++--+---+
| crypto_pyaes| 160 ms   | 156 
ms | 1.02x faster | 
Significant (t=7.29)  |
+-+--++--+---+
| deltablue   | 10.9 ms  | 10.7 
ms| 1.03x faster | 
Significant (t=4.36)  |
+-+--++--+---+
| django_template | 73.1 ms  | 71.2 
ms| 1.03x faster | 
Significant (t=4.42)  |
+-+--++--+---+
| go  | 373 ms   | 381 
ms | 1.02x slower | 
Significant (t=-4.71) |
+-+--++--+---+
| nbody   | 206 ms   | 200 
ms | 1.03x faster | 
Significant (t=7.52)  |
+-+--++--+---+
| regex_dna   | 295 ms   | 288 
ms | 1.02x faster | 
Significant (t=5.26)  |
+-+--++--+---+
| richards| 103 ms   | 101 
ms | 1.03x faster | 
Significant (t=5.40)  |
+-+--++--+---+
| scimark_sparse_mat_mult | 6.96 ms  | 7.17 
ms| 1.03x slower | 
Significant (t=-4.93) |

[issue42038] Tracemalloc's format() doc contradictory

2020-10-14 Thread Lisa Roach


New submission from Lisa Roach :

Tracemalloc's format documentation 
(https://docs.python.org/3/library/tracemalloc.html#tracemalloc.Traceback.format)
 says first:

"Format the traceback as a list of lines with newlines."

then:

"Similar to the traceback.format_tb() function, except that format() does not 
include newlines."

The first statement is incorrect, tracemalloc does NOT add newlines to the 
list. I recommend just removing the "with newlines" in the first statement.

--
assignee: docs@python
components: Documentation
messages: 378636
nosy: docs@python, lisroach
priority: low
severity: normal
status: open
title: Tracemalloc's format() doc contradictory
versions: Python 3.10, 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



[issue42038] Tracemalloc's format() doc contradictory

2020-10-14 Thread Lisa Roach


Change by Lisa Roach :


--
keywords: +easy, newcomer friendly

___
Python tracker 

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



[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-14 Thread Tim Peters


Tim Peters  added the comment:

For completeness, a link to the python-dev thread about this:

https://mail.python.org/archives/list/python-...@python.org/thread/ECAZN35JCEE67ZVYHALRXDP4FILGR53Y/#4IEDAS5QAHF53IV5G3MRWPQAYBIOCWJ5

--

___
Python tracker 

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



[issue42024] Exception ignored in: .remove at 0x7f6a325f2ea0>

2020-10-14 Thread Zachary Ware


Zachary Ware  added the comment:

As mentioned in my first message, Python 3.5.4 has been out of support for over 
2.5 years now, and 3.5 as a whole has been out of support for a month now.  
You'll need to show the problem using Python 3.8.6 or 3.9.0 for anything to be 
done about it here.

--

___
Python tracker 

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



[issue42024] Exception ignored in: .remove at 0x7f6a325f2ea0>

2020-10-14 Thread jayesh


jayesh  added the comment:

Please check my attached log file.
In that, I am printing ansible version which shows python 3.5.4.
Let me know any other info required from my side.

--

___
Python tracker 

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



[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


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



[issue42023] Argparse: Add a "display" arg

2020-10-14 Thread ThatXliner


ThatXliner  added the comment:

>However, I can imagine adding a variable that gives the user full control over 
>the action-invocation.  In:

argparse.HelpFormatter._format_action_invocation method.

That's what I'm trying to change. If there was a public API/method for 
manipulating the left side of the help menu.

  (This part) (Manipulatable via help=)

--

___
Python tracker 

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



[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with the other respondents.  This ship has sailed.

--
nosy: +rhettinger

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-10-14 Thread hai shi


hai shi  added the comment:

Thanks for everyone's continus review :)

--

___
Python tracker 

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



[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

I agree that having some of datetime.now([tz]) functionality replicated in 
datetime.today() makes little sense.  However, the presence of this method in 
datetime class is a consequence of datetime being a subclass of the date class. 
The latter was a design mistake IMO, but as other pointed out it is too late to 
do anything about it.

--
assignee:  -> belopolsky

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Hai Shi for the change and for new codecs and encodings tests.

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



[issue41939] 3.9.0 test_site warning: "urllib.requests._opener was modified by test_site"

2020-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

You're welcome ;-)

--

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-10-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c5b049b91ca50c615f9a5425055c2b79a82ac547 by Hai Shi in branch 
'master':
bpo-39337: encodings.normalize_encoding() now ignores non-ASCII characters 
(GH-22219)
https://github.com/python/cpython/commit/c5b049b91ca50c615f9a5425055c2b79a82ac547


--

___
Python tracker 

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



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-14 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue40352] SocketHandler silently drops log messages on re-connect

2020-10-14 Thread Oleg Nykolyn


Oleg Nykolyn  added the comment:

There are multiple servers running in Kubrnetes cluster - API servers based on 
Django, celery workers, etc. All of them send logs to AWS TCP balancer, which 
acts as balancer for vector service[1], which send logs to Elasticsearch.
Basically we have following logging pipeline: python-based services -> AWS TCP 
network balancer -> vector -> Elasticsearch.
AWS network balancer has an option called "Idle timeout" with max value of 3600 
seconds[2].
Log messages are logged successfully at first, but fail(one message gets lost 
on re-connect) if there is gap between messages, corresponding to "Idle 
timeout".

1: https://github.com/timberio/vector
2: 
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#connection-idle-timeout

--

___
Python tracker 

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



[issue42037] Documentation confusion in CookieJar functions

2020-10-14 Thread Markus Israelsson


New submission from Markus Israelsson :

The documentation in 
https://docs.python.org/3.8/library/http.cookiejar.html#http.cookiejar.CookieJar
claims the following for functions add_cookie_header and extract_cookies.

***
The request object (usually a urllib.request.Request instance) must support the 
methods get_full_url(), get_host(), get_type(), unverifiable(), has_header(), 
get_header(), header_items(), add_unredirected_header() and origin_req_host 
attribute as documented by urllib.request.
***


When reading the documentation for Request Objects 
https://docs.python.org/3.8/library/urllib.request.html?highlight=requests#request-objects
there is this:
***
Changed in version 3.4: The request methods add_data, has_data, get_data, 
get_type, get_host, get_selector, get_origin_req_host and is_unverifiable that 
were deprecated since 3.3 have been removed.
***

So basically the documentation claims that if the request object does not 
support functions that are removed then the headers will not be added. The code 
itself seem to do the correct thing however and add the header.

--
assignee: docs@python
components: Documentation
messages: 378624
nosy: docs@python, markus
priority: normal
severity: normal
status: open
title: Documentation confusion in CookieJar functions
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue42036] Unchecked return in Modules/posixmodule.c from multiple function calls

2020-10-14 Thread Sagar Pant

New submission from Sagar Pant :

The return value of a function that is potentially used to initialize a local 
variable is not checked. Therefore, reading the local variable may result in 
undefined behavior.

Our AI analyzer flagged it to be a potential bug as it found another usage of 
the function in the codebase where the return value of the function was checked 
for success/failure before using it’s parameters.

--
components: C API
messages: 378623
nosy: sagar
priority: normal
severity: normal
status: open
title: Unchecked return in Modules/posixmodule.c from multiple function calls
type: enhancement

___
Python tracker 

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



[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Damian Yurzola


Damian Yurzola  added the comment:

Sorry I got my "current" wrong and I can't find the edit button
Here again:


> "How long is it until Christmas?"

# Current implementation
In [23]: datetime.datetime(2020, 12, 25) - datetime.datetime.today()
Out[23]: datetime.timedelta(days=71, seconds=53018, microseconds=941806)

# Hassan's
In [16]: datetime.datetime(2020, 12, 25) - 
datetime.datetime(datetime.datetime.today().year, 
datetime.datetime.today().month, datetime.datetime.today().day)
Out[16]: datetime.timedelta(days=72)

--

___
Python tracker 

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



[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Damian Yurzola


Damian Yurzola  added the comment:

It took me a while to collect my thoughts but here you go.

Advanced users don't have a problem. They'll trade in date or datetime objects 
explicitly. The "proof" is I could not find any github repo with more than one 
start that'll call datetime.today().

The less advanced users are sometime doing datetime.today and then all kinds of 
weird things.

HassanAbouelela has a good point: datetime.today() is a straight forward way to 
get today in a datetime object.


On the topic of:

> "How long is it until Christmas?"

# Current
In [7]: datetime.datetime.today() - datetime.datetime.now()
Out[7]: datetime.timedelta(days=-1, seconds=86399, microseconds=91)

# Hassan's
In [16]: datetime.datetime(2020, 12, 25) - 
datetime.datetime(datetime.datetime.today().year, 
datetime.datetime.today().month, datetime.datetime.today().day)
Out[16]: datetime.timedelta(days=72)


Optimizing for the less advanced user, I believe Hassan's proposal yields the 
more intuitive result.

--

___
Python tracker 

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



[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder

2020-10-14 Thread Veronica Olsen


Veronica Olsen  added the comment:

> AFAIK, tilde expansion is entirely up to your shell rather than Python

Yes, I am uncertain what exactly is going on here. Whatever ends up in the 
sys.pycache_prefix variable is different with the same environment variable 
setting on the two systems. It may simply be an OS quirk. I am running on 
Debian testing after all.

It is clear from the CPython source that Python does nothing with the tilde. It 
eventually calls os.makedirs() in the compile() function, which I guess is when 
my tilde folder was made.

It would perhaps be useful if the os.path.expanduser call was added in the 
cache_from_source() function in importlib?

As for the results from the debug checks:

1)
Debian: GNU bash, version 5.0.18(1)-release (x86_64-pc-linux-gnu)
Ubuntu: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

2)
They both expand ~ to the home folder

3)
They both return ~/test

--

___
Python tracker 

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



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-14 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue30934] Document how to run coverage for repository idlelib files.

2020-10-14 Thread Tal Einat


Tal Einat  added the comment:

See a cross-platform script in PR GH-22694.

--

___
Python tracker 

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



[issue30934] Document how to run coverage for repository idlelib files.

2020-10-14 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue42024] Exception ignored in: .remove at 0x7f6a325f2ea0>

2020-10-14 Thread Zachary Ware


Zachary Ware  added the comment:

Unfortunately, no guarantees that upgrading will fix things for you.  However, 
there's nothing we can do here until you can show that the issue still exists 
in a supported version of Python.

--

___
Python tracker 

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



[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder

2020-10-14 Thread Zachary Ware


Zachary Ware  added the comment:

AFAIK, tilde expansion is entirely up to your shell rather than Python (unless 
you use something like `os.path.expanduser` in your own program).

A few debugging questions:
1) What version of what shell(s) do you have on each system?

2) What value do you get from `TESTVAR=~/test python3 -c 'import 
os;print(os.environ["TESTVAR"])'` on each system?  Is it the same as 
`TESTVAR=~/test printenv | grep TESTVAR`?

3) What results do you get from the same tests as above, but with 
`TESTVAR='~/test'`?

--
nosy: +zach.ware

___
Python tracker 

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



[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-10-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +corona10, petr.viktorin
title: PyType_GetSlot cannot get tp_name -> [C API] PyType_GetSlot cannot get 
tp_name

___
Python tracker 

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



[issue42035] PyType_GetSlot cannot get tp_name

2020-10-14 Thread fancitron

New submission from fancitron :

In the Limited API (where PyTypeObject is opaque), there is no way to retrieve 
the tp_name of a type object.  The PyType_GetSlot() function doesn’t define a 
slot ID Py_tp_name.  This makes it inconvenient to port existing code to the 
Limited API.  Is this intentional?  How to work around this?

--
components: C API
messages: 378616
nosy: fancitron
priority: normal
severity: normal
status: open
title: PyType_GetSlot cannot get tp_name
type: enhancement

___
Python tracker 

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



[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2020-10-14 Thread Sagar Pant


New submission from Sagar Pant :

The return value of a function that is potentially used to initialize a local 
variable is not checked. Therefore, reading the local variable may result in 
undefined behavior.

Our AI analyzer found that this function is called for a total of 43 times. Out 
of these 43 times, the return value from the function call is checked at 42 
instances. This is the only instance where the code misses to check the return 
value for success or failure.

Once such correct reference usage found in Python/hamt.c at line 2805 .

--
components: C API
messages: 378615
nosy: sagar
priority: normal
severity: normal
status: open
title: Unchecked return in Objects/typeobject.c and possible uninitialized 
variables in cls and new_mro
type: enhancement

___
Python tracker 

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



[issue41918] exec fails to take locals into account when running list comprehensions or functions

2020-10-14 Thread Quentin Peter


Quentin Peter  added the comment:

Fails for functions as well:
```
In [4]: exec(compile('print(my_var)\ndef a():\n print(my_var)\na()', '', 
'exec'), globals(), {"my_var": 0})
0
Traceback (most recent call last):

File "", line 1, in 
exec(compile('print(my_var)\ndef a():\n print(my_var)\na()', '', 
'exec'), globals(), {"my_var": 0})

File "", line 4, in 

 File "", line 3, in a

NameError: name 'my_var' is not defined
```

--
title: exec fails to take locals into account when running list comprehensions 
-> exec fails to take locals into account when running list comprehensions or 
functions

___
Python tracker 

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



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2020-10-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +21664
pull_request: https://github.com/python/cpython/pull/22693

___
Python tracker 

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



[issue42033] Seemingly unnecessary complexification of foo(**kw)

2020-10-14 Thread Xavier Morel


New submission from Xavier Morel :

Following bpo-39320 the highly specialised bytecode for vararg calls were 
replaced by simpler ones, but there seems to be at least one area where the 
generated bytecode regressed for possibly no reason?

In Python 3.8, foo(**var) compiles to:

0 LOAD_GLOBAL  0 (foo)
2 BUILD_TUPLE  0
4 LOAD_FAST2 (var)
6 CALL_FUNCTION_EX 1

In Python 3.9, it compiles to:

0 LOAD_GLOBAL  0 (foo)
2 BUILD_TUPLE  0
4 BUILD_MAP0
6 LOAD_FAST2 (var)
8 DICT_MERGE   1
0 CALL_FUNCTION_EX 1

The PR 18141 does not seem to change the implementation of CALL_FUNCTION_EX so 
I would expect that if it was fine with taking the `var` arbitrary mapping 
before it stil is now, and the extra two opcodes (and creation of a dict) is 
unnecessary?

--
messages: 378613
nosy: Mark.Shannon, xmorel
priority: normal
severity: normal
status: open
title: Seemingly unnecessary complexification of foo(**kw)
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



[issue41876] Add __repr__ for Tkinter Font objects

2020-10-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset b4d895336a4692c95b4533adcc5c63a489e5e4e4 by Anatoliy Platonov in 
branch 'master':
bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)
https://github.com/python/cpython/commit/b4d895336a4692c95b4533adcc5c63a489e5e4e4


--

___
Python tracker 

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



[issue41876] Add __repr__ for Tkinter Font objects

2020-10-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue42029] Remove dynload_dl.c

2020-10-14 Thread STINNER Victor


STINNER Victor  added the comment:

Poor IRIX platform :-( Not so long ago (2 years ago?), the bitesnake service 
provided IRIX machines!

--
nosy: +vstinner

___
Python tracker 

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



[issue42014] shutil.rmtree calls onerror with different function than failed

2020-10-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Added Hynek, the original committer of this code.

--
nosy: +giampaolo.rodola, hynek, serhiy.storchaka, tarek
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder

2020-10-14 Thread Veronica Olsen


Veronica Olsen  added the comment:

Correction: The pycache is in fact redirected to the new '~' folder.

In any case, I tested a bit on Debian Bullseye (Python 3.8.6) and Ubuntu 20.04 
(Python 3.8.5) and it seems ~ is not expanded in the environment variable 
Debian. I'm a little uncertain what is the expected behaviour here, but the 
sys.pycache_prefix variable returns different results on the two platforms:

With environment variable set to ~/.pycache on 3.8.6 (on debian testing), I get 
the following:

Python 3.8.6 (default, Sep 25 2020, 09:36:53) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.pycache_prefix
'~/.pycache'
>>> 

Doing the same on 3.8.5 on ubuntu 20.04 produces:

Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.pycache_prefix
'/home/**/.pycache'
>>> 

Still, perhaps the pycache_prefix should expand the ~ on linux?

--

___
Python tracker 

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



[issue41993] Possible issues when remove not completely initialized module from sys.module

2020-10-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 391a544f2a52673f6630c672e89840fd6ac36723 by Miss Skeleton (bot) 
in branch '3.9':
bpo-41993: Fix possible issues in remove_module() (GH-22631) (GH-22647)
https://github.com/python/cpython/commit/391a544f2a52673f6630c672e89840fd6ac36723


--

___
Python tracker 

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



[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder

2020-10-14 Thread Veronica Olsen


New submission from Veronica Olsen :

On Debian Bullseye (testing):

Setting

export PYTHONPYCACHEPREFIX=~/.pycache

has previously worked. With Python 3.8.6, this still works in practice, when 
running python code (the pycache is still redirected), but during 
initialisation, the python3 executable creates an empty folder named "~" in the 
folder where the python exec or a python script is run.

Changing the environment variable to:

export PYTHONPYCACHEPREFIX=$HOME/.pycache

resolves the issue.

Expansion of ~ is of course a bit fickly in general, but 

I assume this is not intended. Deleting those folders from command line is 
rather tricky!

--
components: Interpreter Core
messages: 378607
nosy: vkbo
priority: normal
severity: normal
status: open
title: Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder
type: behavior
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



[issue42011] Documentation for logging.Filter.filter reports the wrong return type

2020-10-14 Thread Necdet Can Atesman


Change by Necdet Can Atesman :


--
keywords: +patch
nosy: +soulmerge
nosy_count: 3.0 -> 4.0
pull_requests: +21663
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22692

___
Python tracker 

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



[issue38250] enum.Flag should be more set-like

2020-10-14 Thread Vedran Čačić

Vedran Čačić  added the comment:

Flag values are _not_ a set of enabled bits.

At least, it is a weird kind of set where a is the same as {a}. That's why I 
mentioned mereology... there is no reasonable "membership", just "inclusion". I 
understand that str is not a perfect analogy, but sets are even more wrong.

--

___
Python tracker 

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



[issue42031] os.makedirs() introduces high memory usage for explorer.exe

2020-10-14 Thread Kevin Kuan


Kevin Kuan  added the comment:

After further investigation. It seems that explorer.exe will use lots of memory 
when folders are rapidly created. The code change simply slows down folder 
creation. Since it is unrelated to python. I am closing this case.

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