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

Make assigning attributes of the settings class an error #1572

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented Sep 13, 2018

I've now seen a couple of places have to debug timeout or healthcheck (etc) problems where their settings were having no effect... because they were assigning them on the class hypothesis.settings, and thus missing the explicit error from trying to mutate a settings instance. Since errors should never pass silently, trying this now raises an AttributeError too.

@Zac-HD Zac-HD added the legibility make errors helpful and Hypothesis grokable label Sep 13, 2018
RELEASE_TYPE: minor

To adjust the current settings profile, you can assign to the current settings
*instance* ``hypothesis.settings.default``. This release makes it an error to
Copy link
Member

Choose a reason for hiding this comment

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

Do we actually still allow this? I thought we didn't.

Copy link
Member Author

@Zac-HD Zac-HD Sep 16, 2018

Choose a reason for hiding this comment

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

Whoops, no, we don't! I will update have updated the notes and error messages.

@Zac-HD Zac-HD force-pushed the assign-settings branch 2 times, most recently from 2e5af06 to 71cb648 Compare September 16, 2018 12:39
You probably meant to assign them on an (or the default) *instance*.
@Zac-HD Zac-HD merged commit 4206729 into HypothesisWorks:master Sep 24, 2018
@Zac-HD Zac-HD deleted the assign-settings branch September 24, 2018 12:11
marsam added a commit to marsam/vdirsyncer that referenced this pull request Nov 30, 2018
Since Hypothesis 3.72.0, assigning settings attributes throws an error.

See: HypothesisWorks/hypothesis#1572
spk pushed a commit to spk/vdirsyncer that referenced this pull request Jun 10, 2019
Since Hypothesis 3.72.0, assigning settings attributes throws an error.

See: HypothesisWorks/hypothesis#1572
spk pushed a commit to spk/vdirsyncer that referenced this pull request Jun 10, 2019
Since Hypothesis 3.72.0, assigning settings attributes throws an error.

See: HypothesisWorks/hypothesis#1572
flopraden pushed a commit to flopraden/vdirsyncer that referenced this pull request Nov 13, 2019
Since Hypothesis 3.72.0, assigning settings attributes throws an error.

See: HypothesisWorks/hypothesis#1572
(cherry picked from commit 22ad88a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legibility make errors helpful and Hypothesis grokable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants