[issue44735] Failed venv Activation With "&" In Folder Name

2021-07-24 Thread adore_blvnk


New submission from adore_blvnk :

This is relating to activation of venvs. This was first discovered in VS Code, 
but can be replicated in Windows CMD & PyCharm too. 

Normally, creating a virtual environment via
py -m venv venv 
would create the venv.

Next would be the activation of the venv, example: 
"c:/Users/normal/venv/Scripts/activate.bat"

This activates the venv, & using a pip command would install the respective 
packages in the "site-packages" folder in the venv.

HOWEVER, creating a NEW folder "c:/Users/is & allowed", creating the venv, & 
attempting to activate it as follows:
"c:/Users/is & allowed/venv/Scripts/activate.bat"

Will throw an error:
The system cannot find the path specified.

Do note that in the 2nd attempt, the presence of character "&" will throw the 
error.

--
components: Windows
messages: 398179
nosy: adore_blvnk, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Failed venv Activation With "&" In Folder Name
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



[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-24 Thread Charles Burkland


Change by Charles Burkland :


--
keywords: +patch
nosy: +chaburkland
nosy_count: 6.0 -> 7.0
pull_requests: +25887
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27346

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Ken Jin


Ken Jin  added the comment:

This is fixed. Thanks Yurii and Serhiy for the patches :) (and everyone else 
for the reviews too).

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Filipe Laíns

Change by Filipe Laíns :


--
pull_requests: +25886
pull_request: https://github.com/python/cpython/pull/27344

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Hasan  added the comment:

should have a deprecation period and if so, how long?

--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Logan Jones


Change by Logan Jones :


--
keywords: +patch
nosy: +loganasherjones
nosy_count: 1.0 -> 2.0
pull_requests: +25885
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27343

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Change by Hasan :


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

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset 0a8ae8a50a0fea3d39ec49b220a5c7a5b70e36f8 by Filipe Laíns in 
branch 'main':
bpo-44717: improve AttributeError on circular imports of submodules (GH-27338)
https://github.com/python/cpython/commit/0a8ae8a50a0fea3d39ec49b220a5c7a5b70e36f8


--

___
Python tracker 

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



Re: Python and Ubuntu versions

2021-07-24 Thread Mike Easter

Terry Reedy wrote:

Mike Easter wrote:
For those who are following this thread on a conventional news server, 
there are missing parts which came from the python-list mailing list 
instead.


For those who prefer an nntp access to the mailing list, the 
corresponding group on news.gmane.io is gmane.comp.python.general.


Posting there is unconventional.


Huh?  If you read this, posting from gmane works fine!

In the past, old gmane required posting w/ a good email because the 
gmane server required you to receive an email and self-approve your posting.


So, are you saying that gmane didn't require you to approve/authorize 
your msg?


I was able to read your msg on both gmane's and my conventional nntp.  I 
replied on my conventional NIN because my typical config (and my config 
on the experimental gmane acct) was w/ a bogus/invalid email, and 
previously an accidental attempt to post on gmane that way failed.



--
Mike Easter
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python and Ubuntu versions

2021-07-24 Thread Mike Easter

Mike Easter wrote:

Terry Reedy wrote:

Mike Easter wrote:
For those who are following this thread on a conventional news 
server, there are missing parts which came from the python-list 
mailing list instead.


For those who prefer an nntp access to the mailing list, the 
corresponding group on news.gmane.io is gmane.comp.python.general.


Posting there is unconventional.


Huh?  If you read this, posting from gmane works fine!

In the past, old gmane required posting w/ a good email because the 
gmane server required you to receive an email and self-approve your 
posting.


So, are you saying that gmane didn't require you to approve/authorize 
your msg?


I was able to read your msg on both gmane's and my conventional nntp.  I 
replied on my conventional NIN because my typical config (and my config 
on the experimental gmane acct) was w/ a bogus/invalid email, and 
previously an accidental attempt to post on gmane that way failed.


I'm reading a msg that suggests that if you a sub/ed to the py-list, 
that takes care of the gmane 'unconventional' problem.



--
Mike Easter
--
https://mail.python.org/mailman/listinfo/python-list


