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 __doc__ is None in optimized mode #373

Merged
merged 3 commits into from
Nov 24, 2021
Merged

fix __doc__ is None in optimized mode #373

merged 3 commits into from
Nov 24, 2021

Conversation

Irvenae
Copy link
Contributor

@Irvenae Irvenae commented Nov 24, 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.

  • Added tests for changed code.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • 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) are documented in the changelog.

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!

Not sure how a specific test can be launched with this env variable (PYTHONOPTIMIZE=2)

Copy link
Owner

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

Yeah you can't test that. Let's just exclude it from coverage.

Thanks!

CHANGELOG.rst Outdated Show resolved Hide resolved
src/structlog/__init__.py Outdated Show resolved Hide resolved
@hynek hynek mentioned this pull request Nov 24, 2021
6 tasks
@Irvenae
Copy link
Contributor Author

Irvenae commented Nov 24, 2021

Thanks for the fast review 🚀 💯

@hynek
Copy link
Owner

hynek commented Nov 24, 2021

lolsob looks like a) i've screwed up the indent in the changelog and b) mypy doesn't know about -OO. I'll just merge and fiddle until it works – thanks!

@hynek hynek merged commit bd1ab85 into hynek:main Nov 24, 2021
@hynek
Copy link
Owner

hynek commented Nov 24, 2021

JFTR, I've actually managed to build a test case: 1d66f67 😅

@Irvenae Irvenae deleted the feature/fix-opt-mode branch November 24, 2021 15:41
@hynek
Copy link
Owner

hynek commented Nov 25, 2021

FYI 21.4 is on PyPI

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.

2 participants