Commit Graph

13 Commits

Author SHA1 Message Date
Abhinav Singh 74c42f6e57
`setup.cfg/extras_require` configuration (#1452)
* Remove usage of requirements file in favor of `setup.cfg/extras_require` configuration

* Fallback to setuptools-scm>=6 because >=7.0.5 dont support python 3.6, see https://github.com/abhinavsingh/proxy.py/pull/1345/files

* Remove unicode symbols from setup.cfg which causes parsing issues on python3.6, ref https://github.com/abhinavsingh/proxy.py/actions/runs/10346098737/job/28634186621\?pr\=1452
2024-08-12 11:57:57 +05:30
Abhinav Singh 39854e1d79
Use Python 3.12 as default Docker base image (#1445)
* Use Python 3.12 as default Docker base image

* Add standard OCI labels
2024-08-10 10:28:53 +05:30
Abhinav Singh 367205826d
Grout: ngrok Alternative (#1407)
* Grout: An Ngrok Alternative

* Consume `grout` entry point within `proxy.py`

* Revert `check.py`
2024-05-10 13:53:52 +05:30
Abhinav Singh 2fa320d03f
Python 3.11 support (#1384)
* Changes for Python 3.11 support

* Updated README.md for versioning info

* Update `httpx==0.27.0` to avoid `cgi` deprecation warning from pytest on Python 3.11

* Make tests work for 3.11

* Declare support for 3.11

* Use 3.11-alpine for Docker images

* Preserve pylint version for `python_version <= 3.10`

* Preserve httpx version for <= 3.10

* `httpx` usage fix in tests for <=3.10

* Adjust pylint and pytest for >= 3.11

* Use 3.11.8, bad-option-value and httpx proxies fix

* tox for 3.11

* Fix for `TOXENV: py`

* -vv for pytest

* Downgrade to `pytest-asyncio==0.21.1`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove asyncio_mode=strict

* try with `pytest-cov==4.1.0` for 3.11

* bump coverage for 3.11

* Try `3.11` in GitHub workflow which installs >3.11.8 unavailable via pyenv yet

* Revert back to `-v`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-13 13:22:25 +05:30
Abhinav Singh 05a8ff9fe7
Test submodule and refactor (#971)
* Refactor tests into submodules

* isort tests

* Add malicious request headers test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-13 00:36:37 +05:30
Abhinav Singh 0d1fe198d3
`DescriptorsHandlerMixin` and `Descriptors`, `SelectableEvents` types (#938)
* Add `Descriptors` type

* Add a `DescriptorsHandlerMixin` class used throughout the http framework

* Remove dependency upon `HasFileno` ie `typing_extension` too

* Define `SelectableEvents` type

* Fix doc

* Blank line

* Remove dep on `typing-extensions`

* Discover base plugin class

* await on now async handlers
2022-01-05 00:32:16 +05:30
Abhinav Singh db0c923447
[TlsParser] Refactored implementation from #748 (#922)
* Refactored TlsParser based upon work done in #748

* Add missing `tls_server_hello.data`, thanks to @JerryKwan

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Pass `check.py`

* Run check.py locally

* Fix lint errors

* Fix indentation issue

* Ignore linkcheck for cloudflare links, GHA is getting a 403 reply, while the link actually works

* Fix lint

* codespell skip

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-31 22:54:33 +05:30
Abhinav Singh ab5c155213
Prune unnecessary directories from `sdist` package (#779)
* Prune unnecessary directories from `sdist` package

* Remove `LICENSE` & `README.md` from `MANIFEST.in`

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>

* Explicitly ignore top-level images and include `.github` folder

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2021-11-23 17:25:40 +05:30
Sviatoslav Sydorenko d554b94ebb
Declare project URLs in Python package metadata (#778)
* Declare project URLs in Python package metadata

* Add link to GHA discussions

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>

Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-11-23 01:21:37 +05:30
Abhinav Singh 2b3f0cb422
Add all IANA assigned HTTP method names (#751)
* Ignore `docs/_build`

* Remove `v` prefix from VERSION.  Also added a `lib-doc` target

* Raise a `ValueError` instead of `NotImplementedError`

* Add all registered http method verbs

* Generate `_scm_version.py` on every `make` invocation.  Fix `v` prefix bug.

* `+proxy` for emails

* Make explicit that this script writes to file

* `PROXY_AGENT_HEADER_VALUE` still needs the `v` :)
2021-11-18 18:50:15 +05:30
Sviatoslav Sydorenko cc80e1c742
Inline the dist description in pkg metadata (#684)
This is necessary because setuptools is about to deprecate supporting
LF in one-line metadata fields.

Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-11-06 14:02:01 +05:30
Sviatoslav Sydorenko fae694fe86
Revert "Upgrade `master` to `develop` in `setup.py`" (#650)
This reverts commit 06f6f56219.
2021-11-02 09:52:23 +05:30
Sviatoslav Sydorenko 7606c1d495
Add tox envs for building dists via PEP 517 (#647)
* Invoke self-install via PEP517 in the CI

* Add tox envs for building dists via PEP 517

* Add linting dists via tox to GHA

* Upgrade `master` to `develop` in `setup.py`

* Simplify `python_requires` in `setup.py`

* Convert dynamic `setup.py` into static `setup.cfg`
2021-11-02 03:00:00 +05:30