This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improve `test_typing::test_immutability_by_copy_and_pickle`
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: JelleZijlstra, corona10, gvanrossum, kj, sobolevn
Priority: normal Keywords: patch

Created on 2022-01-15 10:08 by sobolevn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30613 merged sobolevn, 2022-01-15 10:17
Messages (5)
msg410636 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-15 10:08
There are several problems with this test: https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_typing.py#L2130
1. It does not test all `pickle` protocols
2. It does not test newly added `ParamSpec` (probably others, I will double check)
3. It does not clean up `global TP, TPB, TPV`

I will send a PR for this :)
msg410675 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2022-01-16 05:38
The additional tests would also be useful to have in https://github.com/python/typing/tree/master/typing_extensions if you're interested.
msg410677 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-16 07:11
Thank you, Jelle. Will send a PR to typing_extensions today as well :)
msg410678 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2022-01-16 07:32
New changeset 09087b8519316608b85131ee7455b664c00c38d2 by Nikita Sobolev in branch 'main':
bpo-46386: improve `test_typing:test_immutability_by_copy_and_pickle` (GH-30613)
https://github.com/python/cpython/commit/09087b8519316608b85131ee7455b664c00c38d2
msg410679 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2022-01-16 07:33
Thank you @sobolevn !
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90544
2022-01-16 07:33:19corona10setstatus: open -> closed

messages: + msg410679
stage: patch review -> resolved
2022-01-16 07:32:24corona10setnosy: + corona10
messages: + msg410678
2022-01-16 07:11:42sobolevnsetmessages: + msg410677
2022-01-16 05:38:05JelleZijlstrasetnosy: + JelleZijlstra
messages: + msg410675
2022-01-15 10:17:24sobolevnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28816
2022-01-15 10:15:21AlexWaygoodsetnosy: + gvanrossum, kj
2022-01-15 10:08:28sobolevncreate