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

Fix bug in resolve_types with subclasses #843

Merged
merged 7 commits into from
Sep 19, 2021

Conversation

euresti
Copy link
Contributor

@euresti euresti commented Sep 19, 2021

Pull Request Check List

This is just a friendly reminder about the most common mistakes. Please make sure that you tick all boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing left to do. If your pull request is a documentation fix or a trivial typo, feel free to delete the whole thing.

Fixes #842

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
    • ...and used in the stub test file tests/typing_example.py.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • Changes to the signature of @attr.s() have to be added by hand too.
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in our __init__.py file.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

@euresti euresti requested a review from hynek September 19, 2021 14:39
@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

Does this type of change need a changelog entry?

@euresti euresti force-pushed the resolve_types_subclass branch from c517a70 to daa11e2 Compare September 19, 2021 14:55
@hynek
Copy link
Member

hynek commented Sep 19, 2021

Thanks for stepping up real quick as usual!

Yeah I think it’s worth mentioning!

For every bug report there’s 10 people who didn’t bother.

also pls src/attr/_funcs.py:390:80: E501 line too long (82 > 79 characters) :)

@euresti euresti force-pushed the resolve_types_subclass branch from 7ad9826 to e826b4c Compare September 19, 2021 15:12
@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

Ok. Gotta go make breakfast but I'll get the changelog in after that.

@hynek
Copy link
Member

hynek commented Sep 19, 2021

Oh god why is codecov angry. If you don’t have time for it, I’ll check once I’m back from Italy and off phone-only.

@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

Oh it's because nothing tests the "cached" flow.

@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

Sorry for all the lint failures. I don't have python 3.10 on my machine and you can only run pre-commit or tox -e lint if you have python 3.10.

@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

Ok I have no idea why codecov is complainign about this:
image

https://app.codecov.io/gh/python-attrs/attrs/compare/843/tree/src/attr/_compat.py

@hynek
Copy link
Member

hynek commented Sep 19, 2021

It was complaining about the same thing on #840 and then magically stopped…some codecov flakiness? :-/

@euresti
Copy link
Contributor Author

euresti commented Sep 19, 2021

It passed!

@hynek
Copy link
Member

hynek commented Sep 19, 2021

🤡

@hynek hynek merged commit f31bb28 into python-attrs:main Sep 19, 2021
@hynek
Copy link
Member

hynek commented Sep 19, 2021

Thanks for the quick turnarounds!

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.

attr.resolve_types caches badly with inheritence
2 participants