[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-06-29 Thread junyixie


Change by junyixie :


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

___
Python tracker 

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



[issue44533] Where are the log file(s)

2021-06-29 Thread tygrus


New submission from tygrus :

The Python app shows errors and says "Check the logs for full command output."
But where are the logs?
And how to understand the data in the logs?

--
messages: 396704
nosy: tygrus
priority: normal
severity: normal
status: open
title: Where are the log file(s)
type: behavior
versions: 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



[issue44440] logging does not work as documented (setLevel)

2021-06-29 Thread Vinay Sajip


Vinay Sajip  added the comment:

As Henk-Jaap points out, this is not a bug. You can't take a single sentence or 
even paragraph without considering the whole picture. In particular, this 
section

https://docs.python.org/3/howto/logging.html#what-happens-if-no-configuration-is-provided

explains clearly why the behaviour you noticed is as expected. Another section 
even depicts it pictorially:

https://docs.python.org/3/howto/logging.html#logging-flow

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Mark Shannon


Mark Shannon  added the comment:

I think this is a worthwhile improvement.
A few comments on this issue and your PR.

1. We already have qualified names on functions and generators and those can be 
modified by @decorators.
In those cases, the code object and the function would disagree.
Code objects are immutable, so any thoughts on the usability implications of 
qualname differing between code object and function?

2. If we are adding a new attribute, it should be at the Python level. The 
internal layout of the code object is likely to change. (I have no problem with 
it being visible to tools like austin, just it won't be part of the API.)

3. As it stands, this is beneficial to only a small set of tools, but has a 
negative impact on memory use.
If we were to leverage the new field to improve the performance of function 
creation (important for closures) by omitting the qualname (and defaulting to 
the code object's) then it would benefit everyone.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue12022] AttributeError should report the same details when raised by lookup_special() as when raised in the REPL

2021-06-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 20a88004bae8ead66a205a125e1fe979376fc3ea by Serhiy Storchaka in 
branch 'main':
bpo-12022: Change error type for bad objects in "with" and "async with" 
(GH-26809)
https://github.com/python/cpython/commit/20a88004bae8ead66a205a125e1fe979376fc3ea


--

___
Python tracker 

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



[issue44471] Raise TypeError in ExitStack.enter_context() for bad argument

2021-06-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6cb145d23f5cf69b6d7414877d142747cd3d134c by Serhiy Storchaka in 
branch 'main':
bpo-44471: Change error type for bad objects in ExitStack.enter_context() 
(GH-26820)
https://github.com/python/cpython/commit/6cb145d23f5cf69b6d7414877d142747cd3d134c


--

___
Python tracker 

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



[issue12022] AttributeError should report the same details when raised by lookup_special() as when raised in the REPL

2021-06-29 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



[issue44471] Raise TypeError in ExitStack.enter_context() for bad argument

2021-06-29 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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Yurii Karabas


Yurii Karabas <1998uri...@gmail.com> added the comment:

Should `__getitem__` be implemented for `types.Union`?
I can implement it if no one is working on it.

P.S. mypy currently does not support it:
```
Value of type "types.Union" is not indexable
```

--
nosy: +uriyyo

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Ken Jin


Ken Jin  added the comment:

Yurii, thanks for the offer.

We only need to implement __getitem__ if union supports TypeVars. Which
means __parameters__ need to be implemented too (or at least a private
internal implementation of it).

I interpreted Guido's message above as to wait and see if static type
checkers even accept things like int | list[T]. Maybe he meant that if that
syntax isnt valid then theres no point for us to implement it? PEP 604
leaves out how it deals with TypeVars, so adding this behavior may require
us to update the PEP first (which will require approval from others).

Anyways, there's no rush. We probably can't backport this so we have until
the next minor release of Python (3.11 or later) to decide.

--

___
Python tracker 

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



[issue44529] Using typing.Union in isinstance checks

2021-06-29 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25518
pull_request: https://github.com/python/cpython/pull/26950

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40 by andrei kulakov in 
branch 'main':
bpo-42588: Update the docs for the TopologicalSorter.static_order() method 
(GH-26834)
https://github.com/python/cpython/commit/0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40


--

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25520
pull_request: https://github.com/python/cpython/pull/26952

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +25519
pull_request: https://github.com/python/cpython/pull/26951

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks, Ran and Andrei for your contributions! :)

--
nosy:  -miss-islington
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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread miss-islington


miss-islington  added the comment:


New changeset d9fc4c3deb617beb1d0bbfdb4efc905a4192ff0a by Miss Islington (bot) 
in branch '3.10':
bpo-42588: Update the docs for the TopologicalSorter.static_order() method 
(GH-26834)
https://github.com/python/cpython/commit/d9fc4c3deb617beb1d0bbfdb4efc905a4192ff0a


--
nosy: +miss-islington

___
Python tracker 

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



[issue43625] CSV has_headers heuristic could be improved

2021-06-29 Thread Skip Montanaro


Skip Montanaro  added the comment:

Thanks @andrei.avk. You are right, only the complex test is required.

I suppose it's okay to commit this, but reviewing the full code of the 
has_header method leaves me thinking this is just putting lipstick on a pig. If 
I read the code correctly, there are two (undocumented) tacit assumptions:

1. The non-header values are numeric.

2. If not numeric, they are fixed length strings whose length generally differs 
from the length of the putative header.

The second criterion means this has a header:

ab,de
ghi,jkl
ghi,jkl

but this doesn't:

abc,def
ghi,jkl
ghi,jkl

It seems to me that it would be a good idea to at least expand on the 
documentation of that method and maybe add at least one test case where the CSV 
sample doesn't have a header. I'll try to get that done and attach a patch.

--
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-06-29 Thread Ken Jin


Ken Jin  added the comment:

> Is this intentional? It seems a little inconsistent.

The `__name__` attribute is for internal use only. It's subject to change every 
release along with other implementation details.

Sorry, I don't really understand what this issue is requesting. Do you want to 
add the `split_module_names` function or standardize `__name__` or something 
else? Depending on what you're suggesting the follow up would be different.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue43625] CSV has_headers heuristic could be improved

2021-06-29 Thread Skip Montanaro


Skip Montanaro  added the comment:

I retract my comment about fixed length strings in the non-numeric case. There 
are clearly test cases (which I probably wrote, considering the values) where 
the sample as a header but the values are of varying length. Misread of the 
code on my part. I have obviously not had enough coffee yet this morning.

--

___
Python tracker 

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



[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-29 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

Since this is the intended behavior, we can just close the issue.

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-29 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I mean intended wording

--

___
Python tracker 

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



[issue44534] unittest.mock.Mock.unsafe doc is garbled

2021-06-29 Thread Roy Smith


New submission from Roy Smith :

At https://docs.python.org/3.9/library/unittest.mock.html#unittest.mock.Mock, 
it says:

unsafe: By default if any attribute starts with assert or assret will raise an 
AttributeError.

That's not an English sentence.  I think what was intended was, "By default 
accessing an attribute which starts with assert or assret will raise an 
AttributeError."

--
assignee: docs@python
components: Documentation
messages: 396719
nosy: docs@python, roysmith
priority: normal
severity: normal
status: open
title: unittest.mock.Mock.unsafe doc is garbled
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



[issue43625] CSV has_headers heuristic could be improved

2021-06-29 Thread Skip Montanaro


Skip Montanaro  added the comment:

Here is a change to the has_header documentation and an extra test case 
documenting the behavior when the sample contains strings. I'm not sure about 
the wording of the doc change, perhaps you can tweak it? Seems kind of clumsy 
to me. If it seems okay to you @andrei.avk, can you fold it into your PR?

--
Added file: https://bugs.python.org/file50131/hasheader.diff

___
Python tracker 

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



[issue16801] Preserve original representation for integers / floats in docstrings

2021-06-29 Thread Scott Stevens


Scott Stevens  added the comment:

I'm now seeing docs.python.org has regressed. For 3.9, calls present their 
defaults in octal, in 3.10 (beta), they're presented in decimal.

https://docs.python.org/3.10/library/pathlib.html#pathlib.Path.touch

https://docs.python.org/3.10/library/os.html#os.mkdir

Not sure if this is the right issue to be mentioning it on; if not, please let 
me know so I can file another issue.

--
nosy: +Scott Stevens

___
Python tracker 

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



[issue43625] CSV has_headers heuristic could be improved

2021-06-29 Thread Skip Montanaro


Skip Montanaro  added the comment:

Here's a NEWS entry.

--
Added file: 
https://bugs.python.org/file50132/2021-06-29-07-27-08.bpo-43625.ZlAxhp.rst

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-29 Thread Steve Dower


New submission from Steve Dower :

The project files require an additional check in PCbuild/python.props to select 
the right toolset for VisualStudioVersion=17.0. Without this, everything will 
refuse to build.

The toolset is still v142, so there should be not compatibility issues. The 
problem is in detection, not use.

--
assignee: steve.dower
components: Build, Windows
messages: 396723
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Cannot build in VS 2022
type: compile error
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx


Maarten Derickx  added the comment:

The route via gencodec or more generally via charmap_encode and charmap_decode 
seems to be one that is not possible without some low level CPython code 
adjustments. The reason for this is that charmap_encode and charmap_decode only 
seem to support mappings where a single encoded byte corresponds to multiple 
unicode points.

However iso6937 is a mixed length encoding, meaning in this specific case that 
unicode characters sometimes need to be encoded as a single byte and sometimes 
with two bytes.

For example chr(0x00c0) should be encoded as b'\xc1' + b'A'.

--

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-06-29 Thread Lars van Gemerden

Lars van Gemerden  added the comment:

I was not aware the __name__ attribute is an implementation detail. It is 
described in the docs: https://docs.python.org/3/reference/datamodel.html.

I have been using it since python 2.7, for example for logging.

The function “split_module_names” is just a function to see what items in a 
module have and do not have a __name__ attribute; thought it might help 
proceedings.

If I were to suggest an improvement, it would be that all classes and types (or 
minimally the abc’s) would have a __name__ attribute, being the name under 
which it can be imported. 
Also that the abc’s in typing and collections are as similar as possible.

--
nosy: +lars2

___
Python tracker 

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



[issue44533] Where are the log file(s)

2021-06-29 Thread Éric Araujo

Éric Araujo  added the comment:

The python interpreter does not create log files by itself, it would be the 
specific command or script that you ran that does that and prints the message 
you show.

--
nosy: +eric.araujo
resolution:  -> third party
status: open -> pending
type: behavior -> 
versions:  -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



[issue16842] Allow to override a function signature for pydoc with a docstring

2021-06-29 Thread Éric Araujo

Éric Araujo  added the comment:

This proposal pre-dates signature objects; I wonder if they can be used to 
handle the use cases here.

--
versions:  -Python 3.4

___
Python tracker 

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



[issue16801] Preserve original representation for integers / floats in docstrings

2021-06-29 Thread Éric Araujo

Éric Araujo  added the comment:

Please open a ticket!  This one is about docstrings and pydoc; docs.python.org 
is built from rst docs with sphinx.

--
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-06-29 Thread Ken Jin

Ken Jin  added the comment:

Lars, yes you're right that __name__ is documented in datamodel, sorry I wasn't 
clear in my original message. What I meant was that specifically for the typing 
module, it's not exposed anywhere in its docs 
https://docs.python.org/3/library/typing.html.

> If I were to suggest an improvement, it would be that all classes and types 
> (or minimally the abc’s) would have a __name__ attribute, being the name 
> under which it can be imported. 

I think this makes sense. It should be as simple as adding self.__name__ = name 
or some variant. Note that some types hack their names, such as TypeVar or 
ParamSpec. So it's not always that __name__ ​== type/class name.

> Also that the abc’s in typing and collections are as similar as possible.
We strive towards this but it's difficult to get it 100%. The abcs in typing 
are implemented in pure Python and alias the ones in collections, while the 
ones in collections are sometimes tied to C. AFAIK, most types in typing only 
do what the PEPs promise. I hope you understand.

--

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This also has the side effect of making marshalled code objects bigger, and we 
keep adding to this in 3.11 with the new exception table and soon with PEP 657. 
Given that a lot of people are concerned about this and that this change only 
affects a very small set of tools, we need to analyze very carefully the 
balance.

--
nosy: +pablogsal

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3ba65cdcefcec7866be482138a5ea8aafbd07e59 by Miss Islington (bot) 
in branch '3.9':
bpo-42588: Update the docs for the TopologicalSorter.static_order() method 
(GH-26834) (GH-26952)
https://github.com/python/cpython/commit/3ba65cdcefcec7866be482138a5ea8aafbd07e59


--

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Anyway, I propose to add a new _PyType_AllocNoTrack() function which 
> allocates memory without tracking the newly allocated object directly in the 
> GC.

How is that going to help third party extensions and subclasses?

--
nosy: +pablogsal

___
Python tracker 

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



[issue44526] Doc typo in "What’s New In Python 3.10" (x/y-axis)

2021-06-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue43625] CSV has_headers heuristic could be improved

2021-06-29 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Skip: I've updated the PR

Expanded the docs a bit, I think they give a good rough idea of the logic but I 
feel like they can probably be improved more, let me know what you think! I 
spent some time thinking about it but found it tricky! :)

--

___
Python tracker 

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



[issue43832] asyncio + multiprocessing = core dump in sem_trywait

2021-06-29 Thread Kunal


Kunal  added the comment:

I was trying to reproduce the problem and can get the core dump to happen with 
a smaller program as well -- it doesn't seem related to asyncio specifically 
but seems to be a bug with multiprocessing.Event (or probably the primitives 
inside it).

```
#!/usr/bin/env python

import time
import multiprocessing


def master_func(event) -> None:
print(f"Child: {event = }")
print(f"Child: {event.is_set() = }") # Crashes here with SIGSEGV in 
sem_trywait
print("Completed")


if __name__ == "__main__":
event = multiprocessing.Event()
context_spawn = multiprocessing.get_context("spawn")
proc = context_spawn.Process(target=master_func, args=(event, ))
proc.start()
print(f"Parent: {event = }")
print(f"Parent: {event.is_set() = }")
proc.join()
```

Switching to fork instead of spawn bypasses the issue. Trying to dig into this 
a little bit more.

--
nosy: +knl

___
Python tracker 

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



[issue43215] Document Happy Eyeballs arguments of asyncio.open_connection

2021-06-29 Thread Illia Volochii


Change by Illia Volochii :


--
versions: +Python 3.11

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 823460daa9fab3d0cf00ec553d1e35635ef73d40 by Victor Stinner in 
branch 'main':
bpo-44531: Fix type_repr() if tp_name is NULL (GH-26948)
https://github.com/python/cpython/commit/823460daa9fab3d0cf00ec553d1e35635ef73d40


--

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-29 Thread STINNER Victor


STINNER Victor  added the comment:

> How is that going to help third party extensions and subclasses?

It doesn't solve bpo-40142 issue for third party extensions.

About subclasses, I'm not sure if it's safe to call the traverse function if a 
subclass overrides it and visits its own member which are not in the built-in 
type (like dict or tuple).

--

___
Python tracker 

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



[issue24339] iso6937 encoding missing

2021-06-29 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Right, the charmap codec was built with the Unicode Consortium mappings in mind.

However, you may have some luck decoding the two byte chars in ISO 6937 using 
combining code points in Unicode. With some extra post processing you could 
also normalize the output into single code points.

If I find time, I may have a look at gencodec.py again and update it to more 
modern interfaces. I've long given up maintenance of Unicode in Python and only 
try to help by giving some guidance based on the original implementation design.

--

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> About subclasses, I'm not sure if it's safe to call the traverse function if 
> a subclass overrides it and visits its own member which are not in the 
> built-in type (like dict or tuple).

Technically the traverse should only call visit on the members, but in practice 
they can do whatever. I agree is not clear is a safe operation

--

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-06-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

It sounds reasonable to add the __name__ attribute. Since these objects
aren't really types, the default mechanism for constructing a type doesn't
give them this. Are there other attributes that are missing? We should
probably add those too.

--

___
Python tracker 

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



[issue43832] asyncio + multiprocessing = core dump in sem_trywait

2021-06-29 Thread Kunal


Kunal  added the comment:

Oh, it looks like it's because the context for the Event doesn't match when 
created this way (the default context on linux is fork). 

The problem goes away if the Event instance is created from the spawn context 
-- specifically, patching dump_core.py 

```
@@ -22,14 +22,13 @@ def master_func(space:dict) -> None:

 if __name__ == "__main__":

-this_event = multiprocessing.Event()
+context_spawn = multiprocessing.get_context("spawn")

+this_event = context_spawn.Event()
 this_space = dict(
 this_event=this_event,
 )

-context_spawn = multiprocessing.get_context("spawn")
-
 master_proc = context_spawn.Process(
```

I think this can be closed; the incompatibility between contexts is also 
documented at 
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Lock, 
thought it could be a little more explicit about potential segfaults.

> Note that objects related to one context may not be compatible with processes 
> for a different context. In pait's berticular, locks created using the fork 
> context cannot be passed to processes started using the spawn or forkserver 
> start methods.

(Event uses a Lock under the hood)

--

___
Python tracker 

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



[issue44531] Add _PyType_AllocNoTrack() function: allocate without tracking in the GC

2021-06-29 Thread STINNER Victor


STINNER Victor  added the comment:

For the background of this issue, please see bpo-38392:
https://bugs.python.org/issue38392#msg354074

--

___
Python tracker 

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



[issue44536] wrong output of np.lcm.reduce(*awg)

2021-06-29 Thread 申泷轩

New submission from 申泷轩 <751630...@qq.com>:

np.lcm.reduce([1,2,3,100])
Out[125]: 300

np.lcm.reduce([1,2,3,100,101])
Out[126]: 30300

np.lcm.reduce([1,2,3,100,101,99019])
Out[127]: -1294691596

30300*99019
Out[128]: 3000275700

--
assignee: docs@python
components: Documentation
files: a text for lcm() in  numpy.py
messages: 396742
nosy: docs@python, zlwq
priority: normal
severity: normal
status: open
title: wrong output of np.lcm.reduce(*awg)
versions: Python 3.8
Added file: https://bugs.python.org/file50133/a text for lcm() in  numpy.py

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-06-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx


Maarten Derickx  added the comment:

Hi Marc-Andre Lemburg,

Thanks for your responses and guidance. At least your pointers to 
charmap_encode and charmap_decode helped, since it shows at least what the 
general idea is on how to deal with these types of encodings.

In the mean time I did produce some successes. I wrote some python code that 
can create character mappings based on the table in 
http://webstore.iec.ch/preview/info_isoiec6937%7Bed3.0%7Den.pdf so that we can 
be sure that there are no human errors in generating the mappings.

I think my further approach is to write pure python versions of charmap_encode 
and charmap_decode that can handle the general case of multi byte encodings to 
unicode case. This won't be as fast as using the builtins written c. But at 
least gives maintainable and hopefully reusable code.

Maybe later the c-implementation can be updated as well.

--

___
Python tracker 

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



[issue44536] wrong output of np.lcm.reduce(*awg)

2021-06-29 Thread Mark Dickinson


Mark Dickinson  added the comment:

It looks as though you're reporting an issue with NumPy; this tracker is for 
the Python core language, which doesn't include NumPy.

For NumPy bugs, use the NumPy bug tracker at 
https://github.com/numpy/numpy/issues. (Though I don't think this _is_ a NumPy 
bug: it's simply the result of integer overflow in NumPy.)

--
nosy: +mark.dickinson
resolution:  -> third party
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



[issue16801] Preserve original representation for integers / floats in docstrings

2021-06-29 Thread Mark Dickinson


Mark Dickinson  added the comment:

I suspect the difference is due to a change in the way that Sphinx handles the 
py:method directive: the rst source for `pathlib.Path.touch` hasn't changed 
between 3.9 and 3.10, but the 3.9 docs are built with Sphinx 2.4.4, while the 
3.10 docs are built with Sphinx 3.2.1.

--

___
Python tracker 

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



[issue16801] Preserve original representation for integers / floats in docstrings

2021-06-29 Thread Mark Dickinson


Mark Dickinson  added the comment:

FWIW, the relevant change seems to be this one: 
https://github.com/sphinx-doc/sphinx/pull/7155

--

___
Python tracker 

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



[issue30717] Add unicode grapheme cluster break algorithm

2021-06-29 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue43945] [Enum] standardize format() behavior

2021-06-29 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-06-29 Thread Andre Roberge


Change by Andre Roberge :


--
nosy: +aroberge

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

It seems to me the old behaviour (don't forward hash) was done for good 
reasons.  If the referent might go away, it is not valid to use it as a dict 
key since the hash and eq result changes.  If it can't go away, what reason is 
there to use a weakref and not a direct reference?

--

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks Neil for your input. I am indeed reverting that change to its previous 
behaviour.

--

___
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

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Just also to be clear on my original message, reverting it to a previous 
behaviour would disallow some patterns that could be useful:

>>> class A:
...   ...
...
>>> a = A()
>>> d = {a: None}
>>> weakref.proxy(a) in d
True

But I agree is better to revert back in any case

--

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue40601] [C API] Hide static types from the limited C API

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2021-06-29 Thread h-vetinari


Change by h-vetinari :


--
nosy: +h-vetinari

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 12803c59d54ff1a45a5b08cef82652ef199b3b07 by Jack DeVries in 
branch 'main':
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. 
(GH-26935)
https://github.com/python/cpython/commit/12803c59d54ff1a45a5b08cef82652ef199b3b07


--
nosy: +iritkatriel

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25523
pull_request: https://github.com/python/cpython/pull/26957

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 08aa26e4355da6f916da0c97d00774800ee0fc46 by Miss Islington (bot) 
in branch '3.10':
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. 
(GH-26935) (GH-26956)
https://github.com/python/cpython/commit/08aa26e4355da6f916da0c97d00774800ee0fc46


