Skip to content

[3.9] bpo-42163, bpo-42189, bpo-42659: Support uname_tuple._replace (GH-23010) #24232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2021

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jan 16, 2021

(…for all but processor) (GH-23010)

  • Add test capturing missed expectation with uname_result._replace.

  • bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'.

  • Replace hard-coded length with one derived from the definition.

  • Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189).

  • bpo-42189: Exclude processor parameter when constructing uname_result.

  • In _make, rely on new to strip processor.

  • Add blurb.

  • iter is not necessary here.

  • Rely on num_fields in new

  • Add test for slices on uname

  • Add test for copy and pickle.

Co-authored-by: Serhiy Storchaka [email protected]

  • import pickle

  • Fix equality test after pickling.

  • Simply rely on reduce for pickling.

Co-authored-by: Serhiy Storchaka [email protected]
(cherry picked from commit a6fd0f4)

Co-authored-by: Jason R. Coombs [email protected]

https://bugs.python.org/issue42163

…for all but processor) (GH-23010)

* Add test capturing missed expectation with uname_result._replace.

* bpo-42163: Override uname_result._make to allow uname_result._replace to work (for everything but 'processor'.

* Replace hard-coded length with one derived from the definition.

* Add test capturing missed expectation with copy/deepcopy on namedtuple (bpo-42189).

* bpo-42189: Exclude processor parameter when constructing uname_result.

* In _make, rely on __new__ to strip processor.

* Add blurb.

* iter is not necessary here.

* Rely on num_fields in __new__

* Add test for slices on uname

* Add test for copy and pickle.

Co-authored-by: Serhiy Storchaka <[email protected]>

* import pickle

* Fix equality test after pickling.

* Simply rely on __reduce__ for pickling.

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit a6fd0f4)

Co-authored-by: Jason R. Coombs <[email protected]>
@bedevere-bot
Copy link

@jaraco: Please replace # with GH- in the commit message next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants