Skip to content

Commit

Permalink
Release version 8.0.0 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin-b authored Jun 18, 2024
1 parent 55ec3a5 commit 1630f81
Show file tree
Hide file tree
Showing 64 changed files with 6,278 additions and 3,305 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,18 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[testing]
- name: Test with pytest
run: |
pytest --cov=requests_auth --cov-fail-under=100 --cov-report=term-missing
python-version: '3.12'
- name: Create packages
run: |
python -m pip install build
python -m build .
- name: Publish packages
run: |
python -m pip install twine
python -m twine upload dist/* --skip-existing --username __token__ --password ${{ secrets.pypi_password }}
python -m twine upload dist/* --skip-existing --username __token__ --password ${{ secrets.pypi_password }}
21 changes: 17 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -22,4 +22,17 @@ jobs:
python -m pip install .[testing]
- name: Test with pytest
run: |
pytest --cov=requests_auth --cov-fail-under=100 --cov-report=term-missing
pytest --cov=requests_auth --cov-fail-under=100 --cov-report=term-missing
- name: Create packages
run: |
python -m pip install build
python -m build .
rm -Rf requests_auth
- name: Install wheel
run: |
python -m pip install dist/requests_auth-8.0.0-py3-none-any.whl --force-reinstall
python -c 'import requests_auth'
- name: Install source distribution
run: |
python -m pip install dist/requests_auth-8.0.0.tar.gz --force-reinstall
python -c 'import requests_auth'
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black
54 changes: 50 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,62 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.0.0] - 2024-06-18
### Added
- Adding explicit support for Python `3.12`.
- Publicly expose `requests_auth.SupportMultiAuth`, allowing multiple authentication support for every `requests` authentication class that exists.
- Publicly expose `requests_auth.TokenMemoryCache`, allowing to create custom Oauth2 token cache based on this default implementation.
- You can now provide your own HTML success (`success_html`) and failure (`failure_html`) display via the new `OAuth2.display` shared setting. Refer to documentation for more details.
- Thanks to the new `redirect_uri_domain` parameter on Authorization code (with and without PKCE) and Implicit flows, you can now provide the [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) to use in the `redirect_uri` when `localhost` (the default) is not allowed.
- `requests_auth.WakaTimeAuthorizationCode` handling access to the [WakaTime API](https://wakatime.com/developers).

### Changed
- Except for `requests_auth.testing`, only direct access via `requests_auth.` was considered publicly exposed. This is now explicit, as inner packages are now using private prefix (`_`).
If you were relying on some classes or functions that are now internal, feel free to open an issue.
- `requests_auth.JsonTokenFileCache` and `requests_auth.TokenMemoryCache` `get_token` method does not handle kwargs anymore, the `on_missing_token` callable does not expect any arguments anymore.
- `requests_auth.JsonTokenFileCache` does not expose `tokens_path` or `last_save_time` attributes anymore and is also allowing `pathlib.Path` instances as cache location.
- `requests_auth.TokenMemoryCache` does not expose `forbid_concurrent_cache_access` or `forbid_concurrent_missing_token_function_call` attributes anymore.
- Browser display settings have been moved to a shared setting, see documentation for more information on `requests_auth.OAuth2.display`.
The failure page will be displayed for 10 seconds by default instead of 5 seconds previously.
As a result the following classes no longer expose `success_display_time` and `failure_display_time` parameters.
- `requests_auth.OAuth2AuthorizationCode`.
- `requests_auth.OktaAuthorizationCode`.
- `requests_auth.WakaTimeAuthorizationCode`.
- `requests_auth.OAuth2AuthorizationCodePKCE`.
- `requests_auth.OktaAuthorizationCodePKCE`.
- `requests_auth.OAuth2Implicit`.
- `requests_auth.AzureActiveDirectoryImplicit`.
- `requests_auth.AzureActiveDirectoryImplicitIdToken`.
- `requests_auth.OktaImplicit`.
- `requests_auth.OktaImplicitIdToken`.
- The authentication success and failure displayed in the browser were revamped to be more user-friendly. `requests_auth.testing` was modified to accommodate this change:
- `tab.assert_success` `expected_message` parameter was removed.
- `tab.assert_failure` `expected_message` parameter should not be prefixed with `Unable to properly perform authentication: ` anymore and `\n` in the message should be replaced with `<br>`.
- Exceptions issued by `requests_auth` are now inheriting from `requests_auth.RequestsAuthException`, itself inheriting from `requests.RequestException`, instead of `Exception`.

### Fixed
- Type information is now provided following [PEP 561](https://www.python.org/dev/peps/pep-0561/).
- Remove deprecation warnings due to usage of `utcnow` and `utcfromtimestamp`.
- `requests_auth.OktaClientCredentials` `scope` parameter is now mandatory and does not default to `openid` anymore.
- `requests_auth.OktaClientCredentials` will now display a more user-friendly error message in case Okta instance is not provided.
- Tokens cache `DEBUG` logs will not display tokens anymore.
- Handle `text/html; charset=utf-8` content-type in token responses.

### Removed
- Removing support for Python `3.7`.
- Deprecated `requests_auth.Auths` class has been removed.

## [7.0.0] - 2023-04-27
### Changed
- `requests_auth.OAuth2ResourceOwnerPasswordCredentials` does not send basic authentication by default.

### Added
- `session_auth` as a parameter of `requests_auth.OAuth2ResourceOwnerPasswordCredentials`. Allowing to provide any kind of optional authentication.
- `requests_auth.OktaResourceOwnerPasswordCredentials` providing Okta resource owner password credentials flow easy setup.
- Explicit support for Python 3.11
- Explicit support for Python `3.11`.

### Removed
- Explicit support for Python 3.6
- Explicit support for Python `3.6`.

## [6.0.0] - 2022-01-11
### Changed
Expand Down Expand Up @@ -58,7 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [5.2.0] - 2020-10-14
### Added
- Allow to provide a `requests.Session` instance for `*AuthorizationCode` flows (even `PKCE`), `*ClientCredentials` and `*ResourceOwnerPasswordCredentials` flows.
- Explicit support for Python 3.9
- Explicit support for Python `3.9`.

### Changed
- Code now follow `black==20.8b1` formatting instead of the git master version.
Expand Down Expand Up @@ -179,7 +224,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Public release

[Unreleased]: https://github.com/Colin-b/requests_auth/compare/v7.0.0...HEAD
[Unreleased]: https://github.com/Colin-b/requests_auth/compare/v8.0.0...HEAD
[8.0.0]: https://github.com/Colin-b/requests_auth/compare/v7.0.0...v8.0.0
[7.0.0]: https://github.com/Colin-b/requests_auth/compare/v6.0.0...v7.0.0
[6.0.0]: https://github.com/Colin-b/requests_auth/compare/v5.3.0...v6.0.0
[5.3.0]: https://github.com/Colin-b/requests_auth/compare/v5.2.0...v5.3.0
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Before creating an issue please make sure that it was not already reported.

1) Go to the *Issues* tab and click on the *New issue* button.
2) Title should be a small sentence describing the request.
3) The comment should contains as much information as possible
3) The comment should contain as much information as possible
* Actual behavior (including the version you used)
* Expected behavior
* Steps to reproduce
Expand Down Expand Up @@ -56,7 +56,7 @@ Before creating an issue please make sure that it was not already reported.
1) Go to the *Pull requests* tab and click on the *New pull request* button.
2) *base* should always be set to `develop` and it should be compared to your branch.
3) Title should be a small sentence describing the request.
3) The comment should contains as much information as possible
4) The comment should contain as much information as possible
* Actual behavior (before the new code)
* Expected behavior (with the new code)
* Steps to reproduce (with and without the new code to see the difference)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Colin Bounouar
Copyright (c) 2024 Colin Bounouar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 1630f81

Please sign in to comment.