--

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 02859df10591789c72eb185a4f7dd9cc1ea8dcbb by Miss Islington (bot) 
in branch '3.9':
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. 
(GH-26935) (GH-26957)
https://github.com/python/cpython/commit/02859df10591789c72eb185a4f7dd9cc1ea8dcbb


--

___
Python tracker 

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



[issue38062] Clarify that atexit.unregister matches by equality, not identity

2021-06-29 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



[issue6407] multiprocessing Pool should allow custom task queue

2021-06-29 Thread Irit Katriel


Irit Katriel  added the comment:

It should be possible to do this now through the context, but it's not 
documented:

>>> import multiprocessing as mp
>>> ctx = mp.get_context()
>>> ctx.SimpleQueue
>
>>> ctx.SimpleQueue = list
>>> ctx.SimpleQueue


--
nosy: +iritkatriel

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-06-29 Thread Ammar Askar


Change by Ammar Askar :


--
nosy: +ammar2
nosy_count: 8.0 -> 9.0
pull_requests: +25524
pull_request: https://github.com/python/cpython/pull/26958

___
Python tracker 

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



[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Gabriele N Tornetta


Gabriele N Tornetta  added the comment:

Thanks for the feedback. I certainly appreciate all the concerns around this 
proposed change.

@Mark.Shannon

1. This is the desired behaviour as profiling data should be attached to the 
actual code objects that correlate with the actual source content. Besides, in 
this respect, given the immutability of code objects, qualname behaves like 
name.

2. At the Python level it is already possible to get the __qualname__ of a 
function (but not of a code object). As this is all I needed, I kept my initial 
implementation to the bare minimum.

3. I agree with this analysis. Whilst this increases the memory footprint, it 
might have the benefit of making the derivation of __qualname__ faster as this 
would now be cached on code objects.

However, I also appreciate @pablogsal's point of view of evaluating the actual 
benefits. The extra point in favour of this change that I can make is that it 
would resolve name clashes in profiling data from tools that have minimal 
impact on the runtime. Whether this is enough to justify the extra memory cost 
is certainly up for debate. From my side, I don't have the numbers to make this 
case more concrete.

As a next step, I'll look into exposing the new field to Python to see what it 
actually ends up looking like.

--

___
Python tracker 

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



[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-06-29 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

I intended for someone to write some test programs and report back here what 
mypy actually supports and what it doesn't.

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Jack DeVries

Jack DeVries  added the comment:

mypy does not support __parameters__:

(venv) ➜  cpython git:(main) cat repro.py 
from typing import TypeVar
T = TypeVar('T')

(int | list[T]).__parameters__
(venv) ➜  cpython git:(main) mypy --version
mypy 0.920+dev.cae5d3c8b5f14d0796914aa6a113473ca3ffc38e
(venv) ➜  cpython git:(main) python --version
Python 3.11.0a0
(venv) ➜  cpython git:(main) mypy repro.py 
repro.py:4: error: "types.Union" has no attribute "__parameters__"
Found 1 error in 1 file (checked 1 source file)
(venv) ➜  cpython git:(main)


mypy also does not support __getitem__

(venv) ➜  cpython git:(main) cat repro.py 
from typing import TypeVar
T = TypeVar('T')

(int | list[T]).__getitem__
(venv) ➜  cpython git:(main) mypy --version
./mypy 0.920+dev.cae5d3c8b5f14d0796914aa6a113473ca3ffc38e
(venv) ➜  cpython git:(main) python --version
Python 3.11.0a0
(venv) ➜  cpython git:(main) mypy repro.py 
repro.py:4: error: Value of type "types.Union" is not indexable
Found 1 error in 1 file (checked 1 source file)
(venv) ➜  cpython git:(main)

--
nosy: +jack__d

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-29 Thread Steve Dower


Steve Dower  added the comment:

I'm going to revert this and replace it with a marshal.loads (and dumps) event 
instead.

The performance impact on loading .pyc files is too great, as it triggers the 
hook for each function. Without severely modifying importlib we can't bypass 
the call that's accessible to Python code, and the important part to detect is 
marshal calls outside of regular imports.

And wanted to mention that Yunfan Zhan suggested adding these events originally 
and I chose to go the other way. So my bad, and let's get it right now!

--
assignee:  -> steve.dower
nosy: +gvanrossum
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.11

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Mypy is definitely not going to support direct access to `__parameters__`; what 
Guido is referring to is whether usage of types.Union that would require 
`__parameters__` at runtime is accepted by mypy.

For example, this:

from typing import TypeVar

T = TypeVar("T")

Alias = int | list[T]

def f(x: Alias[str]) -> None:
pass

But this produces `main.py:7: error: Variable "main.Alias" is not valid as a 
type`: mypy doesn't even recognize `|` as a type yet.

I'd rather not focus too much though on what mypy does; it is one of many type 
checkers by now and does not tend to be the quickest in adding support for new 
features.

Pyright does handle the file above as I'd expect, for what it's worth.

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

So I guess to expand on Jelle's example, Alias[str] should return (int |
list[str]), right? That makes sense since that's how Union works.

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I'd also be OK with returning a `types.GenericAlias(int | list[T], str)`, which 
might be simpler. It doesn't matter for static type checkers, and runtime type 
checkers can extract what they need anyway.

--

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +25525
pull_request: https://github.com/python/cpython/pull/26959

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e2fea101fd5517f33371b04432842b971021c3bf by Pablo Galindo in 
branch 'main':
bpo-44523: Remove the pass-through for hash() in weakref proxy objects 
(GH-26950)
https://github.com/python/cpython/commit/e2fea101fd5517f33371b04432842b971021c3bf


--

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25526
pull_request: https://github.com/python/cpython/pull/26960

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f790bc8084d3dfd723889740f9129ac8fcb2fa02 by Miss Islington (bot) 
in branch '3.9':
bpo-44523: Remove the pass-through for hash() in weakref proxy objects 
(GH-26950) (GH-26960)
https://github.com/python/cpython/commit/f790bc8084d3dfd723889740f9129ac8fcb2fa02


--

___
Python tracker 

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



[issue44523] weakref.proxy documentation might be outdated

2021-06-29 Thread miss-islington


miss-islington  added the comment:


New changeset 2df13e1211cf420bf6557df02e694bf1653a0ebe by Miss Islington (bot) 
in branch '3.10':
bpo-44523: Remove the pass-through for hash() in weakref proxy objects 
(GH-26950)
https://github.com/python/cpython/commit/2df13e1211cf420bf6557df02e694bf1653a0ebe


--

___
Python tracker 

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



[issue44537] Document PGO in devguide

2021-06-29 Thread Guido van Rossum


New submission from Guido van Rossum :

The only docs for PGO seem to be in the toplevel README.rst. Sinec that is 
what's shown to all visitors to the GitHub repo, perhaps this information is 
not so useful there, and instead a section could be added to the devguide? 
(Ditto for LTO.)

Note that for Windows this info is in PCbuild/readme.txt. It's perhaps okay to 
keep it there, and just mention in the devguide that the Windows info in there.

FWIW, maybe we should get rid of the tradition that the toplevel README.rst 
file's heading gives the version? That tradition dates from the times when 
source distributions were done as tarballs... It would save one more place to 
update (there's another mention of the version later in README.rst which still 
points to 3.10).

--
assignee: docs@python
components: Documentation
messages: 396764
nosy: docs@python, gvanrossum
priority: normal
severity: normal
status: open
title: Document PGO in devguide
versions: Python 3.11

___
Python tracker 

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



[issue44538] ast.Slice 3.9.6 documentation bug

2021-06-29 Thread Tim


New submission from Tim :

Based off the ast 3.9.6 documentation  
(https://docs.python.org/3/library/ast.html), we would expect `Slice` to 
inherit from `expr`. However, looking at `ast.Slice.__mro__` produces the 
following output: `(, , , )`.

It appears that instead of inheriting from `expr`, `Slice` inherits from 
`slice` which appears to be a deprecated type.

--
assignee: docs@python
components: Documentation
messages: 396765
nosy: c3-timjbaer, docs@python
priority: normal
severity: normal
status: open
title: ast.Slice 3.9.6 documentation bug
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue44537] Document PGO in devguide

2021-06-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, there is now also info on how to build in the end user documentation in 
Doc/using/configure.rst. I am actually confused by the intention of documenting 
information about *building* CPython in the same place where we document 
*using* Python (and sometimes CPython), esp. given that we have a devguide. 
Maybe one of the docs owners can clarify where they thing PGO should be 
documented, and why?

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-29 Thread Ken Jin


Ken Jin  added the comment:

I don't think we need the types.GenericAlias(int | list[T], str)
workaround. GenericAlias already has code for extracting __parameters__ and
implementing __getitem__. Someone would need to refactor and reuse them for
Union too. That should be enough to trick GenericAlias to treat Union as
another GenericAlias(I don't remember if it checks for __origin__ as well)
and cover other edge cases as well.

@Yurii do you still plan to take this? If not, I'll start working on
something later today.

--

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2021-06-29 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +25527
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26961

___
Python tracker 

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



[issue44535] Cannot build in VS 2022

2021-06-29 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-06-29 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



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-06-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1d08d85cbe49c0748a8ee03aec31f89ab8e81496 by Illia Volochii in 
branch 'main':
bpo-43232: Remove previously deprecated methods on TransportSocket (GH-24538)
https://github.com/python/cpython/commit/1d08d85cbe49c0748a8ee03aec31f89ab8e81496


--
nosy: +serhiy.storchaka

___
Python tracker 

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