[issue43944] Processes in Python 3.9 exiting with code 1 when It's created inside a ThreadPoolExecutor

2021-07-24 Thread Genaro Camele


Genaro Camele  added the comment:

Hi @jack__d, thanks for your answer and time. Unfortunately, It's still a 
regression, as in Python < 3.9 my example works as expected

--

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 0aea99e44416f37c75e5540072156dbf90ef1659 by Miss Islington (bot) 
in branch '3.10':
bpo-44676: Serialize the union type using only public API (GH-27323) (GH-27340)
https://github.com/python/cpython/commit/0aea99e44416f37c75e5540072156dbf90ef1659


--

___
Python tracker 

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



Re: Python and Ubuntu versions

2021-07-24 Thread Terry Reedy

On 7/23/2021 5:11 PM, Mike Easter wrote:
For those who are following this thread on a conventional news server, 
there are missing parts which came from the python-list mailing list 
instead.


For those who prefer an nntp access to the mailing list, the 
corresponding group on news.gmane.io is gmane.comp.python.general.


Posting there is unconventional.


Huh?  If you read this, posting from gmane works fine!


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Python and Ubuntu versions

2021-07-24 Thread Mike Easter
For those who are following this thread on a conventional news server, 
there are missing parts which came from the python-list mailing list 
instead.


For those who prefer an nntp access to the mailing list, the 
corresponding group on news.gmane.io is gmane.comp.python.general.


Posting there is unconventional.


--
Mike Easter
--
https://mail.python.org/mailman/listinfo/python-list


Re: Where to keep local Python modules?

2021-07-24 Thread Chris Green
Cameron Simpson  wrote:
> 
> Almost everything I use comes either from pip or from my own modules. My 
> $PYTHONPATH on the Mac has this:
> 
> /Users/cameron/lib/python:/Users/cameron/rc/python
> 
> being, respectively, my personal modules and a place for third party 
> modules which do not come from pip. That latter is an empty set, but 
> it's there. I doubt you'd need to bother with the latter; I doubt I need 
> to either.
> 
Yes, I think maybe something in a 'lib' directory somewhere makes
sense. I like to keep my home directory as uncluttered as possible
though so maybe I'll keep the lib directory under ~/.config or
~/.local.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2021-07-24 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Which comes out 'Tr̥Tīyā'.  The underdot '̥' is '0x325'

--

___
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-07-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

There is a subtle difference between traceback.py and Python/traceback.c which 
makes the latter (C version) output the line without trimming the trailing 
whitespace. The Python version simply uses `.strip()` which strips both the 
left (starting) and right (ending) side. I'd personally go with adapting the C 
version to use full strip, since it makes more sense but I am open to comments 
on this. 

Here is an example test (needs GH 27339 first) (func( call has 2 trailing 
whitespace characters);
https://gist.github.com/isidentical/37ab1693d551b678a52626298d99e582

--

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25883
pull_request: https://github.com/python/cpython/pull/27340

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 435a0334d341e5f8faed594d9f015746bb7845db by Serhiy Storchaka in 
branch 'main':
bpo-44676: Serialize the union type using only public API (GH-27323)
https://github.com/python/cpython/commit/435a0334d341e5f8faed594d9f015746bb7845db


--

___
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-07-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +25882
pull_request: https://github.com/python/cpython/pull/27339

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Filipe Laíns

Change by Filipe Laíns :


--
pull_requests: +25881
pull_request: https://github.com/python/cpython/pull/27338

___
Python tracker 

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



Re: a clean exit

2021-07-24 Thread Dieter Maurer
jak wrote at 2021-7-23 10:55 +0200:
> ...
>The problem is that sometimes I get an error from the library (python-
>telegram-bot) via logging that my bot has no way of intercepting. The
>error is "connection reset by pear" after which my program is no longer
>called and I need to restart it. Typically this happens when Telegram
>runs an update.

"Connection reset by peer" means that the other end of the connection
(the so called "peer") has closed the connection.
You will need to open a new connection (as the old one can no longer
be used).
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43950] Include column offsets for bytecode instructions

2021-07-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:


