[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 4dd2112a1d26e03b605bed0f89e3678041ad1490 by Miss Islington (bot) 
in branch '3.9':
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
https://github.com/python/cpython/commit/4dd2112a1d26e03b605bed0f89e3678041ad1490


--

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset c076d488059c96e97936f4d669e32aea0994886f by Miss Islington (bot) 
in branch '3.8':
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
https://github.com/python/cpython/commit/c076d488059c96e97936f4d669e32aea0994886f


--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2020-11-19 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +22312
pull_request: https://github.com/python/cpython/pull/23419

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22311
pull_request: https://github.com/python/cpython/pull/23418

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +22310
pull_request: https://github.com/python/cpython/pull/23417

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 7ddbaa7a1b3e61847ee99658be6a7268a049e302 by Terry Jan Reedy in 
branch 'master':
bpo-42416: Use inspect.getdoc for IDLE calltips (GH-23416)
https://github.com/python/cpython/commit/7ddbaa7a1b3e61847ee99658be6a7268a049e302


--

___
Python tracker 

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



[issue42414] unable to document fields of dataclass

2020-11-19 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 6.0 -> 7.0
pull_requests: +22308
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23415

___
Python tracker 

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



[issue42416] IDLE calltip.get_argspec: use inspect.getdoc, comment fob

2020-11-19 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Followup to PR-23393 of #1635741.  Use inspect.getdoc to get docstrings.  
Restore test skipped in that PR and fix two that will fail because getdoc gets 
docstrings that are currently missed.

The line defining fob is only needed to get signatures for instances of classes 
with faulty getattr and __call__.  inspect.signature is allowed to fail for 
buggy objects, but this workaround makes it work anyway for CallA() and CallB() 
in test_buggy_getattr_class.  Add comment.

--
assignee: terry.reedy
components: IDLE
messages: 381462
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE calltip.get_argspec: use inspect.getdoc, comment fob
type: behavior
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



[issue42414] unable to document fields of dataclass

2020-11-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Steve Dower


Steve Dower  added the comment:

There is no ARM64 release of Python for Windows right now, so unfortunately 
this doesn't constitute any kind of bugfix. We don't have a buildbot, and 
nobody out there has CI, so it's not a supported platform.

I get that it's easier to centrally fix all the third-party packages by 
changing the core library, but we've been saying for nearly 10 years that 
distutils shouldn't be used and shouldn't be assumed to be up to date. Anyone 
building on msvc9compiler.py has been broken since Python 3.5, because they've 
been using the wrong compiler.

A change to _msvccompiler.py for 3.10 can be considered, though you will need 
to get it ready before PEP 632 is accepted, at which point we close all 
distutils-related issues and only reopen for critical bugs.

--

___
Python tracker 

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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread Alex Gaynor


Change by Alex Gaynor :


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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread Alex Gaynor


Change by Alex Gaynor :


--
components: +C API

___
Python tracker 

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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread Steve Dower


Steve Dower  added the comment:

Yeah, this will be our fault.

Someone is looking into automatically generating the .def file so that this 
stops happening. Last time we tried that there was a lot of pushback because 
"too many APIs will become stable", but this time I think we're just going to 
force those devs to care for their APIs properly.

(I'm blanking right now on who was working on this... anyone remember?)

--

___
Python tracker 

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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread Alex Gaynor


Alex Gaynor  added the comment:

This looks like a bug to me. While 
https://github.com/python/cpython/commit/2ff58a24e8a1c7e290d025d69ebaea0bbead3b8c
 added it to the header, it did not add it to 
https://github.com/python/cpython/blob/master/PC/python3dll.c which is required.

--
components: +Extension Modules
nosy: +alex

___
Python tracker 

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



[issue42415] python3.lib in Python3.9.0 Windows distribution does not contain PyObject_CallNoArgs symbol

2020-11-19 Thread David Hewitt


New submission from David Hewitt :

I'm unsure if this is a packaging error or a misunderstanding by me.

I'm trying to link a binary on windows with Py_LIMITED_API set. According to 
https://www.python.org/dev/peps/pep-0384/#linkage I _think_ I'm supposed to be 
linking against python3.lib (instead of python39.lib).

However my build fails because the PyObject_CallNoArgs symbol is not present in 
python3.lib

I see that the symbol is indeed present in python39.lib

Is this a misunderstanding on my part? I was under the impression that 
python3.lib will only contain symbols available in the limited api, and that 
(since 3.9) PyObject_CallNoArgs is part of the limited api.

--
components: Windows
messages: 381458
nosy: David Hewitt, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: python3.lib in Python3.9.0 Windows distribution does not contain 
PyObject_CallNoArgs symbol
type: compile error
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



[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu


Adrian Vladu  added the comment:

This fix is __required__ to build a lot of important packages in the python 
ecosystem, like numpy, pandas, pywin32 and probably a lot more, as most of 
these important packages have not migrated to setuptools and usually maintain 
support for multiple python versions.

I know that there is a way to change all the packages to use the canonical 
approach to compile things, but most of them have a tweaked compiler on top of 
the msvc9compiler.py compiler. I do not see a change in all the python packages 
to happen as fast as a small backwards compatible commit in the main cpython 
code. I see this commit as a fix for the win-arm64 package build and not an 
"extra" feature.

As I can see it, not adding this fix here will require a split of trees that 
are going to be used just for this reason.

I will add the fix to setuptools too, but that will not change the above 
(maintaining separate branches for people who want to use those packages).

--

___
Python tracker 

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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-19 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Perfect!

We have a consensus now and waiting for a champion who propose a Pull Request.

--

___
Python tracker 

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



[issue42414] unable to document fields of dataclass

2020-11-19 Thread John-Mark Gurney


New submission from John-Mark Gurney :

per: https://bugs.python.org/issue38401

There is not a way to document fields of a dataclass.

I propose that instead of making a language change, that an additional 
parameter to the field be added in similar vein to property.

This currently works:
```
class Foo:
 def getx(self):
  return 5
 x = property(getx, doc='document the x property')
```

So, I propose this:
```
@dataclass
class Bar:
 x : int = field(doc='document what x is')
```

This should be easy to support as I believe that the above would not require 
any changes to the core language.

--
messages: 381455
nosy: jmg
priority: normal
severity: normal
status: open
title: unable to document fields of dataclass

___
Python tracker 

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



[issue42063] More options to http.server & SimpleHTTPRequestHandler

2020-11-19 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-19 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue42413] Replace custom exception socket.timeout with TimeoutError

2020-11-19 Thread Christian Heimes


New submission from Christian Heimes :

The socket module has a custom timeout exception "socket.timeout". The 
exception is documented 
https://docs.python.org/3/library/socket.html#socket.timeout as :

> A subclass of OSError, this exception is raised when a timeout occurs on a 
> socket which has had timeouts enabled via a prior call to settimeout() (or 
> implicitly through setdefaulttimeout()).

It's a distinct exception type and not the same as the global TimeoutError.

>>> import socket
>>> socket.timeout == TimeoutError
False

I like to follow the example of the deprecated "socket.error", replace the 
custom exception and make it an alias of TimeoutError. The risk is minimal. 
Both exceptions are subclasses of OSError.

The change would not only make exception handling more consistent. It would 
also allow me to simplify some code in ssl and socket C code. I might even be 
able to remove the socket CAPI import from _ssl.c completely.

--
assignee: christian.heimes
components: Extension Modules
messages: 381454
nosy: alex, christian.heimes, corona10, dstufft, janssen, vstinner
priority: normal
severity: normal
status: open
title: Replace custom exception socket.timeout with TimeoutError
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



[issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments

2020-11-19 Thread Paul Ganssle


Paul Ganssle  added the comment:

One question I would have about this is that `.parents` is a lazily-calculated 
sequence, not a list or a tuple, so it's not immediately obvious what the 
return type of a slice would be. I don't think it makes sense to return, e.g. a 
`_PathParents` object with fewer parts, but I don't know if there's any 
traditional choice here, other than that the result of slicing Sequence is 
another Sequence.

The PR returns a list, but I'm inclined to say we should return a tuple.

--
nosy: +p-ganssle
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



[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-11-19 Thread Paul Ganssle

Paul Ganssle  added the comment:

I am not seeing any compelling reasons to avoid supporting negative indexes 
*or* slices here.

If I had to guess about the confusing semantics of negative indices, I would 
guess it's the fact that the index in the -1 position for a non-empty Path will 
always be `Path('.')`. Since that's not terribly useful, it might be reasonable 
to have negative indices start counting at `len(p)-2`.

That said, I don't think this is a big deal, and I think we have more 
speculation on why this was avoided in the first place than we have actual 
objections to changing it, so I vote for changing it.

I think our best option is to say that the semantics of indexing `.parents` 
should be the same as indexing the result of casting it to a tuple, so this 
should be true:

p = Path(x)
assert p.parents[y] == tuple(p.parents)[y]

For all values of `x` and `y`.

I've gone ahead and changed the version support matrix to 3.10 only, since I 
think that this was a deliberate choice and we should be considering this an 
enhancement rather than a bugfix. That said, I'll admit that it's on the 
borderline — the semantics of sequences are unambiguous (see, which says that 
sequences support both slices and negative indices: 
https://docs.python.org/3/library/stdtypes.html#typesseq ), and PEP 428 
explicitly says that .parents returns a "an immutable sequence of the path's 
logical ancestors": 
https://www.python.org/dev/peps/pep-0428/#sequence-like-access . So if someone 
is motivated to try and make the case that this is a bugfix that could be 
backported to earlier supported versions, I won't stand in their way.

--
nosy: +p-ganssle
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



[issue42392] remove the 'loop' parameter from __init__ in all classes in asyncio.locks

2020-11-19 Thread Yury Selivanov


Yury Selivanov  added the comment:

> The safe code can look like:
>
> global_lock = threading.Lock()  like GIL

SGTM. We can use this strategy for all synchronization primitives and for 
objects like asyncio.Queue.

--

___
Python tracker 

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



[issue18838] The order of interactive prompt and traceback on Windows

2020-11-19 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks. I'm closing this because 3.7 is only getting security fixes now.

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



[issue18838] The order of interactive prompt and traceback on Windows

2020-11-19 Thread Adam Bartoš

Adam Bartoš  added the comment:

The order is fine on Python 3.8, Windows 10.

--

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 1051ca4d974ebb6448f58b661aa28f8aff325ed3 by Miss Islington (bot) 
in branch '3.9':
bpo-42345: Add whatsnew and versionchanged for typing.Literal in 3.9 (GH-23386)
https://github.com/python/cpython/commit/1051ca4d974ebb6448f58b661aa28f8aff325ed3


--

___
Python tracker 

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



[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Steve Dower


Steve Dower  added the comment:

Firstly, msvc9compiler.py is very deprecated, we don't touch that one at all or 
use it in distutils.

Second, _msvccompiler.py is weakly deprecated (and likely soon fully 
deprecated), so you'd be better to make the fix in the setuptools project 
instead.

But we'd very much like to see that fix made. So if you're prepared to work on 
it, that'd be great! I've added Jason to this issue so he can point you at the 
right place in setuptools to look.

--
nosy: +jaraco

___
Python tracker 

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



[issue42383] Pdb does not correclty restart the target if it changes the current directory

2020-11-19 Thread Andrey Bienkowski


Change by Andrey Bienkowski :


--
pull_requests: +22305
pull_request: https://github.com/python/cpython/pull/23412

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks everyone! Can I close this now?

--

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22304
pull_request: https://github.com/python/cpython/pull/23411

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0 by kj in branch 'master':
bpo-42345: Add whatsnew and versionchanged for typing.Literal in 3.9 (GH-23386)
https://github.com/python/cpython/commit/e1dc0db8c7cb8c4d7343e051ba85146b375bb8e0


--

___
Python tracker 

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



[issue42412] Fix bases issues in PyType_FromModuleAndSpec()

2020-11-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue42412] Fix bases issues in PyType_FromModuleAndSpec()

2020-11-19 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

1. There are leaks if Py_tp_bases is used more than once and if some some calls 
before setting tp_bases are failed.

2. There is a crash if the bases argument or Py_tp_bases is not a tuple.

3. The documentation is not accurate.

--
components: C API
messages: 381444
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix bases issues in PyType_FromModuleAndSpec()
type: resource usage
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



[issue36207] robotsparser deny all with some rules

2020-11-19 Thread idee Animation Anniversaire

idee Animation Anniversaire  added the 
comment:

idee animation anniversaire est une agence animation à Paris pour les 
prestations comme pour
Animation entreprise, animation arbre de Noël, animation anniversaire à 
domicile, animation centre de loisir avec spectacle magie, Spectacle 
maquillage, Spectacle Sculpture sur Ballon en Ile-de-France.
Vous organisez un anniversaire à domicile.
http://idee-animation-anniversaire.fr/prestations/

--
nosy: +ideeanimationanniversaire

___
Python tracker 

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



[issue42411] respect cgroups limits when trying to allocate memory

2020-11-19 Thread Carlos Alexandro Becker


New submission from Carlos Alexandro Becker :

A common use case is running python inside containers, for instance, for 
training models and things like that.

The python process sees the host memory/cpu, and ignores its limits, which 
often leads to OOMKills, for instance:

docker run -m 1G --cpus 1 python:rc-alpine python -c 'x = bytearray(80 * 1024 * 
1024 * 1000)'


Linux will kill the process once it reaches 1GB of RAM used.

Ideally, we should have an option to make Python try to allocate only the ram 
its limited to, maybe something similar to Java's +X:UseContainerSupport.

--
components: IO
messages: 381442
nosy: caarlos0
priority: normal
severity: normal
status: open
title: respect cgroups limits when trying to allocate memory
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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +22302
pull_request: https://github.com/python/cpython/pull/23409

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 2acd9d0c6ccf0b4360e3b63beddb97996bcb9bb1 by Miss Islington (bot) 
in branch '3.9':
bpo-42345: Fix hash implementation of typing.Literal (GH-23383)
https://github.com/python/cpython/commit/2acd9d0c6ccf0b4360e3b63beddb97996bcb9bb1


--

___
Python tracker 

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



[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

> _pickle.PicklingError: Can't pickle : it's not the 
> same object as functools.partial

I don't understand this error. It looks like a bug in functools.

The PR 23407 looks like a workaround rather than a fix.

You should analyze why "cls != obj" conditon is true: why cls is not obj?

--

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22301
pull_request: https://github.com/python/cpython/pull/23408

___
Python tracker 

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



[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 1b54077ff6f5c1379e097e9f8e8648da9826d6ec by Yurii Karabas in 
branch 'master':
bpo-42345: Fix hash implementation of typing.Literal (GH-23383)
https://github.com/python/cpython/commit/1b54077ff6f5c1379e097e9f8e8648da9826d6ec


--

___
Python tracker 

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



[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-19 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +22299
pull_request: https://github.com/python/cpython/pull/23406

___
Python tracker 

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



[issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity

2020-11-19 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Could someone that runs into this issue with python 3.7 please test if the 
issue is still present in 3.8 or 3.9?

BTW. I'm not convinced this is a macOS specific problem, see issue40379 which 
claims that fork-without-exec strategy is inherently broken.

--

___
Python tracker 

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



[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-19 Thread hai shi


hai shi  added the comment:

Oh, sorry, wrong PR number. the right one: PR23405

--

___
Python tracker 

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



[issue42410] Raise a pickleError when convert _functools module to use PyType_FromModuleAndSpec

2020-11-19 Thread hai shi


New submission from hai shi :

Touch an error when convert _functools module to use PyType_FromModuleAndSpec, 
the error info:
_pickle.PicklingError: Can't pickle : it's not the 
same object as functools.partial

The related PR: PR3405

--
components: Extension Modules
messages: 381436
nosy: petr.viktorin, shihai1991, vstinner
priority: normal
severity: normal
status: open
title: Raise a pickleError when convert _functools module to use 
PyType_FromModuleAndSpec
type: behavior
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



[issue40891] Use PEP 573 in functools

2020-11-19 Thread hai shi


Change by hai shi :


--
resolution:  -> duplicate
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



[issue40891] Use PEP 573 in functools

2020-11-19 Thread hai shi


hai shi  added the comment:

Duplicated issue: bpo-40137, so I closed this one.

--

___
Python tracker 

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



[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-11-19 Thread hai shi


Change by hai shi :


--
pull_requests: +22298
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23405

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset b437aa83f9374b86b7756705e8dc83b72a99e037 by Christian Heimes in 
branch 'master':
bpo-1635741: Port _posixshmem extension module to multiphase initialization 
(GH-23404)
https://github.com/python/cpython/commit/b437aa83f9374b86b7756705e8dc83b72a99e037


--

___
Python tracker 

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



[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map

2020-11-19 Thread George Stefos


Change by George Stefos :


--
nosy: +stefosgiwrgos

___
Python tracker 

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



[issue42409] Interpreter exit blocks waiting for ThreadPoolExecutor.map

2020-11-19 Thread George Sakkis


New submission from George Sakkis :

ThreadPoolExecutor.map() prevents interpreter exit if there is a reference to 
the generator it returns. In the attached script:

- `python threadpool_map.py run1` exits as soon as the exception is raised on 
the main thread. This is the desired behavior in our case.

- `python threadpool_map.py run2` keeps running until the thread worker 
processes all queued work items. The only difference from `run1` is that the 
result of `ThreadPoolExecutor.map()` is assigned to a variable.

- `python threadpool_map.py run3` has a `finally` block that shuts down the 
executor without waiting. Still the worker thread keeps running even after the 
shutdown.

Initially it seemed like https://bugs.python.org/issue36780 but there is no 
change in the behavior after commenting out the `atexit.register(_python_exit)` 
call (for the `run2` case at least).

--
components: Library (Lib)
files: threadpool_map.py
messages: 381433
nosy: gsakkis
priority: normal
severity: normal
status: open
title: Interpreter exit blocks waiting for ThreadPoolExecutor.map
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49608/threadpool_map.py

___
Python tracker 

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



[issue42407] Grammatical typo in multiprocessing doc

2020-11-19 Thread Irit Katriel


Change by Irit Katriel :


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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +22297
pull_request: https://github.com/python/cpython/pull/23404

___
Python tracker 

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



[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2020-11-19 Thread Fred Drake


Change by Fred Drake :


--
nosy: +fdrake

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

I closed the following issues as duplicates of this issue:

* bpo-15707: "PEP 3121, 384 Refactoring applied to signal module" (duplicate of 
bpo-41713)
* bpo-15670: "PEP 3121, 384 Refactoring applied to ssl module" (duplicate of 
bpo-42333)
* bpo-15668: "PEP 3121, 384 Refactoring applied to random module"
* bpo-15675: "PEP 3121, 384 Refactoring applied to array module"
* bpo-15734: "PEP 3121, 384 Refactoring applied to spwd module"
* bpo-15671: "PEP 3121, 384 Refactoring applied to struct module"
* bpo-15705: "PEP 3121, 384 Refactoring applied to sha256 module"
* bpo-15697: "PEP 3121 refactoring applied to pwd module"
* bpo-15714: "PEP 3121, 384 Refactoring applied to grp module"
* bpo-15665: "PEP 3121, 384 refactoring applied to lsprof module"
* bpo-15849: "PEP 3121, 384 Refactoring applied to xx module"
* bpo-15653: "PEP 3121, 384 refactoring applied to hashopenssl module"

See also bpo-15787: "[meta issue] PEP 3121, 384 Refactoring" (still open since 
it depends on other open issues).

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 588c7c9f08a673472a29e3f8f7fda9e343212e7d by Dong-hee Na in branch 
'master':
bpo-1635741: Fix _struct for build bot error (GH-23402)
https://github.com/python/cpython/commit/588c7c9f08a673472a29e3f8f7fda9e343212e7d


--

___
Python tracker 

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit 46f59ebd01e22cc6a56fd0691217318c1d801a49
Author: Christian Heimes 
Date:   Wed Nov 18 16:12:13 2020 +0100

bpo-1635741: Port _hashlib to multiphase initialization (GH-23358)

Signed-off-by: Christian Heimes 


See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

> Hum, I reopen the issue: the xx module still defines types statically and so 
> the "PEP 384" part of this issue is not fixed yet.

It's now tracked by bpo-4 "Convert a few stdlib extensions to the limited C 
API (PEP 384)".

--

___
Python tracker 

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



[issue15787] [meta issue] PEP 3121, 384 Refactoring

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

The work is now tracked at bpo-1635741.

--
nosy: +vstinner
title: PEP 3121, 384 Refactoring -> [meta issue] PEP 3121, 384 Refactoring

___
Python tracker 

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



[issue15390] PEP 3121, 384 refactoring applied to _datetime module

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: PEP 3121, 384 refactoring applied to datetime module -> PEP 3121, 384 
refactoring applied to _datetime module

___
Python tracker 

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



[issue15674] PEP 3121, 384 Refactoring applied to _thread module

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: PEP 3121, 384 Refactoring applied to thread module -> PEP 3121, 384 
Refactoring applied to _thread module

___
Python tracker 

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



[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-19 Thread Renato Cunha


Change by Renato Cunha :


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

___
Python tracker 

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



[issue15665] PEP 3121, 384 refactoring applied to lsprof module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit 83de110dce94a9196dccc01d526628615714e362
Author: Mohamed Koubaa 
Date:   Wed Sep 23 05:33:21 2020 -0500

bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (GH-0)

See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Christian Heimes


Christian Heimes  added the comment:

$ find -name '*.c' -and -not -name moduleobject.c | xargs grep -l 
PyModule_Create\( | sort
./Doc/includes/custom2.c
./Doc/includes/custom3.c
./Doc/includes/custom4.c
./Doc/includes/custom.c
./Doc/includes/sublist.c
./Modules/_asynciomodule.c
./Modules/cjkcodecs/multibytecodec.c
./Modules/_csv.c
./Modules/_ctypes/_ctypes.c
./Modules/_cursesmodule.c
./Modules/_datetimemodule.c
./Modules/_decimal/_decimal.c
./Modules/_elementtree.c
./Modules/_io/_iomodule.c
./Modules/_multiprocessing/posixshmem.c
./Modules/ossaudiodev.c
./Modules/_pickle.c
./Modules/_posixsubprocess.c
./Modules/pyexpat.c
./Modules/readline.c
./Modules/selectmodule.c
./Modules/socketmodule.c
./Modules/_sqlite/module.c  [*]
./Modules/_sre.c  [*]
./Modules/_ssl.c  [*]
./Modules/_testbuffer.c
./Modules/_testcapimodule.c
./Modules/_testimportmultiple.c
./Modules/_testinternalcapi.c
./Modules/_threadmodule.c
./Modules/_tkinter.c
./Modules/_tracemalloc.c
./Modules/_xxsubinterpretersmodule.c
./Modules/_xxtestfuzz/_xxtestfuzz.c
./PC/_msi.c
./PC/msvcrtmodule.c
./PC/winreg.c
./PC/winsound.c
./Tools/peg_generator/peg_extension/peg_extension.c

--

___
Python tracker 

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



[issue15714] PEP 3121, 384 Refactoring applied to grp module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit fa2eee975dbf7d2728021ef9d97328bbe88351cf
Author: Christian Heimes 
Date:   Thu Nov 19 08:47:32 2020 +0100

bpo-1635741: Port grp and pwd to multiphase initialization (GH-23360)


See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread miss-islington


miss-islington  added the comment:


New changeset 646d7fdefbbc95a83df665698af7385d10bde66c by Christian Heimes in 
branch 'master':
bpo-1635741: Port gc module to multiphase initialization (GH-23377)
https://github.com/python/cpython/commit/646d7fdefbbc95a83df665698af7385d10bde66c


--

___
Python tracker 

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



[issue15697] PEP 3121 refactoring applied to pwd module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit fa2eee975dbf7d2728021ef9d97328bbe88351cf
Author: Christian Heimes 
Date:   Thu Nov 19 08:47:32 2020 +0100

bpo-1635741: Port grp and pwd to multiphase initialization (GH-23360)


See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15705] PEP 3121, 384 Refactoring applied to sha256 module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit 52a2df135c0470b1dbf889edc51b7c556ae4bc80
Author: Mohamed Koubaa 
Date:   Tue Sep 8 04:16:14 2020 -0500

bpo-1635741: Convert _sha256 types to heap types (GH-22134)

Convert the _sha256 extension module types to heap types.

See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15671] PEP 3121, 384 Refactoring applied to struct module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

New changeset cfeb5437a8910e28726422a14a93a36584e32238 by Christian Heimes in 
branch 'master':
bpo-1635741: Port _struct to multiphase initialization (GH-23398)
https://github.com/python/cpython/commit/cfeb5437a8910e28726422a14a93a36584e32238

See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15734] PEP 3121, 384 Refactoring applied to spwd module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

New changeset bf9d70a1a5255080b7a5e55f319dfffd5f20fdcd by Christian Heimes in 
branch 'master':
bpo-1635741: Port spwd to multiphase initialization (GH-23390)
https://github.com/python/cpython/commit/bf9d70a1a5255080b7a5e55f319dfffd5f20fdcd

See bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 384)".

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-19 Thread Renato Cunha


Change by Renato Cunha :


--
components: +Library (Lib) -Interpreter Core

___
Python tracker 

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



[issue42333] Port ssl module to heap types and module state (PEP 573)

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-15670 as duplicate of this issue.

--
nosy: +vstinner

___
Python tracker 

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



[issue15670] PEP 3121, 384 Refactoring applied to ssl module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

Marked as a duplicate of bpo-42333.

See also bpo-4 "Convert a few stdlib extensions to the limited C API (PEP 
384)".

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Port ssl module to heap types and module state (PEP 573)

___
Python tracker 

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



[issue41111] Convert a few stdlib extensions to the limited C API (PEP 384)

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: Convert a few stdlib extensions to the limited C API -> Convert a few 
stdlib extensions to the limited C API (PEP 384)

___
Python tracker 

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



[issue41111] [C API] Convert a few stdlib extensions to the limited C API (PEP 384)

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
components: +C API
title: Convert a few stdlib extensions to the limited C API (PEP 384) -> [C 
API] Convert a few stdlib extensions to the limited C API (PEP 384)

___
Python tracker 

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



[issue15675] PEP 3121, 384 Refactoring applied to array module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

See bpo-4 "Convert a few stdlib extensions to the limited C API".

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15668] PEP 3121, 384 Refactoring applied to random module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

commit cc0cd43c0f96dac413e54855e9c77ec4b73bd2f8
Author: Christian Heimes 
Date:   Thu Nov 19 08:46:29 2020 +0100

bpo-1635741: Port _random to multiphase initialization (GH-23359)

See bpo-4 "Convert a few stdlib extensions to the limited C API".

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Py_Finalize() doesn't clear all Python objects at exit

___
Python tracker 

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



[issue15707] PEP 3121, 384 Refactoring applied to signal module

2020-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
resolution: fixed -> duplicate
superseder:  -> _signal module leak: test_interpreters leaked [1424, 1422, 
1424] references

___
Python tracker 

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



[issue15707] PEP 3121, 384 Refactoring applied to signal module

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:

The _signal extension module has been ported to the new multi-phase 
initialization API (PEP 489).

See bpo-4 "Convert a few stdlib extensions to the limited C API".

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +22294
pull_request: https://github.com/python/cpython/pull/23402

___
Python tracker 

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



[issue42245] concurrent.futures.ProcessPoolExecutor freezes depending on complexity

2020-11-19 Thread DanilZ


DanilZ  added the comment:

Dear All,

Thanks for the great input. As described above it appears to be a MacOS problem.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +22293
pull_request: https://github.com/python/cpython/pull/23401

___
Python tracker 

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



[issue42408] passing memoryview slice to struct packing functions

2020-11-19 Thread Daniel Hrisca


New submission from Daniel Hrisca :

First I have to apologize if this was discussed before; I've searched the 
issues and googled the problem but I got nothing obvious.

I'm trying to pass a memoryview slice as argument to struct packing functions 
to avoid creating intermediate bytes objects

from struct import Struct
s = Struct('<2Q500s').pack_into
buffer = bytearray(7000)
data = bytes(300)
s(buffer, 0, 500, 500, memoryview(data)[4:])


and I get this error:
error: argument for 's' must be a bytes object

Why is it not possible to use memoryviews in this case? 

It is also strange for me that we can use a memoyview as the target buffer, so 
this works fine:

s(memoryview(buffer)[10:], 0, 500, 500, data[4:])

--
messages: 381413
nosy: danielhrisca
priority: normal
severity: normal
status: open
title: passing memoryview slice to struct packing functions

___
Python tracker 

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



[issue42407] Grammatical typo in multiprocessing doc

2020-11-19 Thread Ario Aliabadi


New submission from Ario Aliabadi :

>From the multiprocessing docs: 
>https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

> The child process will only inherit those resources necessary to run the 
> process objects run() method.

Is grammatically incorrect - the run() method belongs to the process object, 
and so a possessive appostrophe should be employed instead:


> The child process will only inherit those resources necessary to run the 
> process object's run() method.

For more information about possessive appostrophes, see here: 
https://www.thepunctuationguide.com/apostrophe.html#possessives

--
assignee: docs@python
components: Documentation
messages: 381412
nosy: arioa, docs@python
priority: normal
pull_requests: 22292
severity: normal
status: open
title: Grammatical typo in multiprocessing doc

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset cfeb5437a8910e28726422a14a93a36584e32238 by Christian Heimes in 
branch 'master':
bpo-1635741: Port _struct to multiphase initialization (GH-23398)
https://github.com/python/cpython/commit/cfeb5437a8910e28726422a14a93a36584e32238


--

___
Python tracker 

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



[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-19 Thread Renato Cunha


New submission from Renato Cunha :

Importing multiprocessing prior to other modules that define `ufunc`s breaks 
pickle.whichmodule for those functions.

Example:

Python 3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing
>>> from scipy.special import gdtrix
>>> from pickle import whichmodule
>>> whichmodule(gdtrix, gdtrix.__name__)
'__mp_main__'

Now, if we change the order of imports, whichmodule works fine:

Python 3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.special import gdtrix
>>> from pickle import whichmodule
>>> import multiprocessing
>>> whichmodule(gdtrix, gdtrix.__name__)
'scipy.special._ufuncs'

This happens because multiprocessing creates an alias to `__main__` when 
imported:

Lib/multiprocessing/__init__.py
37:sys.modules['__mp_main__'] = sys.modules['__main__']

But doing so changes the ordering of `sys.modules`, and `whichmodule` returns 
`__mp_main__` instead of the correct `scipy.special._ufuncs`.

This bug has arisen in the context of using `dill` (which imports 
multiprocessing) for serialization and is further documented at 
https://github.com/uqfoundation/dill/issues/392.

I intend to submit a patch/PR with a fix soon.

--
components: Interpreter Core
messages: 381410
nosy: renatolfc
priority: normal
severity: normal
status: open
title: Importing multiprocessing breaks pickle.whichmodule
type: behavior
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



[issue25872] multithreading traceback KeyError when modifying file

2020-11-19 Thread Irit Katriel


Irit Katriel  added the comment:

The issue was fixed but a unit test for this still needs to be added.

--
keywords: +easy -patch
nosy: +iritkatriel
stage: patch review -> test needed

___
Python tracker 

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



[issue42403] Cleanup importlib code

2020-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3390347aa036404453213d589fe1e35902e55fd4 by Victor Stinner in 
branch 'master':
bpo-42403: Simplify importlib external bootstrap (GH-23397)
https://github.com/python/cpython/commit/3390347aa036404453213d589fe1e35902e55fd4


--

___
Python tracker 

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



[issue34364] problem with traceback for syntax error in f-string

2020-11-19 Thread Irit Katriel


Change by Irit Katriel :


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



[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu


Change by Adrian Vladu :


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

___
Python tracker 

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



[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu


New submission from Adrian Vladu :

To add support for building packages that have C extensions on Windows ARM64, 
some fixes are required in the integrated distutils wrapper for Visual Studio 
compiler (Lib/distutils/msvc9compiler.py)

This is a hardcoded fix that needs to be improved so that it applies only on 
windows arm64:
https://github.com/ader1990/cpython/commit/b8c59c9b96a7ad11094224b5631aae3b89323f7a

Any suggestions are welcome.

--
components: Windows
messages: 381407
nosy: avladu, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add distutils mvsccompiler support for Windows ARM64 build
type: compile error
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



[issue40600] Add option to disallow > 1 instance of an extension module

2020-11-19 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



[issue42404] clinic: add option to pass module object to converter function

2020-11-19 Thread Christian Heimes


New submission from Christian Heimes :

Sometimes the converter function for CConverter must access the current module 
object in order to access the current module state. Currently CConverter 
subclasses have no easy way to pass the module to the converter function. It 
would be fantastic if easier CConverter would get an option to pass the module.

Example:

GH-23398 converts the struct module to multiphase initialization. The struct 
module has a converter for cached struct definitions. The cache used to be a 
module level object. It is now an interpreter scoped object. I used a custom 
parse_arg() function to pass the module object:


class cache_struct_converter(CConverter):
type = 'PyStructObject *'
converter = 'cache_struct_converter'
c_default = "NULL"

def parse_arg(self, argname, displayname):
return """
if (!{converter}(module, {argname}, &{paramname})) 
goto exit;

""".format(argname=argname, paramname=self.name,
   converter=self.converter)

def cleanup(self):
return "Py_XDECREF(%s);\n" % self.name

--
components: Argument Clinic
messages: 381406
nosy: christian.heimes, corona10, larry, vstinner
priority: normal
severity: normal
status: open
title: clinic: add option to pass module object to converter function
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



[issue31289] File paths in exception traceback resolve symlinks

2020-11-19 Thread Irit Katriel


Irit Katriel  added the comment:

Here is a case where the opposite was requested: 
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1179979
There they want the traceback to be the same regardless of which symlink the 
script was found by.

I think a change like the one you are proposing here should be discussed on 
python-ideas. Would you like to bring it up there?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +22290
pull_request: https://github.com/python/cpython/pull/23398

___
Python tracker 

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



  1   2   >