Commit Graph

164 Commits

Author SHA1 Message Date
dependabot[bot] 3921b90fc0
pip prod(deps): bump tox from 3.24.4 to 3.24.5 (#924)
Bumps [tox](https://github.com/tox-dev/tox) from 3.24.4 to 3.24.5.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/3.24.4...3.24.5)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-12-31 23:37:37 +05:30
dependabot[bot] 8ef0fc99a0
pip prod(deps): bump mypy from 0.910 to 0.920 (#890)
Bumps [mypy](https://github.com/python/mypy) from 0.910 to 0.920.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.910...v0.920)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 10:07:58 +05:30
dependabot[bot] c56e0dac28
pip prod(deps): bump py-spy from 0.3.10 to 0.3.11 (#875)
Bumps [py-spy](https://github.com/benfred/py-spy) from 0.3.10 to 0.3.11.
- [Release notes](https://github.com/benfred/py-spy/releases)
- [Changelog](https://github.com/benfred/py-spy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benfred/py-spy/compare/v0.3.10...v0.3.11)

---
updated-dependencies:
- dependency-name: py-spy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-12-17 18:13:41 +05:30
Abhinav Singh 769aae4b06
Fix broken TLS interception & CacheResponsesPlugin because UID is no longer a UUID (#866)
* Fix broken TLS interception because uid is now no longer a UUID

* Give enough context to work id for them to be unique within a `proxy.py` instance

* Use --port=0 by default within `proxy.TestCase`

* Attempt to fix weird buildx issue

* Add makefile targets within workflow

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

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

* Order?

* Write scm file for make

* Fetch depth

* Quote patch

* Try with sudo?

* https://github.com/docker/buildx/issues/850

* Remove sudo hack

* https://github.com/docker/buildx/issues/850\#issuecomment-973270625

* Add explicit deps

* Add `requirements-testing.txt` during linting phase

* Pin buildx to v0.7.1

* Pin buildx to v0.7.0

* Revert back unnecessary change to dockerignore

* Skip container within make workflow (because GHA lacks support for docker on macOS by default)

* Repurpose make into developer workflow

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-17 15:33:00 +05:30
dependabot[bot] fc254f4646
pip prod(deps): bump pytest-xdist from 2.4.0 to 2.5.0 (#864)
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-13 10:36:47 +05:30
dependabot[bot] 2b00247216
pip prod(deps): bump pylint from 2.12.1 to 2.12.2 (#851)
Bumps [pylint](https://github.com/PyCQA/pylint) from 2.12.1 to 2.12.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.12.1...v2.12.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-06 12:18:11 +05:30
dependabot[bot] 1eeed9150a
pip prod(deps): bump coverage from 6.1.2 to 6.2 (#847)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.1.2 to 6.2.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/6.1.2...6.2)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-12-03 15:11:14 +05:30
dependabot[bot] 9bfdb6293f
Merge pull request #825 from abhinavsingh/dependabot/pip/pylint-2.12.1
pip prod(deps): bump pylint from 2.11.1 to 2.12.1
2021-11-29 14:03:44 +05:30
dependabot[bot] c5dd39a146
pip prod(deps): bump coverage from 6.1.1 to 6.1.2 (#813)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/6.1.1...6.1.2)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-26 12:23:17 +05:30
dependabot[bot] 3704bb4bd7
pip prod(deps): bump rope from 0.21.0 to 0.22.0 (#785)
Bumps [rope](https://github.com/python-rope/rope) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/python-rope/rope/releases)
- [Changelog](https://github.com/python-rope/rope/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-rope/rope/compare/0.21.0...0.22.0)

---
updated-dependencies:
- dependency-name: rope
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-11-24 22:24:55 +05:30
Abhinav Singh 44d72431e3
Async `get_events`, `handle_event`, `handle_readables`, `handle_writables` (#769)
* Asynchronous `handle_event` and `LocalExecutor` thread

* Bail out on first task completion

* mypy

* Add `helper/benchmark.sh` and fix threaded which must now use asyncio (reduced performance of threaded)

* Print open file diff from `benchmark.sh`

* Add `--local-executor` flag, disabled by default for now until tests are updated

* Async `handle_readables` and `handle_writables` for `HttpProtocolHandlerPlugin` interface (doesnt impact proxy/web plugins for now)

* Async `get_events`

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

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

* Address tests after async changes

* mypy and flake8

* spelldoc

* `check.py` and trailing comma

* Rename to `_assertions.py`

* Add missing `pytest-mock` and `pytest-asyncio` deps

* Add `pytest-mock` to `pylint` deps

* Correct use of `parameterize` and add `PT007` to flake8 ignores

* Fix mypy hints broken for `< Python3.9`

* Remove usage of `asynccontextmanager` which is not available for all Python versions that `proxy.py` supports

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

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

* Fix for pre-python-3.9 versions

* `AsyncTask` apis `set_name` and `get_name` are not available on all supported versions

* Install setuptools via `lib-dep` until we recommend editable install

* Deprecate support for `Python 3.6`

* Use recommendation suggested here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753840929

* Address recommendation here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753841906

* Make `Threadless` agnostic of `multiprocessing.Process`

* Acceptors must dispatch to local executor in non-blocking fashion

* No daemon for executor processes and fix shutdown logic

* Only return fds from `_selected_events` not all events data

* Refactor logic

* Prefix private methods with `_`

* `work_queue` and not `client_queue`

* Turn `Threadless` into an abstract executor. Introduce `RemoteExecutor`

* Make `LocalExecutor` agnostic of `threading.Thread`

* `LocalExecutor` now implements `Threadless`

* `get_events` and `get_descriptors` now must return int and not sock.  `Threadless` now avoids repeated register/unregister and instead make use of `selectors.modify`

* Fix `main` tests

* Apply suggestions from code review

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

* Apply code review recommendations manually

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

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

* Revert back `Any` and use `addr or None`

* Address `flake8`

* Update tests to use `fileno`

* Fix doc build

* Fix doc spell, use tear down and not teardown

* Doc updates

* Add back support for `Python 3.6`

* Acceptors dont need loop initialization

* On Python 3.6 `asyncio.new_event_loop()` is necessary

* Make doc happy

* `--threaded` needs a new event loop for 3.7 too

* Always use `asyncio.new_event_loop()` for threaded mode

Added e2e integration tests (subprocess & curl) for all modes.

* Lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2021-11-23 15:02:00 +05:30
Sviatoslav Sydorenko b09d170ada
Add a config for pytest (#680) 2021-11-06 02:39:33 +05:30
pyup.io bot 567d616274
Update coverage from 6.1 to 6.1.1 (#646) 2021-10-31 21:00:26 +05:30
pyup.io bot 2f614e18c1
Update coverage from 6.0.2 to 6.1 (#640)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-10-31 09:03:11 +05:30
pyup.io bot 03ed5d4d40
Update autopep8 from 1.5.7 to 1.6.0 (#632)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-10-30 05:01:19 +05:30
pyup.io bot daa30d452d
Update flake8 from 3.9.2 to 4.0.1 (#627)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-10-29 16:58:39 +00:00
pyup.io bot 1e33d37058
Update rope from 0.20.1 to 0.21.0 (#631) 2021-10-20 08:13:37 +05:30
pyup.io bot a1217e0797
Update coverage from 6.0.1 to 6.0.2 (#628) 2021-10-12 15:28:36 +05:30
pyup.io bot 464897abe7
Update coverage from 6.0 to 6.0.1 (#623) 2021-10-07 09:46:59 +05:30
pyup.io bot a73d56907b
Update pytest-cov from 2.12.1 to 3.0.0 (#619) 2021-10-04 12:56:53 +05:30
pyup.io bot 90a4b0caa5
Update coverage from 5.5 to 6.0 (#618) 2021-10-04 01:52:42 +05:30
pyup.io bot 4b4acae35f
Update py-spy from 0.3.9 to 0.3.10 (#616) 2021-09-28 04:24:46 +05:30
Abhinav Singh df33b40a57
add paramiko types for mypy compliance (#613) 2021-09-22 23:37:00 +00:00
pyup.io bot bca5dd5ecc
Update tox from 3.24.3 to 3.24.4 (#607)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-09-23 04:31:36 +05:30
pyup.io bot b5ad9f294b
Update pylint from 2.10.2 to 2.11.1 (#609)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-09-23 04:31:15 +05:30
pyup.io bot 21d95d31f1
Update rope from 0.19.0 to 0.20.1 (#611) 2021-09-23 04:28:41 +05:30
pyup.io bot ece583f8d9
Update py-spy from 0.3.7 to 0.3.9 (#604) 2021-09-15 22:18:52 +05:30
pyup.io bot ea85d44f1e
Update pylint from 2.9.5 to 2.10.2 (#591)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-09-03 18:55:07 +05:30
pyup.io bot cc0fb0431f
Update tox from 3.24.0 to 3.24.3 (#592)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-09-03 18:54:39 +05:30
pyup.io bot 288225381f
Update pytest from 6.2.4 to 6.2.5 (#598)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-09-03 18:54:14 +05:30
pyup.io bot 8975c8e653
Update codecov from 2.1.11 to 2.1.12 (#582)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-08-13 19:20:11 +05:30
pyup.io bot 8e3684e9e7
Update wheel from 0.36.2 to 0.37.0 (#585) 2021-08-13 19:19:46 +05:30
pyup.io bot 2041809f88
Update pylint from 2.9.3 to 2.9.5 (#577)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-07-28 01:55:58 +05:30
pyup.io bot d684d33a59
Update tox from 3.23.1 to 3.24.0 (#575) 2021-07-18 06:15:23 +05:30
pyup.io bot 8512f8b1e2
Update pylint from 2.8.3 to 2.9.3 (#573) 2021-07-03 12:56:01 +05:30
pyup.io bot 8c1d20b183
Update pytest-cov from 2.12.0 to 2.12.1 (#561) 2021-06-03 01:04:18 +05:30
pyup.io bot d977fc71e8
Update pylint from 2.8.2 to 2.8.3 (#558) 2021-06-01 22:17:17 +05:30
pyup.io bot 754d5a35d2
Update py-spy from 0.3.6 to 0.3.7 (#555) 2021-05-17 00:35:41 +05:30
pyup.io bot 88af8e2bab
Update pytest-cov from 2.11.1 to 2.12.0 (#552) 2021-05-14 20:28:02 +05:30
pyup.io bot c0088b2710
Update flake8 from 3.9.1 to 3.9.2 (#549) 2021-05-09 16:44:03 +05:30
pyup.io bot 1a20c5fa8e
Update py-spy from 0.3.5 to 0.3.6 (#547) 2021-05-08 19:59:03 +05:30
pyup.io bot 92b44e18ca
Update tox from 3.23.0 to 3.23.1 (#546) 2021-05-06 19:22:51 +05:30
pyup.io bot 1b9ca716d2
Update pytest from 6.2.3 to 6.2.4 (#545) 2021-05-04 22:57:39 +05:30
pyup.io bot 95c1b6f7d5
Update autopep8 from 1.5.6 to 1.5.7 (#543) 2021-04-30 16:11:43 +05:30
pyup.io bot 29ba491e28
Update pylint from 2.8.1 to 2.8.2 (#542) 2021-04-27 17:21:10 +05:30
pyup.io bot 3e8ae0c051
Update pylint from 2.8.0 to 2.8.1 (#541) 2021-04-25 19:00:12 +05:30
pyup.io bot f551581f9d
Update pylint from 2.7.4 to 2.8.0 (#540) 2021-04-25 08:54:33 +05:30
pyup.io bot 74e5207cc9
Update rope from 0.18.0 to 0.19.0 (#539) 2021-04-19 13:46:55 +05:30
pyup.io bot 2e9c822bd6
Update flake8 from 3.9.0 to 3.9.1 (#538) 2021-04-16 11:13:10 +05:30
pyup.io bot 06a84ae6b0
Update pytest from 6.2.2 to 6.2.3 (#532) 2021-04-04 15:53:58 +05:30