diff --git a/CHANGELOG.md b/CHANGELOG.md index 8beab04..2edbd17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] - 2020-03-23 +### Removed +- Deprecated `httpx_auth.Auths` class has been removed. + ## [0.1.0] - 2020-03-09 ### Changed - Requires [`httpx`](https://www.python-httpx.org)==0.12.* @@ -18,7 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Placeholder for port of requests_auth to httpx -[Unreleased]: https://github.com/Colin-b/httpx_auth/compare/v0.1.0...HEAD +[Unreleased]: https://github.com/Colin-b/httpx_auth/compare/v0.2.0...HEAD +[0.2.0]: https://github.com/Colin-b/httpx_auth/compare/v0.1.0...v0.2.0 [0.1.0]: https://github.com/Colin-b/httpx_auth/compare/v0.0.2...v0.1.0 [0.0.2]: https://github.com/Colin-b/httpx_auth/compare/v0.0.1...v0.0.2 [0.0.1]: https://github.com/Colin-b/httpx_auth/releases/tag/v0.0.1 diff --git a/httpx_auth/__init__.py b/httpx_auth/__init__.py index c755c31..caa59da 100644 --- a/httpx_auth/__init__.py +++ b/httpx_auth/__init__.py @@ -2,7 +2,6 @@ Basic, HeaderApiKey, QueryApiKey, - Auths, OAuth2, OAuth2AuthorizationCodePKCE, OktaAuthorizationCodePKCE, diff --git a/httpx_auth/authentication.py b/httpx_auth/authentication.py index c52ef77..247cd8b 100644 --- a/httpx_auth/authentication.py +++ b/httpx_auth/authentication.py @@ -6,7 +6,6 @@ from typing import Optional, Generator import httpx -import warnings from httpx_auth import oauth2_authentication_responses_server, oauth2_tokens from httpx_auth.errors import InvalidGrantRequest, GrantNotProvided @@ -1123,12 +1122,3 @@ def __and__(self, other): if isinstance(other, _MultiAuth): return _MultiAuth(*self.authentication_modes, *other.authentication_modes) return _MultiAuth(*self.authentication_modes, other) - - -class Auths(_MultiAuth): - def __init__(self, *authentication_modes): - warnings.warn( - "Auths class will be removed in the future. Use + instead.", - DeprecationWarning, - ) - super().__init__(*authentication_modes) diff --git a/httpx_auth/version.py b/httpx_auth/version.py index 43c94ee..03431df 100644 --- a/httpx_auth/version.py +++ b/httpx_auth/version.py @@ -3,4 +3,4 @@ # Major should be incremented in case there is a breaking change. (eg: 2.5.8 -> 3.0.0) # Minor should be incremented in case there is an enhancement. (eg: 2.5.8 -> 2.6.0) # Patch should be incremented in case there is a bug fix. (eg: 2.5.8 -> 2.5.9) -__version__ = "0.1.0" +__version__ = "0.2.0" diff --git a/tests/test_auths.py b/tests/test_auths.py deleted file mode 100644 index ba6d2e1..0000000 --- a/tests/test_auths.py +++ /dev/null @@ -1,16 +0,0 @@ -import pytest -from pytest_httpx import httpx_mock, HTTPXMock - -import httpx_auth -from tests.auth_helper import get_header - - -def test_basic_and_api_key_authentication_can_be_combined_deprecated( - httpx_mock: HTTPXMock, -): - basic_auth = httpx_auth.Basic("test_user", "test_pwd") - api_key_auth = httpx_auth.HeaderApiKey("my_provided_api_key") - with pytest.warns(DeprecationWarning): - header = get_header(httpx_mock, httpx_auth.Auths(basic_auth, api_key_auth)) - assert header.get("Authorization") == "Basic dGVzdF91c2VyOnRlc3RfcHdk" - assert header.get("X-Api-Key") == "my_provided_api_key"