-
-
Notifications
You must be signed in to change notification settings - Fork 382
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 _CountingAttr empty metadata unique #280
Make _CountingAttr empty metadata unique #280
Conversation
Codecov Report
@@ Coverage Diff @@
## master #280 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 9 9
Lines 729 731 +2
Branches 151 152 +1
=====================================
+ Hits 729 731 +2
Continue to review full report at Codecov.
|
No coverage for non-default metadata? Hmm. Locally Note that this is my first Hypothesis test and while my change to the Also, I am not sure if this belongs in any docs or changelog. It seems a bit behind the scenes but not completely. |
@Tinche this is yours |
Sure, I'll take this when I'm feeling a little better. |
Sure no rush, this is not a blocker. |
@Tinche No urgency for me. I've got my simple workaround in place. I hope you get better soon. |
Rebase please and I will review. |
Updated, but all the caveats from #280 (comment) still apply. I'd love to understand the coverage issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's going on with the coverage data.
tests/utils.py
Outdated
@@ -145,7 +145,7 @@ def ordereddict_of_class(tup): | |||
attrs_and_classes.map(ordereddict_of_class)) | |||
|
|||
|
|||
bare_attrs = st.just(attr.ib(default=None)) | |||
bare_attrs = st.none().map(lambda _: attr.ib(default=None)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -142,6 +142,8 @@ def attrib(default=NOTHING, validator=None, | |||
raise TypeError( | |||
"Invalid value for hash. Must be True, False, or None." | |||
) | |||
if metadata is None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@Tinche switched to |
I'm OK with this PR as it stand except I'd like to get to the bottom of the coverage issue. @hynek any ideas? |
If you don't know I'll see what I can find. Probably not for a couple days though. Thanks for keeping up on this. |
So this is interesting. If I do the famous if metadata is None:
XXX
metadata = {} it fails already in hypothesis. If I invent an else, it fails in our test suite: if metadata is None:
metadata = {}
else:
XXX Therefore, if I add this test: def test_meta():
y = attr.ib(metadata={}) we get 100% test coverage. IOW we don’t appear to have a test that sets metadata to something which seems like a glaring omission. |
Hypothesis will generate attributes with arbitrary metadata in some tests. We probably never assert the metadata is the thing we set it to, though. |
One of the first things I did was to print metadata and run the tests. It mostly printed None but many times printed a thing. I can't swear I printed the repr(), but I normally do. I'm away from my computer for a day or I'd try again. I also recall seeing 100% coverage reported locally. @hynek, did you get less than 100% coverage when running locally? |
Yes I had less than 100% until I added the test I mentioned which lifted it to 100%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, just stick the test somewhere so we have 100% coverage again and I'm good with this. Also I think we need a changelog entry for this, even though this isn't a public thing we're changing? Can't hurt to add one.
I added some prints and confirmed that both sides of the It sort of looks like coverage is not being measured during the full test run but only on that I hope you don't mind me digging into this a bit more. The way I read all this is that the tests would cover |
I added both a 'real' test that sure seems like it should achieve coverage (beyond all the other indications we should have had full coverage already) and also a 'force coverage' test that actually manages to achieve full reported coverage. I have taken several passes at this without managing to identify the actual issue. Perhaps it relates in some way to HypothesisWorks/hypothesis#997? Though I tried the various mentioned workarounds there including HypothesisWorks/hypothesis#1031 without any effect. The only relationship I see is that hypothesis tests don't seem to consistently have coverage reported appropriately. Are you concerned enough to open a new ticket about this coverage funny business? This gist shows the coverage loss when the coverage forcing test is removed. @Tinche, was there anything else you had wanted changed? I added the news fragment and the coverage report doesn't complain anymore. |
@hynek please take a last look and do the honors. :) |
tests/utils.py
Outdated
metadata = draw(st.dictionaries(keys=keys, values=vals)) | ||
metadata = draw(st.dictionaries( | ||
keys=keys, values=vals, min_size=1, max_size=5)) | ||
print('metadata', metadata) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thanks and welcome to software hell. ;) |
@hynek, yeah, so it goes. I made a sample showing that code called from strategies does not get coverage recorded. From a discussion in In case you can't tell, I just hate sticking stuff in to cover up systems that aren't working as expected (well, at least as I expected |
Apparently it may just be a performance thing and could be open to discussion. If you don't want to just drop it. Using |
I actually welcome that feature! I was always a bit…nervous about relying on hypothesis for coverage because it’s kind of a matter of luck that it hits them all. I’ll just rewrite the test myself, don’t worry about it. |
We now understand the nature of it: #280 (comment) ref #280
This only seems to partially address any concerns about inconsistent coverage from using hypothesis. The test body that runs would be just as inconsistent about coverage as the construction in the strategies, I would think. As opposed to a little change like that, I was thinking more that a large portion of the test suite may be based on the expectation that strategies provided coverage and might need to be reconsidered (even though we do have 100% coverage presently). I figured it was the developers responsibility to pick strategies such that coverage would be achieved. In this case being sure to explicitly use both I went ahead and made a small example adjustment to try out the idea of having strategies only generate parameters and the test itself generate the If there is desire to simply not use hypothesis for coverage then it seems like there should perhaps be complete isolation with no coverage for hypothesis tests and separate tests which are the sole contributors to coverage. It seems that otherwise the uncertainty would remain. |
scratches head That’s some heavy shit to do just on the side man. :) Generally speaking, I would like to streamline our hypothesis use (the test suite could be really faster) so I’m open to improvements (although they’ll have to pass @Tinche’s discerning eye :)). So I would suggest to open a new issue and sum up your ideas & findings from here, thanks. |
124: Scheduled weekly dependency update for week 00 r=mithrandi a=pyup-bot ## Updates Here's a list of all the updates bundled in this pull request. I've added some links to make it easier for you to find all the information you need. <table align="center"> <tr> <td><b>asn1crypto</b></td> <td align="center">0.23.0</td> <td align="center">»</td> <td align="center">0.24.0</td> <td> <a href="https://pypi.python.org/pypi/asn1crypto">PyPI</a> | <a href="https://pyup.io/changelogs/asn1crypto/">Changelog</a> | <a href="https://github.com/wbond/asn1crypto/issues">Repo</a> </td> <tr> <td><b>attrs</b></td> <td align="center">17.3.0</td> <td align="center">»</td> <td align="center">17.4.0</td> <td> <a href="https://pypi.python.org/pypi/attrs">PyPI</a> | <a href="https://pyup.io/changelogs/attrs/">Changelog</a> | <a href="http://www.attrs.org/">Homepage</a> </td> <tr> <td><b>ipaddress</b></td> <td align="center">1.0.18</td> <td align="center">»</td> <td align="center">1.0.19</td> <td> <a href="https://pypi.python.org/pypi/ipaddress">PyPI</a> | <a href="https://github.com/phihag/ipaddress">Repo</a> </td> </tr> </table> ## Changelogs ### asn1crypto 0.23.0 -> 0.24.0 >### 0.24.0 > - `x509.Certificate().self_signed` will no longer return `"yes"` under any > circumstances. This helps prevent confusion since the library does not > verify the signature. Instead a library like oscrypto should be used > to confirm if a certificate is self-signed. > - Added various OIDs to `x509.KeyPurposeId()` > - Added `x509.Certificate().private_key_usage_period_value` > - Added structures for parsing common subject directory attributes for > X.509 certificates, including `x509.SubjectDirectoryAttribute()` > - Added `algos.AnyAlgorithmIdentifier()` for situations where an > algorithm identifier may contain a digest, signed digest or encryption > algorithm OID > - Fixed a bug with `x509.Certificate().subject_directory_attributes_value` > not returning the correct value > - Fixed a bug where explicitly-tagged fields in a `core.Sequence()` would > not function properly when the field had a default value > - Fixed a bug with type checking in `pem.armor()` ### attrs 17.3.0 -> 17.4.0 >### 17.4.0 >------------------- >Backward-incompatible Changes >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >- The traversal of MROs when using multiple inheritance was backward: > If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, ``attrs`` would have collected the attributes from ``B`` *before* those of ``A``. > This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes. > Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible. > Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies. > `298 <https://github.com/python-attrs/attrs/issues/298>`_, > `299 <https://github.com/python-attrs/attrs/issues/299>`_, > `304 <https://github.com/python-attrs/attrs/issues/304>`_ >- The ``__repr__`` set by ``attrs`` > no longer produces an ``AttributeError`` > when the instance is missing some of the specified attributes > (either through deleting > or after using ``init=False`` on some attributes). > This can break code > that relied on ``repr(attr_cls_instance)`` raising ``AttributeError`` > to check if any attr-specified members were unset. > If you were using this, > you can implement a custom method for checking this:: > def has_unset_members(self): > for field in attr.fields(type(self)): > try: > getattr(self, field.name) > except AttributeError: > return True > return False > `308 <https://github.com/python-attrs/attrs/issues/308>`_ >Deprecations >^^^^^^^^^^^^ >- The ``attr.ib(convert=callable)`` option is now deprecated in favor of ``attr.ib(converter=callable)``. > This is done to achieve consistency with other noun-based arguments like *validator*. > *convert* will keep working until at least January 2019 while raising a ``DeprecationWarning``. > `307 <https://github.com/python-attrs/attrs/issues/307>`_ >Changes >^^^^^^^ >- Generated ``__hash__`` methods now hash the class type along with the attribute values. > Until now the hashes of two classes with the same values were identical which was a bug. > The generated method is also *much* faster now. > `261 <https://github.com/python-attrs/attrs/issues/261>`_, > `295 <https://github.com/python-attrs/attrs/issues/295>`_, > `296 <https://github.com/python-attrs/attrs/issues/296>`_ >- ``attr.ib``\ ’s ``metadata`` argument now defaults to a unique empty ``dict`` instance instead of sharing a common empty ``dict`` for all. > The singleton empty ``dict`` is still enforced. > `280 <https://github.com/python-attrs/attrs/issues/280>`_ >- ``ctypes`` is optional now however if it's missing, a bare ``super()`` will not work in slots classes. > This should only happen in special environments like Google App Engine. > `284 <https://github.com/python-attrs/attrs/issues/284>`_, > `286 <https://github.com/python-attrs/attrs/issues/286>`_ >- The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance. > In that case, the definition that is closer to the base of the class hierarchy wins. > `285 <https://github.com/python-attrs/attrs/issues/285>`_, > `287 <https://github.com/python-attrs/attrs/issues/287>`_ >- Subclasses of ``auto_attribs=True`` can be empty now. > `291 <https://github.com/python-attrs/attrs/issues/291>`_, > `292 <https://github.com/python-attrs/attrs/issues/292>`_ >- Equality tests are *much* faster now. > `306 <https://github.com/python-attrs/attrs/issues/306>`_ >- All generated methods now have correct ``__module__``, ``__name__``, and (on Python 3) ``__qualname__`` attributes. > `309 <https://github.com/python-attrs/attrs/issues/309>`_ >---- That's it for now! Happy merging! 🤖
167: Scheduled weekly dependency update for week 00 r=mithrandi a=pyup-bot ## Updates Here's a list of all the updates bundled in this pull request. I've added some links to make it easier for you to find all the information you need. <table align="center"> <tr> <td><b>asn1crypto</b></td> <td align="center">0.23.0</td> <td align="center">»</td> <td align="center">0.24.0</td> <td> <a href="https://pypi.python.org/pypi/asn1crypto">PyPI</a> | <a href="https://pyup.io/changelogs/asn1crypto/">Changelog</a> | <a href="https://github.com/wbond/asn1crypto/issues">Repo</a> </td> <tr> <td><b>attrs</b></td> <td align="center">17.3.0</td> <td align="center">»</td> <td align="center">17.4.0</td> <td> <a href="https://pypi.python.org/pypi/attrs">PyPI</a> | <a href="https://pyup.io/changelogs/attrs/">Changelog</a> | <a href="http://www.attrs.org/">Homepage</a> </td> <tr> <td><b>ipaddress</b></td> <td align="center">1.0.18</td> <td align="center">»</td> <td align="center">1.0.19</td> <td> <a href="https://pypi.python.org/pypi/ipaddress">PyPI</a> | <a href="https://github.com/phihag/ipaddress">Repo</a> </td> <tr> <td><b>txaws</b></td> <td align="center">0.4.0</td> <td align="center">»</td> <td align="center">0.5.0</td> <td> <a href="https://pypi.python.org/pypi/txaws">PyPI</a> | <a href="https://pyup.io/changelogs/txaws/">Changelog</a> | <a href="https://github.com/twisted/txaws">Repo</a> </td> </tr> </table> ## Changelogs ### asn1crypto 0.23.0 -> 0.24.0 >### 0.24.0 > - `x509.Certificate().self_signed` will no longer return `"yes"` under any > circumstances. This helps prevent confusion since the library does not > verify the signature. Instead a library like oscrypto should be used > to confirm if a certificate is self-signed. > - Added various OIDs to `x509.KeyPurposeId()` > - Added `x509.Certificate().private_key_usage_period_value` > - Added structures for parsing common subject directory attributes for > X.509 certificates, including `x509.SubjectDirectoryAttribute()` > - Added `algos.AnyAlgorithmIdentifier()` for situations where an > algorithm identifier may contain a digest, signed digest or encryption > algorithm OID > - Fixed a bug with `x509.Certificate().subject_directory_attributes_value` > not returning the correct value > - Fixed a bug where explicitly-tagged fields in a `core.Sequence()` would > not function properly when the field had a default value > - Fixed a bug with type checking in `pem.armor()` ### attrs 17.3.0 -> 17.4.0 >### 17.4.0 >------------------- >Backward-incompatible Changes >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >- The traversal of MROs when using multiple inheritance was backward: > If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, ``attrs`` would have collected the attributes from ``B`` *before* those of ``A``. > This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes. > Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible. > Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies. > `298 <https://github.com/python-attrs/attrs/issues/298>`_, > `299 <https://github.com/python-attrs/attrs/issues/299>`_, > `304 <https://github.com/python-attrs/attrs/issues/304>`_ >- The ``__repr__`` set by ``attrs`` > no longer produces an ``AttributeError`` > when the instance is missing some of the specified attributes > (either through deleting > or after using ``init=False`` on some attributes). > This can break code > that relied on ``repr(attr_cls_instance)`` raising ``AttributeError`` > to check if any attr-specified members were unset. > If you were using this, > you can implement a custom method for checking this:: > def has_unset_members(self): > for field in attr.fields(type(self)): > try: > getattr(self, field.name) > except AttributeError: > return True > return False > `308 <https://github.com/python-attrs/attrs/issues/308>`_ >Deprecations >^^^^^^^^^^^^ >- The ``attr.ib(convert=callable)`` option is now deprecated in favor of ``attr.ib(converter=callable)``. > This is done to achieve consistency with other noun-based arguments like *validator*. > *convert* will keep working until at least January 2019 while raising a ``DeprecationWarning``. > `307 <https://github.com/python-attrs/attrs/issues/307>`_ >Changes >^^^^^^^ >- Generated ``__hash__`` methods now hash the class type along with the attribute values. > Until now the hashes of two classes with the same values were identical which was a bug. > The generated method is also *much* faster now. > `261 <https://github.com/python-attrs/attrs/issues/261>`_, > `295 <https://github.com/python-attrs/attrs/issues/295>`_, > `296 <https://github.com/python-attrs/attrs/issues/296>`_ >- ``attr.ib``\ ’s ``metadata`` argument now defaults to a unique empty ``dict`` instance instead of sharing a common empty ``dict`` for all. > The singleton empty ``dict`` is still enforced. > `280 <https://github.com/python-attrs/attrs/issues/280>`_ >- ``ctypes`` is optional now however if it's missing, a bare ``super()`` will not work in slots classes. > This should only happen in special environments like Google App Engine. > `284 <https://github.com/python-attrs/attrs/issues/284>`_, > `286 <https://github.com/python-attrs/attrs/issues/286>`_ >- The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance. > In that case, the definition that is closer to the base of the class hierarchy wins. > `285 <https://github.com/python-attrs/attrs/issues/285>`_, > `287 <https://github.com/python-attrs/attrs/issues/287>`_ >- Subclasses of ``auto_attribs=True`` can be empty now. > `291 <https://github.com/python-attrs/attrs/issues/291>`_, > `292 <https://github.com/python-attrs/attrs/issues/292>`_ >- Equality tests are *much* faster now. > `306 <https://github.com/python-attrs/attrs/issues/306>`_ >- All generated methods now have correct ``__module__``, ``__name__``, and (on Python 3) ``__qualname__`` attributes. > `309 <https://github.com/python-attrs/attrs/issues/309>`_ >---- That's it for now! Happy merging! 🤖
174: Scheduled weekly dependency update for week 00 r=mithrandi a=pyup-bot ## Updates Here's a list of all the updates bundled in this pull request. I've added some links to make it easier for you to find all the information you need. <table align="center"> <tr> <td><b>asn1crypto</b></td> <td align="center">0.23.0</td> <td align="center">»</td> <td align="center">0.24.0</td> <td> <a href="https://pypi.python.org/pypi/asn1crypto">PyPI</a> | <a href="https://pyup.io/changelogs/asn1crypto/">Changelog</a> | <a href="https://github.com/wbond/asn1crypto/issues">Repo</a> </td> <tr> <td><b>attrs</b></td> <td align="center">17.3.0</td> <td align="center">»</td> <td align="center">17.4.0</td> <td> <a href="https://pypi.python.org/pypi/attrs">PyPI</a> | <a href="https://pyup.io/changelogs/attrs/">Changelog</a> | <a href="http://www.attrs.org/">Homepage</a> </td> <tr> <td><b>hypothesis</b></td> <td align="center">3.40.1</td> <td align="center">»</td> <td align="center">3.44.4</td> <td> <a href="https://pypi.python.org/pypi/hypothesis">PyPI</a> | <a href="https://pyup.io/changelogs/hypothesis/">Changelog</a> | <a href="https://github.com/HypothesisWorks/hypothesis/issues">Repo</a> </td> <tr> <td><b>ipaddress</b></td> <td align="center">1.0.18</td> <td align="center">»</td> <td align="center">1.0.19</td> <td> <a href="https://pypi.python.org/pypi/ipaddress">PyPI</a> | <a href="https://github.com/phihag/ipaddress">Repo</a> </td> <tr> <td><b>pyrsistent</b></td> <td align="center">0.14.1</td> <td align="center">»</td> <td align="center">0.14.2</td> <td> <a href="https://pypi.python.org/pypi/pyrsistent">PyPI</a> | <a href="https://pyup.io/changelogs/pyrsistent/">Changelog</a> | <a href="http://github.com/tobgu/pyrsistent/">Repo</a> </td> <tr> <td><b>toolz</b></td> <td align="center">0.8.2</td> <td align="center">»</td> <td align="center">0.9.0</td> <td> <a href="https://pypi.python.org/pypi/toolz">PyPI</a> | <a href="https://github.com/pytoolz/toolz">Repo</a> </td> </tr> </table> ## Changelogs ### asn1crypto 0.23.0 -> 0.24.0 >### 0.24.0 > - `x509.Certificate().self_signed` will no longer return `"yes"` under any > circumstances. This helps prevent confusion since the library does not > verify the signature. Instead a library like oscrypto should be used > to confirm if a certificate is self-signed. > - Added various OIDs to `x509.KeyPurposeId()` > - Added `x509.Certificate().private_key_usage_period_value` > - Added structures for parsing common subject directory attributes for > X.509 certificates, including `x509.SubjectDirectoryAttribute()` > - Added `algos.AnyAlgorithmIdentifier()` for situations where an > algorithm identifier may contain a digest, signed digest or encryption > algorithm OID > - Fixed a bug with `x509.Certificate().subject_directory_attributes_value` > not returning the correct value > - Fixed a bug where explicitly-tagged fields in a `core.Sequence()` would > not function properly when the field had a default value > - Fixed a bug with type checking in `pem.armor()` ### attrs 17.3.0 -> 17.4.0 >### 17.4.0 >------------------- >Backward-incompatible Changes >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >- The traversal of MROs when using multiple inheritance was backward: > If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, ``attrs`` would have collected the attributes from ``B`` *before* those of ``A``. > This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes. > Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible. > Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies. > `298 <https://github.com/python-attrs/attrs/issues/298>`_, > `299 <https://github.com/python-attrs/attrs/issues/299>`_, > `304 <https://github.com/python-attrs/attrs/issues/304>`_ >- The ``__repr__`` set by ``attrs`` > no longer produces an ``AttributeError`` > when the instance is missing some of the specified attributes > (either through deleting > or after using ``init=False`` on some attributes). > This can break code > that relied on ``repr(attr_cls_instance)`` raising ``AttributeError`` > to check if any attr-specified members were unset. > If you were using this, > you can implement a custom method for checking this:: > def has_unset_members(self): > for field in attr.fields(type(self)): > try: > getattr(self, field.name) > except AttributeError: > return True > return False > `308 <https://github.com/python-attrs/attrs/issues/308>`_ >Deprecations >^^^^^^^^^^^^ >- The ``attr.ib(convert=callable)`` option is now deprecated in favor of ``attr.ib(converter=callable)``. > This is done to achieve consistency with other noun-based arguments like *validator*. > *convert* will keep working until at least January 2019 while raising a ``DeprecationWarning``. > `307 <https://github.com/python-attrs/attrs/issues/307>`_ >Changes >^^^^^^^ >- Generated ``__hash__`` methods now hash the class type along with the attribute values. > Until now the hashes of two classes with the same values were identical which was a bug. > The generated method is also *much* faster now. > `261 <https://github.com/python-attrs/attrs/issues/261>`_, > `295 <https://github.com/python-attrs/attrs/issues/295>`_, > `296 <https://github.com/python-attrs/attrs/issues/296>`_ >- ``attr.ib``\ ’s ``metadata`` argument now defaults to a unique empty ``dict`` instance instead of sharing a common empty ``dict`` for all. > The singleton empty ``dict`` is still enforced. > `280 <https://github.com/python-attrs/attrs/issues/280>`_ >- ``ctypes`` is optional now however if it's missing, a bare ``super()`` will not work in slots classes. > This should only happen in special environments like Google App Engine. > `284 <https://github.com/python-attrs/attrs/issues/284>`_, > `286 <https://github.com/python-attrs/attrs/issues/286>`_ >- The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance. > In that case, the definition that is closer to the base of the class hierarchy wins. > `285 <https://github.com/python-attrs/attrs/issues/285>`_, > `287 <https://github.com/python-attrs/attrs/issues/287>`_ >- Subclasses of ``auto_attribs=True`` can be empty now. > `291 <https://github.com/python-attrs/attrs/issues/291>`_, > `292 <https://github.com/python-attrs/attrs/issues/292>`_ >- Equality tests are *much* faster now. > `306 <https://github.com/python-attrs/attrs/issues/306>`_ >- All generated methods now have correct ``__module__``, ``__name__``, and (on Python 3) ``__qualname__`` attributes. > `309 <https://github.com/python-attrs/attrs/issues/309>`_ >---- ### hypothesis 3.40.1 -> 3.44.4 >### 3.44.4 >------------------- >This release fixes :issue:`1044`, which slowed tests by up to 6% >due to broken caching. >------------------- >### 3.44.3 >------------------- >This release improves the shrinker in cases where examples drawn earlier can >affect how much data is drawn later (e.g. when you draw a length parameter in >a composite and then draw that many elements). Examples found in cases like >this should now be much closer to minimal. >------------------- >### 3.44.2 >------------------- >This is a pure refactoring release which changes how Hypothesis manages its >set of examples internally. It should have no externally visible effects. >------------------- >### 3.44.1 >------------------- >This release fixes :issue:`997`, in which under some circumstances the body of >tests run under Hypothesis would not show up when run under coverage even >though the tests were run and the code they called outside of the test file >would show up normally. >------------------- >### 3.44.0 >------------------- >This release adds a new feature: The :ref:`reproduce_failure <reproduce_failure>`, >designed to make it easy to use Hypothesis's binary format for examples to >reproduce a problem locally without having to share your example database >between machines. >This also changes when seeds are printed: >* They will no longer be printed for > normal falsifying examples, as there are now adequate ways of reproducing those > for all cases, so it just contributes noise. >* They will once again be printed when reusing examples from the database, as > health check failures should now be more reliable in this scenario so it will > almost always work in this case. >This work was funded by `Smarkets <https://smarkets.com/>`_. >------------------- >### 3.43.1 >------------------- >This release fixes a bug with Hypothesis's database management - examples that >were found in the course of shrinking were saved in a way that indicated that >they had distinct causes, and so they would all be retried on the start of the >next test. The intended behaviour, which is now what is implemented, is that >only a bounded subset of these examples would be retried. >------------------- >### 3.43.0 >------------------- >:exc:`~hypothesis.errors.HypothesisDeprecationWarning` now inherits from >:exc:`python:FutureWarning` instead of :exc:`python:DeprecationWarning`, >as recommended by :pep:`565` for user-facing warnings (:issue:`618`). >If you have not changed the default warnings settings, you will now see >each distinct :exc:`~hypothesis.errors.HypothesisDeprecationWarning` >instead of only the first. >------------------- >### 3.42.2 >------------------- >This patch fixes :issue:`1017`, where instances of a list or tuple subtype >used as an argument to a strategy would be coerced to tuple. >------------------- >### 3.42.1 >------------------- >This release has some internal cleanup, which makes reading the code >more pleasant and may shrink large examples slightly faster. >------------------- >### 3.42.0 >------------------- >This release deprecates :ref:`faker-extra`, which was designed as a transition >strategy but does not support example shrinking or coverage-guided discovery. >------------------- >### 3.41.0 >------------------- >:func:`~hypothesis.strategies.sampled_from` can now sample from >one-dimensional numpy ndarrays. Sampling from multi-dimensional >ndarrays still results in a deprecation warning. Thanks to Charlie >Tanksley for this patch. >------------------- ### pyrsistent 0.14.1 -> 0.14.2 >### 0.14.2 > * Fix 121, regression in PClass.set() introduced in 0.14.1. That's it for now! Happy merging! 🤖
Issue #278