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

Use Hyperlink's Hypothesis strategies #393

Merged
merged 4 commits into from Jan 11, 2021
Merged

Conversation

wsanchez
Copy link
Member

Use Hypothesis strategies that are now provided by Hyperlink, remove them from Klein.

These were copied there from Klein to make them more available to projects and manage them with Hyperlink itself.

@wsanchez wsanchez requested a review from a team as a code owner August 28, 2020 16:55
@wsanchez wsanchez self-assigned this Aug 28, 2020
@wsanchez
Copy link
Member Author

Build is failing due to a missing file from Hyperlink.

I've opened a PR for that: python-hyper/hyperlink#134

@wsanchez wsanchez marked this pull request as draft August 28, 2020 17:14
@wsanchez
Copy link
Member Author

OK, hyperlink has a fix on master

# Conflicts:
#	src/klein/test/_strategies.py
@codecov
Copy link

codecov bot commented Sep 26, 2020

Codecov Report

Merging #393 (4e2e1b9) into master (84e89ec) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #393      +/-   ##
==========================================
- Coverage   98.66%   98.64%   -0.02%     
==========================================
  Files          46       45       -1     
  Lines        3884     3850      -34     
  Branches      252      249       -3     
==========================================
- Hits         3832     3798      -34     
  Misses         36       36              
  Partials       16       16              
Impacted Files Coverage Δ
src/klein/test/test_headers.py 100.00% <100.00%> (ø)
src/klein/test/test_request_compat.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84e89ec...4e2e1b9. Read the comment docs.

@@ -36,6 +54,59 @@
__all__ = ()


T = TypeVar("T")
Copy link
Member Author

Choose a reason for hiding this comment

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

This section moved here; wasn't needed by Hyperlink.


attrs==20.1.0
hyperlink==20.0.1
Copy link
Member Author

Choose a reason for hiding this comment

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

Until the next Hypothesis release.

@wsanchez wsanchez marked this pull request as ready for review September 26, 2020 01:48
Copy link
Contributor

@twm twm left a comment

Choose a reason for hiding this comment

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

This looks good to me. I had one question on the Tox config, but it will certainly work as-is so I'm approving.

@@ -33,10 +33,10 @@ deps =
tw1910: Twisted==19.10.0
tw203: Twisted==20.3.0
twcurrent: Twisted
twtrunk: https://github.com/twisted/twisted/archive/trunk.zip
twtrunk: git+git://github.com/twisted/twisted@trunk#egg=Twisted
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this from the archive form?

* master: (33 commits)
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  [requires.io] dependency update
  http ➜ https
  Move comment to what it's referring to
  Fix fragile line numbers
  Copyright dance
  [requires.io] dependency update
  Update MANIFEST.in
  ignore these flake8 errors that make no sense
  re-order in a way that seems logical today
  Fix up the not-type-checking signatures for Arg, KwArg, VarArg, DefaultNamedArg
  tox -e lint should probably actually run something
  Move check-manifest to pre-commit
  Quote repo versions
  Fix packaging
  Update needs: parameter
  Disable lint job for a sec
  ...

# Conflicts:
#	src/klein/test/_strategies.py
@wsanchez wsanchez merged commit de162bb into master Jan 11, 2021
@wsanchez wsanchez deleted the hyperlink-strategies branch January 11, 2021 18:34
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jun 20, 2021
Most of patches are home-grown instead of from upstream, as upstream fixes
are quite large and cannot be cleanly backported. Specifically, upstream
moves test strategies from Klein to Hyperlink [1] and drop Python 2.x
support [2,3]. The fix for Werkzeug 2.x in test_resource.py [3] is smaller,
while it cannot be cleanly backported, either.

[1] twisted/klein#393
[2] twisted/klein#328
[3] twisted/klein#355
[4] twisted/klein#499

git-svn-id: file:///srv/repos/svn-community/svn@965883 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Jun 20, 2021
Most of patches are home-grown instead of from upstream, as upstream fixes
are quite large and cannot be cleanly backported. Specifically, upstream
moves test strategies from Klein to Hyperlink [1] and drop Python 2.x
support [2,3]. The fix for Werkzeug 2.x in test_resource.py [3] is smaller,
while it cannot be cleanly backported, either.

[1] twisted/klein#393
[2] twisted/klein#328
[3] twisted/klein#355
[4] twisted/klein#499



git-svn-id: file:///srv/repos/svn-community/svn@965883 9fca08f4-af9d-4005-b8df-a31f2cc04f65
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