New changeset 4f5980a4f57dab68b9137304f58bd08891d43d5a by Batuhan Taskaya in 
branch 'main':
bpo-43950: support long lines in traceback.py (GH-27336)
https://github.com/python/cpython/commit/4f5980a4f57dab68b9137304f58bd08891d43d5a


--

___
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-07-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:


New changeset ef8b8535cb3cd705392af9b927d6ff336d98427d by Batuhan Taskaya in 
branch 'main':
bpo-43950: check against the raw string, not the pyobject (GH-27337)
https://github.com/python/cpython/commit/ef8b8535cb3cd705392af9b927d6ff336d98427d


--

___
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-07-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +25880
pull_request: https://github.com/python/cpython/pull/27337

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Interpreter Core, Library (Lib)
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



[issue43950] Include column offsets for bytecode instructions

2021-07-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +25879
pull_request: https://github.com/python/cpython/pull/27336

___
Python tracker 

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



[issue44693] Unclear definition of the "__future__" module in Docs

2021-07-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yes, ask me to review.

--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson


Change by Mark Dickinson :


--
keywords: +easy

___
Python tracker 

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



[issue44728] Testsuite fails on x86_64

2021-07-24 Thread Mark Dickinson


Mark Dickinson  added the comment:

Looks like the turtle code was changed to use `math.hypot` instead of `** 0.5` 
in issue #41528. That will likely also fix the test failure, but I've opened 
#44734 to fix the unnecessarily strict test.

--

___
Python tracker 

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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson


Change by Mark Dickinson :


--
type:  -> behavior
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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2021-07-24 Thread Mark Dickinson


New submission from Mark Dickinson :

>From the tests for Vec2D.__abs__ in the turtle module we have:

def test_distance(self):
vec = Vec2D(6, 8)
expected = 10
self.assertEqual(abs(vec), expected)


vec = Vec2D(0, 0)
expected = 0
self.assertEqual(abs(vec), expected)


vec = Vec2D(2.5, 6)
expected = 6.5
self.assertEqual(abs(vec), expected)

GitHub link: 
https://github.com/python/cpython/blob/8158e059e9952f08d19a18d3e9e021cee2393cd2/Lib/test/test_turtle.py#L237-L248

The first test was reported as failing in issue #44728, with error:

==
FAIL: test_distance (test.test_turtle.TestVec2D)
--
Traceback (most recent call last):
  File "/build/python/src/Python-3.9.6/Lib/test/test_turtle.py", line 237, in 
test_distance
self.assertEqual(abs(vec), expected)
AssertionError: 9.998 != 10

The first and last test should use assertAlmostEqual with a suitable tolerance 
(the default tolerance is probably fine).

--
messages: 398166
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: turtle: tests for Vec2D.__abs__ are too strict

___
Python tracker 

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



[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2021-07-24 Thread Vishvas Vasuki

Vishvas Vasuki  added the comment:

This case still fails with 3.9 - 

'Tr̥tīyā'.title()

--
nosy: +vishvas.vasuki

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 5.0 -> 6.0
pull_requests: +25878
pull_request: https://github.com/python/cpython/pull/27335

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Ken Jin

Ken Jin  added the comment:

Thanks a bunch Yurii, Serhiy, Jelle, Łukasz and Pablo for working on this! I'm 
re-closing this issue. *Fingers-crossed* we won't have to open this again ;-).

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-24 Thread Brandt Bucher


Brandt Bucher  added the comment:

Yup, I plan on having it in this weekend.

--

___
Python tracker 

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



[issue44728] Testsuite fails on x86_64

2021-07-24 Thread Mark Dickinson


Mark Dickinson  added the comment:

The test_posix failure appears to be unrelated; I'll let others look into that 
one.

The test_turtle failure looks again like a libm issue, perhaps combined with an 
overeager test: we're expecting a `** 0.5` operation (which translates to a 
libm pow call) to give exact results when the square root is exactly 
representable.

--

___
Python tracker 

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



[issue44728] Testsuite fails on x86_64

2021-07-24 Thread Mark Dickinson


Mark Dickinson  added the comment:

Extract from the log - from the configure output:

> checking for expm1... yes

and from the test output

> expm10118: expm1(27.0): expected 532048240600.79865, got 532048240600.7976 
> (error = 0.00104 (17 ulps); permitted error = 0 or 5 ulps)
> expm10119: expm1(123.0): expected 2.6195173187490626e+53, got 
> 2.619517318749054e+53 (error = 8.51e+38 (20 ulps); permitted error = 0 or 5 
> ulps)
> expm10300: expm1(300.0): expected 1.9424263952412558e+130, got 
> 1.942426395241274e+130 (error = 1.82e+116 (74 ulps); permitted error = 0 or 5 
> ulps)
> expm10301: expm1(700.0): expected 1.0142320547350045e+304, got 
> 1.0142320547349733e+304 (error = 3.12e+290 (256 ulps); permitted error = 0 or 
> 5 ulps)
> expm10307: expm1(709.5): expected 1.3549863193146328e+308, got 
> 1.354986319314675e+308 (error = 4.21e+294 (211 ulps); permitted error = 0 or 
> 5 ulps)

The first part indicates that your math library does provide expm1, so Python 
goes ahead and uses it. The errors from test_math show that the expm1 
implementation provided by your math library has accuracy problems for large 
inputs. From the other failures, I suspect that the underlying issue is 
actually an issue with exp (but our tests for exp are not so thorough as those 
for expm1).

In short, the tests represent issues with the underlying C math library. What 
OS is this, and who supplies the libm?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ca5a4cf8266cf789eae379fe224458e94dd41b30 by Ken Jin in branch 
'3.10':
bpo-44731: Simplify the union type implementation (GH-27318) (GH-27334)
https://github.com/python/cpython/commit/ca5a4cf8266cf789eae379fe224458e94dd41b30


--

___
Python tracker 

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



[issue43944] Processes in Python 3.9 exiting with code 1 when It's created inside a ThreadPoolExecutor

2021-07-24 Thread Jack DeVries


Jack DeVries  added the comment:

Ah never mind. @Genarito, the ThreadPoolExecutor is supposed to be used as a 
context manager. In your current code, the script ends and Python starts 
tearing itself down while `execute_error` is still running in a subprocess.

If you simply use the ThreadPoolExecutor to a context manager, the error goes 
away::

```python
from multiprocessing import Process
from concurrent.futures import ThreadPoolExecutor


def some_task():
pass


def execute_error():
p = Process(target=some_task)
p.start()
p.join()
print(p.exitcode)  # This is always 1 on a ThreadPoolExecutor!!!


# THIS IS THE IMPORTANT CHANGE
with ThreadPoolExecutor(max_workers=4) as executor:
executor.submit(execute_error)
```

--

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread miss-islington


miss-islington  added the comment:


New changeset 8158e059e9952f08d19a18d3e9e021cee2393cd2 by Pablo Galindo Salgado 
in branch 'main':
bpo-44676: Fix reference leaks in union_reduce (GH-27332)
https://github.com/python/cpython/commit/8158e059e9952f08d19a18d3e9e021cee2393cd2


--
nosy: +miss-islington

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +25877
pull_request: https://github.com/python/cpython/pull/27334

___
Python tracker 

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



[issue43944] Processes in Python 3.9 exiting with code 1 when It's created inside a ThreadPoolExecutor

2021-07-24 Thread Jack DeVries


Jack DeVries  added the comment:

I am working on a fix for this bug. I'm a beginner cpython contributor, so if 
anyone recognizes this as a fool's errand, please let me know!

--
nosy: +jack__d

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 9356d1e47de583fd794e9d29abc448759f7a4109 by Pablo Galindo Salgado 
in branch '3.10':
[3.10] bpo-44676: Add ability to serialize types.Union (GH-27244) (GH-27333)
https://github.com/python/cpython/commit/9356d1e47de583fd794e9d29abc448759f7a4109


--

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25876
pull_request: https://github.com/python/cpython/pull/27333

___
Python tracker 

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



