You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
1.0.1rc1 (#18)
* Update session parameter model - change instances of int and float to NonNegativeInt and NonNegativeFloat.
defaults.py:
* Change default list items to tuples.
* Update default response hook to an empty tuple. Default hooks will be added during instantiation.
models.py:
* Import HTTP status codes from the 'http' library. Add validator for the retry_status_code_list to check the provided codes are valid. (Note: this might need to be set in a 'strict mode' or similar in case non-standard status codes are needed. For now - leaving the validator in place.)
* Add a response hook model to check the responses hook is a list of callables.
* Change bool types to StrictBool - more precision on valid values.
* Change relative imports to absolute
session.py:
* Add explicit exception class to disable_warnings when tls_verify is False.
* Update response_hooks setter to create a list if a single callable is passed. Remove the _session_params update and call update_response_hooks instead.
* Add param new_hooks to update_response_hooks - when provided, insert the hooks between the redirect hook and exception hook.
* Fix functionality of update_response_hooks - session param model was not previously updated to reflect the hooks. Also change to a private method.
* clear_response_hooks - set hooks to default and call update_response_hooks. This clears all user-defined hooks and allows update_response_hook to set the default (redirect / exception hooks).
pyproject.toml:
* Version updated to 1.0.1rc1
* Add new markers for pytest (code, requests)
* .github/workflows/release.yml:
* Update regex for release determination - include 'post' releases.
* Added explicit 'pypi-release=false' if regex for version does not match.
test_exceptions.py:
* Lint and refactor based on suggestions from flake8, pylint.
test_metaclass.py:
* Add docstrings for test functions.
* Refactor based on linting results
test_object_attributes.py:
* Initial commit. Test valid and invalid object attributes
test_object_creation.py:
* Remove unused fixture
* Remove unnecessary mark for test_class after removal of requests_toolbelt
test_object_attributes.py:
* Remove unused variable 'expected result'
* Change spacing between assertions for readability
* Remove unused files.
conftest.py:
* Removed references to requests_toolbelt/BaseUrlSession. No need to test requests_toolbelt for this project.
pyproject.toml / poetry.lock:
* Removed the requests-toolbelt test dependency.
* Add flake8-pyproject so flake8 can parse pyproject.toml.
test_object_attributes.py:
* Move timeout test to test_basic_requests.py
test_auth.py:
* Remove unused dependencies
* Remove requests_toolbelt references
* Add new pytest mark for 'requests'
test_basic_requests.py:
* Update imports.
* Mark for pytest 'requests'
* Remove parametrized marks that include requests_toolbelt.
* Update code based on linting suggestions
* Move timeout testing to this testscript - should be part of requests testing, not code.
.github/workflows/linting.yml:
* Remove max-line-length option from Flake8 - should be loaded from pyproject.toml.
test_combinations.py:
* Remove unused imports
* Add pytest mark for 'requests'
* Remove references (including parametrized marks) for requests_toolbelt.
test_headers.py:
* Remove references to requests_toolbelt.
* Add pytest mark for requests
* Update code based on linting recommendations.
test_redirects.py:
* Moved into tests/test_requests/
test_retries.py:
* Moved into tests/test_requests/
* Add pytest mark for 'requests'
* Remove references to requests_toolbelt
* Refactor based on linting
* Add explicit version for TestPyPi install