-
Notifications
You must be signed in to change notification settings - Fork 32
feat: bearer auth #111
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
base: develop
Are you sure you want to change the base?
feat: bearer auth #111
Conversation
@@ -39,8 +39,13 @@ Before creating an issue please make sure that it was not already reported. | |||
#### Code | |||
|
|||
1) Create a new branch based on `develop` branch. | |||
* Optional: create and enable virtualenv: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a virtualenv here as I didn't want to pollute my local machine with extra packages. Thought it might be useful for others, too.
2) Fetch all dev dependencies. | ||
* Install required python modules using `pip`: **python -m pip install .[testing]** | ||
* Install required python modules using `pip`: **python -m pip install ".[testing]"** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my shell (zsh) didn't like the [
and ]
without quoting them.
@@ -43,6 +43,7 @@ issues = "https://github.com/Colin-b/httpx_auth/issues" | |||
|
|||
[project.optional-dependencies] | |||
testing = [ | |||
"pytest==8.3.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why this was missing here, I assume it comes with pytest-cov
in whatever version is deemed suitable there.
@@ -55,12 +56,15 @@ testing = [ | |||
"pytest-asyncio==0.25.*", | |||
] | |||
|
|||
[tool.setuptools] | |||
py-modules = [ | |||
"httpx_auth" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed for:
Processing /Users/joscha/dev/httpx_auth
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [93 lines of output]
No `packages` or `py_modules` configuration, performing automatic discovery.
`flat-layout` detected -- analysing .
discovered packages -- ['httpx_auth', 'myenv', 'httpx_auth._oauth2', 'myenv.bin', 'myenv.include', 'myenv.lib']
possibly related to the virtualenv?
@@ -0,0 +1,3 @@ | |||
[pytest] | |||
asyncio_mode = auto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, I get:
INTERNALERROR> pytest.PytestConfigWarning: Unknown config option: asyncio_default_fixture_loop_scope
@@ -0,0 +1,3 @@ | |||
[pytest] | |||
asyncio_mode = auto | |||
asyncio_default_fixture_loop_scope = "function" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
^ ping @Colin-b |
This adds a very simple Bearer authentication class.
Happy to add docs, if accepted.