[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> release blocker

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 08284231275ac9cc60ae27eab2338805919d8881 by Serhiy Storchaka in 
branch 'main':
bpo-44731: Simplify the union type implementation (GH-27318)
https://github.com/python/cpython/commit/08284231275ac9cc60ae27eab2338805919d8881


--
nosy: +pablogsal

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3eae8f20d7b6f88d3618b0afc94893165a914022 by Pablo Galindo Salgado 
in branch 'main':
Revert "bpo-44717: improve AttributeError on circular imports of submodules 
(GH-27299)" (GH-27331)
https://github.com/python/cpython/commit/3eae8f20d7b6f88d3618b0afc94893165a914022


--

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +25875
pull_request: https://github.com/python/cpython/pull/27332

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This PR has introduced reference leaks. Bisecting points to:

fe13f0b0f696464dd6f283576668dbf57cb11399 is the first bad commit
commit fe13f0b0f696464dd6f283576668dbf57cb11399
Author: Yurii Karabas <1998uri...@gmail.com>
Date:   Fri Jul 23 12:47:00 2021 +0300

bpo-44676: Add ability to serialize types.Union (GH-27244)

 Lib/test/test_types.py | 35 +++
 Lib/typing.py  |  4 +-
 .../2021-07-19-19-53-46.bpo-44676.WgIMvh.rst   |  2 +
 Objects/unionobject.c  | 51 ++
 4 files changed, 90 insertions(+), 2 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core and 
Builtins/2021-07-19-19-53-46.bpo-44676.WgIMvh.rst
bisect run successfe13f0b0f696464dd6f283576668dbf57cb11399 is the first bad 
commit
commit fe13f0b0f696464dd6f283576668dbf57cb11399
Author: Yurii Karabas <1998uri...@gmail.com>
Date:   Fri Jul 23 12:47:00 2021 +0300

bpo-44676: Add ability to serialize types.Union (GH-27244)

 Lib/test/test_types.py | 35 +++
 Lib/typing.py  |  4 +-
 .../2021-07-19-19-53-46.bpo-44676.WgIMvh.rst   |  2 +
 Objects/unionobject.c  | 51 ++
 4 files changed, 90 insertions(+), 2 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core and 
Builtins/2021-07-19-19-53-46.bpo-44676.WgIMvh.rst
bisect run success

Example failure:

https://buildbot.python.org/all/#/builders/259/builds/100

Ran 106 tests in 0.053s
OK
..
test_types leaked [2, 2, 2] references, sum=6
test_types leaked [1, 1, 1] memory blocks, sum=3
1 test failed again:
test_types
== Tests result: FAILURE then FAILURE ==
413 tests OK.

--
nosy: +pablogsal

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am closing this one again, apologies for the confusion.

--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Bisecting points to:

fe13f0b0f696464dd6f283576668dbf57cb11399 is the first bad commit
commit fe13f0b0f696464dd6f283576668dbf57cb11399
Author: Yurii Karabas <1998uri...@gmail.com>
Date:   Fri Jul 23 12:47:00 2021 +0300

bpo-44676: Add ability to serialize types.Union (GH-27244)

 Lib/test/test_types.py | 35 +++
 Lib/typing.py  |  4 +-
 .../2021-07-19-19-53-46.bpo-44676.WgIMvh.rst   |  2 +
 Objects/unionobject.c  | 51 ++
 4 files changed, 90 insertions(+), 2 deletions(-)
 create mode 100644 Misc/NEWS.d/next/Core and 
Builtins/2021-07-19-19-53-46.bpo-44676.WgIMvh.rst
bisect run success

--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:

types is not typing. This is a different failure from what we've seen before. 
I'll fix that today.

--

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Pick any of the failing refleak buildbots. For example:

https://buildbot.python.org/all/#/builders/280/builds/99

You will see:

--
Ran 106 tests in 0.074s
OK
..
test_types leaked [2, 2, 2] references, sum=6
test_types leaked [1, 1, 1] memory blocks, sum=3
1 test failed again:
test_types

--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Ken Jin


Ken Jin  added the comment:

@Pablo, I don't think this change is causing the buildbots to fail. The test 
failure on all the currently failing buildbots is:

==
ERROR: test_absolute_circular_submodule (test.test_import.CircularImportTests)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.11/test/test_import/__init__.py",
 line 1355, in test_absolute_circular_submodule
import test.test_import.data.circular_imports.subpkg2.parent

ModuleNotFoundError: No module named 
'test.test_import.data.circular_imports.subpkg2'
--

Which seems to be GH-27299.

--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The buildbots are still not green. Unfortunately we will need to revert all PRs 
if this is not fixed soon as this is already making other issues

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

There is a buildbot failure after merging this PR:

https://buildbot.python.org/all/#/builders/464/builds/574

If is not fixed in 24 we will need to revert per our buildbot policy

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The release candidate is soon, so I would recommend to land a fix as soon as 
possible so it can be tested for some time before is released, if that is 
possible.

--
nosy: +pablogsal

___
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-07-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c8362314cce53a5b59da7523fbdfa00f122aa319 by Batuhan Taskaya in 
branch 'main':
bpo-43950: ensure source_line is present when specialising the traceback 
(GH-27313)
https://github.com/python/cpython/commit/c8362314cce53a5b59da7523fbdfa00f122aa319


--

___
Python tracker 

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



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2021-07-24 Thread Ram Rachum


New submission from Ram Rachum :

I love `concurrent.futures`, and I'd like to use it wherever I can. There's a 
feature in `multiprocessing.Pool` that I wish would also be available in 
`ProcessPoolExecutor`: The `maxtasksperchild` argument.

Documentation: "maxtasksperchild is the number of tasks a worker process can 
complete before it will exit and be replaced with a fresh worker process, to 
enable unused resources to be freed. The default maxtasksperchild is None, 
which means worker processes will live as long as the pool."

I want to be able to set it to 1, so each process will only execute one task 
and then be replaced with a fresh process.

--
components: Library (Lib)
messages: 398143
nosy: cool-RR, pitrou
priority: normal
severity: normal
status: open
title: Feature request: maxtasksperchild for ProcessPoolExecutor
type: enhancement
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



[issue44694] Message from BytesParser cannot be flattened immediately

2021-07-24 Thread Vitas Ivanoff


Change by Vitas Ivanoff :


Added file: https://bugs.python.org/file50178/0.msg

___
Python tracker 

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



[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-24 Thread Eric V. Smith


Eric V. Smith  added the comment:

Also, when dataclasses was originally written, it deliberately did not import 
typing, for performance reasons. I don't know if PEP 560 (I think) improved 
performance enough to make a difference. But adding this dependency needs to be 
looked at.

But if we are going to import typing, there are other changes that I'd like to 
make, like improving the ClassVar stuff.

--

___
Python tracker 

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



[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-24 Thread Eric V. Smith

Eric V. Smith  added the comment:

I’m deferring any action on this until PEP 649 is ruled on.

--
assignee:  -> eric.smith

___
Python tracker 

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



[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-24 Thread Misha Drachuk


Change by Misha Drachuk :


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

___
Python tracker 

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



[issue44713] subprocess.rst typo ``"shell=True"`` => ``shell=True``

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5d9c86e340b40379d18ffeb7ce1739e07bdeb536 by Miss Islington (bot) 
in branch '3.9':
bpo-44713: [doc fix]: typo in subprocess.rst (GH-27297) (#27327)
https://github.com/python/cpython/commit/5d9c86e340b40379d18ffeb7ce1739e07bdeb536


--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e8c01749c02a97a2f5b01086951bb564121c5113 by Miss Islington (bot) 
in branch '3.10':
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302) (GH-27328)
https://github.com/python/cpython/commit/e8c01749c02a97a2f5b01086951bb564121c5113


--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25872
pull_request: https://github.com/python/cpython/pull/27328

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 05f5d8e48c86c8025d3f82285666d93e52e360f9 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-44353: Expand NewType tests for complex __qualname__ (GH-27311) 
(GH-27326)
https://github.com/python/cpython/commit/05f5d8e48c86c8025d3f82285666d93e52e360f9


--

___
Python tracker 

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



[issue44713] subprocess.rst typo ``"shell=True"`` => ``shell=True``

2021-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25871
pull_request: https://github.com/python/cpython/pull/27327

___
Python tracker 

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



[issue44713] subprocess.rst typo ``"shell=True"`` => ``shell=True``

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 45caee27159aa89b8dbcfde0c5faedea5f965584 by Miss Islington (bot) 
in branch '3.10':
bpo-44713: [doc fix]: typo in subprocess.rst (GH-27297) (GH-27298)
https://github.com/python/cpython/commit/45caee27159aa89b8dbcfde0c5faedea5f965584


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a22b05da87bdfb081d6aaecfce136ae8dbb8680c by Yurii Karabas in 
branch 'main':
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302)
https://github.com/python/cpython/commit/a22b05da87bdfb081d6aaecfce136ae8dbb8680c


--

___
Python tracker 

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks a lot for your report and patch, Filipe! ✨  ✨

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



[issue44717] Improve AttributeError on circular imports of submodules

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 8072a1181dd64135f700b44372fbf7bf91e68072 by Filipe Laíns in 
branch 'main':
bpo-44717: improve AttributeError on circular imports of submodules (GH-27299)
https://github.com/python/cpython/commit/8072a1181dd64135f700b44372fbf7bf91e68072


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +25870
pull_request: https://github.com/python/cpython/pull/27326

___
Python tracker 

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for your quick pull request, Dennis! ✨  ✨

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0a08f22184aef6e36bb8bb7ad84207e47594f46e by Miss Islington (bot) 
in branch '3.9':
bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ 
(GH-27316) (#27325)
https://github.com/python/cpython/commit/0a08f22184aef6e36bb8bb7ad84207e47594f46e


--

___
Python tracker 

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 659030c7d56a329c1aa559678f2df15e306215e4 by Miss Islington (bot) 
in branch '3.10':
bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ 
(GH-27316) (GH-27324)
https://github.com/python/cpython/commit/659030c7d56a329c1aa559678f2df15e306215e4


--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Hasan  added the comment:

If nobody works on it i would like to fix it

--
nosy: +AliyevH

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d15949a845a6db66675bca7105ad508ba9e79639 by Miss Islington (bot) 
in branch '3.10':
bpo-44353: Document that typing.NewType is now a class (GH-27319) (GH-27321)
https://github.com/python/cpython/commit/d15949a845a6db66675bca7105ad508ba9e79639


--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There are differences between typing.Union and types.Union:

* typing.Union is indexable, types.Union is not.
* types.Union is a class, typing.Union is not.

types.Union corresponds to typing._UnionGenericAlias, not typing.Union. It is 
confusing that typing.Union and types.Union have the same name. Note also that 
most classes in the types module have the "Type" suffix: FunctionType, 
MethodType, ModuleType, etc. I think that it would be better to rename 
types.Union to types.UnionType.

--
components: Interpreter Core
messages: 398128
nosy: gvanrossum, kj, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Rename types.Union to types.UnionType
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25869
pull_request: https://github.com/python/cpython/pull/27325

___
Python tracker 

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5370f0a82aaa4ba617070d5c71d2b18236096ac0 by Dennis Sweeney in 
branch 'main':
bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ 
(GH-27316)
https://github.com/python/cpython/commit/5370f0a82aaa4ba617070d5c71d2b18236096ac0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44720] Weakref proxy crashes on null tp_iternext slot.

2021-07-24 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue44611] CPython uses deprecated randomness API

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 4463fa2fa111e03f7ec47e6e9d433104aa943605 by Dong-hee Na in branch 
'main':
bpo-44611: Update docs for os and whatsnew 3.11 (#27314)
https://github.com/python/cpython/commit/4463fa2fa111e03f7ec47e6e9d433104aa943605


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44676] Add ability to serialise types.Union

2021-07-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not good to use private method in pickle, because we will not be able to 
get rid of it for backward compatibility. Why not use functools.reduce()?

--
nosy: +serhiy.storchaka
status: closed -> open

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It fixes also issue44642.

--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25866
pull_request: https://github.com/python/cpython/pull/27321

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7aac3f623610cf3dffbf548a5be5bfd4fa6790a0 by Ken Jin in branch 
'main':
bpo-44353: Document that typing.NewType is now a class (#27319)
https://github.com/python/cpython/commit/7aac3f623610cf3dffbf548a5be5bfd4fa6790a0


--

___
Python tracker 

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



[issue44693] Unclear definition of the "__future__" module in Docs

2021-07-24 Thread Steven Hsu


Steven Hsu  added the comment:

Applying above suggestions, the first sentence of the entry "__future__" would 
be replaced by:

A :ref:`future statement `, "from __future__ import *feature* ...", 
directs the compiler to compile the current module using syntax or semantics 
that will become standard in a future release of Python. The :mod:`__future__` 
module documents the possible values of *feature*.

And the confusing sentence, "A pseudo-module which programmers can use to 
enable new language features which are not compatible with the current 
interpreter." would be removed.

Can I fix this issue this way? 
If confirmed, I would make a PR for this issue.

--
:ref:`future` -> 
https://docs.python.org/3.9/reference/simple_stmts.html#future-statements
:mod:`__future__` -> 
https://docs.python.org/3.9/library/__future__.html#module-__future__

--

___
Python tracker 

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



[issue43145] Leak of locks from multiprocessing.Process

2021-07-24 Thread hai shi


hai shi  added the comment:

> The following locks are leaked:
> 1. 
> https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L78
> 2. 
> https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L84
> 3. 
> https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L90
> 4. https://github.com/python/cpython/blob/master/Python/ceval.c#L810
> 5. https://github.com/python/cpython/blob/master/Python/import.c#L126
> 6. and 7. 
> https://github.com/python/cpython/blob/master/Modules/_threadmodule.c#L597

Hi, Boris. Thanks for your report. We may receive the wrong alarm sometimes 
when we use valgrind.
 
1. 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/pystate.c#L78
   free in here: 
https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L127
2. https://github.com/python/cpython/blob/main/Python/ceval.c#L741
   free in here: 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/pystate.c#L375
3. 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/import.c#L124
4. free in here: 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/import.c#L156
5. 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Modules/_threadmodule.c#L613
   free in here: 
https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Modules/_threadmodule.c#L74
   To tihs refleak, I can't get the entire traceback of newobject. But I 
haven't get refleak when I run `./python -m test _test_multiprocessing -R 3:3 
-vv`.

--
nosy: +shihai1991
versions: +Python 3.11 -Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50177/valgrind output.txt

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +25865
pull_request: https://github.com/python/cpython/pull/27319

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e89ef0ad2a299770a88ece8f7a316f7d3eb65c9f by Serhiy Storchaka in 
branch 'main':
bpo-44353: Expand NewType tests for complex __qualname__. (#27311)
https://github.com/python/cpython/commit/e89ef0ad2a299770a88ece8f7a316f7d3eb65c9f


--

___
Python tracker 

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



[issue44353] PEP 604 NewType

2021-07-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +25864
pull_request: https://github.com/python/cpython/pull/9951

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue44731] Simplify implementation of the union type

2021-07-24 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The proposed PR simplifies implementation of the union type by removing direct 
support of typing types. It was not necessary because all these types implement 
__or__ and __ror__ methods.

The only visible difference is that int | TypeVar() etc returns now 
typing.Union instead of types.Union. But TypeVar() | int already returns 
typing.Union.

--
components: Interpreter Core
messages: 398119
nosy: gvanrossum, kj, serhiy.storchaka, uriyyo
priority: normal
severity: normal
status: open
title: Simplify implementation of the union type
type: enhancement
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



[issue44674] dataclasses should allow frozendict default value

2021-07-24 Thread Gianni Mariani


Gianni Mariani  added the comment:

@Arjun - this is about default values (See the bug description - Using a 
frozendict as a default value)

Try this:

from frozendict import frozendict
from dataclasses import dataclass

@dataclass
class A:
a: frozendict = frozendict(a=1)

This used to work until frozendict became a subclass of dict.

Perhaps another fix is to convert any dict to a frozendict? Maybe not.

How would you handle this case? The only thing I figured was:
from frozendict import frozendict, field
from dataclasses import dataclass

AD=frozendict(a=1)
@dataclass
class A:
a: frozendict = field(default_factory=lambda:AD)

Which imho is cumbersome.

--

___
Python tracker 

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



  1   2   >