Skip to content
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

Tin/py311 #973

Merged
merged 6 commits into from Jun 24, 2022
Merged

Tin/py311 #973

merged 6 commits into from Jun 24, 2022

Conversation

Tinche
Copy link
Member

@Tinche Tinche commented Jun 22, 2022

No description provided.

@Tinche Tinche requested a review from hynek June 22, 2022 10:51
tests/test_slots.py Outdated Show resolved Hide resolved
Copy link
Member

@hynek hynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so um it doesn't look like we're testing here anything? those asserts needs to be fixed.

also can you pls pull in the changes from #969 so CI actually runs against 3.11? 😅

thanks!

Comment on lines +2278 to +2280
assert getattr(object, "__setstate__", None) is getattr(
C, "__setstate__", None
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm this makes no sense to me…this would pass if both don't exist, and if both are the same thing. this doesn't seem like a good test to me :)

maybe have two asserts, depending on version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But... that's what we want. If both don't exist, or both exist and are the same, the functionality is correct. Right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh…i guess i'll take your word for it? it just seems like there's cases where it passes when it shouldn't 🤔

just merge the other shit in then ¯_(ツ)_/¯

tests/test_make.py Show resolved Hide resolved

assert None is getattr(i, "__getstate__", None)
assert None is getattr(i, "__setstate__", None)
assert getattr(object, "__getstate__", None) is getattr(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

assert None is getattr(i, "__getstate__", None)
assert None is getattr(i, "__setstate__", None)
assert getattr(object, "__getstate__", None) is getattr(
C, "__getstate__", None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Tinche
Copy link
Member Author

Tinche commented Jun 23, 2022

so um it doesn't look like we're testing here anything? those asserts needs to be fixed.

also can you pls pull in the changes from #969 so CI actually runs against 3.11? 😅

thanks!

This is a PR into #969, so we just merge it in? I have no idea why no tests are running here.

@hynek
Copy link
Member

hynek commented Jun 24, 2022

ah sorry, i missed that!

@hynek hynek merged commit 951e0a3 into py311 Jun 24, 2022
@hynek hynek deleted the tin/py311 branch June 24, 2022 05:57
hynek added a commit that referenced this pull request Jun 24, 2022
* Add support for Python 3.11

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>

* Tin/py311 (#973)

* Fix test_slots::TestPickle::test_no_getstate_setstate_for_dict_classes

* Fix annotations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Tweak tests for 3.10

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Tweak tests some more

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: Tin Tvrtković <tinchester@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

None yet

2 participants