Repository: Colin-b/requests_auth (language: python)

Issue:
Release 7.0.0
### 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

### Removed
- Explicit support for Python 3.6



Discussion / hints:
SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=Colin-b_requests_auth&pullRequest=76)

[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=BUG)  
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=SECURITY_HOTSPOT)  
[![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=Colin-b_requests_auth&pullRequest=76&resolved=false&types=CODE_SMELL)

[![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=Colin-b_requests_auth&pullRequest=76) No Coverage information  
[![9.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/10-16px.png '9.6%')](https://sonarcloud.io/component_measures?id=Colin-b_requests_auth&pullRequest=76&metric=new_duplicated_lines_density&view=list) [9.6% Duplication](https://sonarcloud.io/component_measures?id=Colin-b_requests_auth&pullRequest=76&metric=new_duplicated_lines_density&view=list)



Fix patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3473122..97c3ea1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,25 +7,13 @@ 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
@@ -33,4 +21,4 @@ jobs:
     - name: Publish packages
       run: |
         python -m pip install twine
-        python -m twine upload dist/* --skip-existing --username __token__ --password ${{ secrets.pypi_password }}
\ No newline at end of file
+        python -m twine upload dist/* --skip-existing --username __token__ --password ${{ secrets.pypi_password }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d31238e..d8ea773 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,5 +1,5 @@
 repos:
   - repo: https://github.com/psf/black
-    rev: 23.3.0
+    rev: 24.4.2
     hooks:
       - id: black
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 582f37c..a46d606 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Added
+- Adding explicit support for Python `3.12`.
+
+### Removed
+- Removing support for Python `3.7`.
 
 ## [7.0.0] - 2023-04-27
 ### Changed
@@ -13,10 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### 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
@@ -58,7 +63,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.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 49bfd27..01ab6ec 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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
@@ -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)
diff --git a/LICENSE b/LICENSE
index 3738ea5..cab2d30 100644
--- a/LICENSE
+++ b/LICENSE
@@ -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
diff --git a/pyproject.toml b/pyproject.toml
index 71a1bdd..d1afde8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
 name = "requests_auth"
 description = "Authentication for Requests"
 readme = "README.md"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 license = {file = "LICENSE"}
 authors = [
     {name = "Colin Bounouar", email = "colin.bounouar.dev@gmail.com" }
@@ -31,11 +31,11 @@ classifiers=[
     "Natural Language :: English",
     "Programming Language :: Python",
     "Programming Language :: Python :: 3",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
     "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
     "Topic :: Software Development :: Build Tools",
 ]
 dependencies = [
@@ -56,7 +56,7 @@ testing = [
     # Used to mock requests
     "pytest-responses==0.5.*",
     # Used to check coverage
-    "pytest-cov==4.*",
+    "pytest-cov==5.*",
 ]
 
 [tool.setuptools.packages.find]


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f1071bd..74cea1e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -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
@@ -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
\ No newline at end of file
+        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-7.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-7.0.0.tar.gz --force-reinstall
+        python -c 'import requests_auth'