Skip to content

Commit

Permalink
v2.4.0rc6 (#964)
Browse files Browse the repository at this point in the history
* Remove menubar (#930)

Remove `menubar`

* Use `128 KB` as default value for `DEFAULT_BUFFER_SIZE` (#926)

* Add `TlsInterception` acceptance test

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

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

* Generate CA cert if not available

* Fix lint and tests

* Fix args

* Remove acceptance tests for now

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* pip prod(deps): bump wheel from 0.37.0 to 0.37.1 (#934)

Bumps [wheel](https://github.com/pypa/wheel) from 0.37.0 to 0.37.1.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](pypa/wheel@0.37.0...0.37.1)

---
updated-dependencies:
- dependency-name: wheel
  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>

* npm: bump jasmine from 3.10.0 to 4.0.0 in /dashboard (#933)

Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.10.0 to 4.0.0.
- [Release notes](https://github.com/jasmine/jasmine-npm/releases)
- [Commits](jasmine/jasmine-npm@v3.10.0...v4.0.0)

---
updated-dependencies:
- dependency-name: jasmine
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm: bump ws from 8.3.0 to 8.4.0 in /dashboard (#936)

Bumps [ws](https://github.com/websockets/ws) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.3.0...8.4.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  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>

* pip prod(deps): bump types-paramiko from 2.8.4 to 2.8.6 (#937)

Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>

* `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

* Fix doc spell

* Add `--port-file` flag (#942)

* Add `--port-file` flag

* Use `--port-file` flag for integration tests using `get_available_port`

* Use temp dir

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

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

* Fix `base_klass` variable related lint issues

* Fix main tests

* Fix integration

* Use timeout when terminating proc

* Skip integration on win instead of xmark

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Expose `UpstreamConnectionPool` to web & proxy plugins (#946)

* Expose conn pool to plugins

* Fix reusable state handling

* Separate `release` and `retain` methods

* Fix conn pool tests

* Fix tests

* npm: bump chrome-devtools-frontend in /dashboard (#949)

Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.952865 to 1.0.956881.
- [Release notes](https://github.com/ChromeDevTools/devtools-frontend/releases)
- [Changelog](https://github.com/ChromeDevTools/devtools-frontend/blob/main/docs/release_management.md)
- [Commits](https://github.com/ChromeDevTools/devtools-frontend/commits)

---
updated-dependencies:
- dependency-name: chrome-devtools-frontend
  dependency-type: direct:development
  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>

* pip prod(deps): bump sphinxcontrib-towncrier from 0.2.0a0 to 0.2.1a0 (#941)

Bumps [sphinxcontrib-towncrier](https://github.com/sphinx-contrib/sphinxcontrib-towncrier) from 0.2.0a0 to 0.2.1a0.
- [Release notes](https://github.com/sphinx-contrib/sphinxcontrib-towncrier/releases)
- [Commits](sphinx-contrib/sphinxcontrib-towncrier@v0.2.0a0...v0.2.1a0)

---
updated-dependencies:
- dependency-name: sphinxcontrib-towncrier
  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>

* `isort` everything except lib (for now) (#952)

* isort the tests folder

* Carry over changes from #672

* Disable pre-commit

* Revert flake8 config change

* isort examples too

* pip prod(deps): bump httpx from 0.20.0 to 0.21.3 (#951)

Bumps [httpx](https://github.com/encode/httpx) from 0.20.0 to 0.21.3.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](encode/httpx@0.20.0...0.21.3)

---
updated-dependencies:
- dependency-name: httpx
  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>

* Decouple transport framework from dashboard plugin (#953)

* Decouple transport framework from dashboard plugin

* Move `InspectTrafficPlugin` within `http.inspector` module

* Avoid exporting plugins within `__init__.py` files

* Use `/transport/` prefix to avoid #945 conflict issue

* Add todo

* Build containers in parallel and pre-check (#954)

* Build containers in parallel and pre-check

* Fix loop in workflow

* Test container needs build

* Invoke `WebSocketTransportBasePlugin` connected and disconnected callbacks (#956)

* [HttpProtocolHandler] Handle invalid request parsing exceptions (#957)

* Handle invalid request parsing exception when raised, log the bytes for later inspection

* [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>

* npm: bump jasmine-ts from 0.3.0 to 0.4.0 in /dashboard (#958)

Bumps [jasmine-ts](https://github.com/svi3c/jasmine-ts) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/svi3c/jasmine-ts/releases)
- [Changelog](https://github.com/svi3c/jasmine-ts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svi3c/jasmine-ts/commits/v0.4.0)

---
updated-dependencies:
- dependency-name: jasmine-ts
  dependency-type: direct:development
  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>

* Ignore `utf-8` decoding errors within event core (#961)

* [WebServer] Refactor routing to allow same path for websocket and web requests (#962)

* Switch to WS

* Refactor

* Ignore utf-8 decode error during logging (#966)

* On-demand `TlsInterception` capability, driven by plugins (#965)

* Add `TlsInterceptionPropertyMixin`

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

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

* Add `do_intercept` hook

* call super init

* No super from mixin as it is followed by abc?

* type ignore

* spell

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [WebServer] Fix routing (#968)

* Fix web server routing

* Fix mypy

* pip prod(deps): bump furo from 2021.11.23 to 2022.1.2 (#959)

Bumps [furo](https://github.com/pradyunsg/furo) from 2021.11.23 to 2022.1.2.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](pradyunsg/furo@2021.11.23...2022.01.02)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>

* pip prod(deps): bump paramiko from 2.9.1 to 2.9.2 (#970)

Bumps [paramiko](https://github.com/paramiko/paramiko) from 2.9.1 to 2.9.2.
- [Release notes](https://github.com/paramiko/paramiko/releases)
- [Changelog](https://github.com/paramiko/paramiko/blob/main/NEWS)
- [Commits](paramiko/paramiko@2.9.1...2.9.2)

---
updated-dependencies:
- dependency-name: paramiko
  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>

* 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>

* Handle `OSError` on shutdown & `TimeoutError` on recv (#974)

* Expect `TimeoutError` during `recv`

* Expect `OSError` during socket shutdown, can happen if other end has already closed the socket

* pip prod(deps): bump mypy from 0.920 to 0.931 (#976)

Bumps [mypy](https://github.com/python/mypy) from 0.920 to 0.931.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](python/mypy@v0.920...v0.931)

---
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>

* npm: bump @types/jquery from 3.5.4 to 3.5.13 in /dashboard (#975)

Bumps [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) from 3.5.4 to 3.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

---
updated-dependencies:
- dependency-name: "@types/jquery"
  dependency-type: direct:development
  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>

* Refactor into separate `Work` module (#977)

* work module

* Fix imports

* String based typing for multiprocessing.synchronize

* Fix `test_accepts_client_from_server_socket`

* Move staticmethod outside of threadless pool class

* Fix doc build

* Fix test mock

* mp grouped together

* pylint happy

* import only for type checking

* doc build

* wrong import order

* Type fixes (#979)

* Type fixes

* Type fix

* Py class role

* unused any import

* [TlsInterception] GHA integration tests (#981)

* Add TLS interception integration tests

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

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

* Fixture to gen certificate once for the `test_integration` module

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

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

* Use https endpoints in tls interception tests

* Fix modify post data integration test

* Only start 3 acceptor & 3 workers during integration run

* disable chunk response

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* npm: bump typescript from 3.9.7 to 4.5.4 in /dashboard (#982)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v3.9.7...v4.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pip prod(deps): bump types-paramiko from 2.8.6 to 2.8.9 (#983)

Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.6 to 2.8.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>

* Pass separate `--ca-cert-dir` flag for parallel TLS interception tests (#984)

* Pass separate `--ca-cert-dir` flag for parallel TLS interception tests

* Temp disable `test_modify_post_response_integration`

* mock ca cert dir

* Is threaded an issue with TLS interception?

* Disable modify chunk response for python < 3.10

* Disable modify chunk response for python < 3.10

* [TlsInterception] Fix broken `ChunkedResponsePlugin` for `Python < 3.10` (#986)

* Add TLS interception integration tests

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

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

* Fix CI

* unused

* Well 3.9 just worked locally

* Dispatching empty byte to client results in OSError for Python < 3.10

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

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

* Uncomment old integration tests

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add `# pragma: no cover` for unnecessary code (#987)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 14, 2022
2 parents 111ec38 + 38eab69 commit 177689c
Show file tree
Hide file tree
Showing 150 changed files with 2,164 additions and 2,856 deletions.
1 change: 0 additions & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ test_patterns = [

exclude_patterns = [
"helper/**",
"menubar/**"
]

[[analyzers]]
Expand Down
213 changes: 171 additions & 42 deletions .github/workflows/test-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,66 @@ jobs:
flags: pytest, GHA, Python ${{ matrix.python }}, ${{ runner.os }}
verbose: true

test-container:
runs-on: Ubuntu-latest
permissions:
packages: write
if: success()
needs:
- pre-setup # transitive, for accessing settings
- build
name: 🐳 Build & Test
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.release-commitish }}
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
# See https://github.com/docker/buildx/issues/850#issuecomment-996408167
with:
version: v0.7.0
buildkitd-flags: --debug
config: .github/buildkitd.toml
install: true
- name: Enable Multiarch # This slows down arm build by 4-5x
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Create builder
run: |
docker buildx create --name proxypybuilder
docker buildx use proxypybuilder
docker buildx inspect
docker buildx ls
- name: Build, run & test container
run: >-
CONTAINER_TAG="abhinavsingh/proxy.py:${{
needs.pre-setup.outputs.container-version
}}";
docker buildx build
--load
--build-arg PROXYPY_PKG_PATH='dist/${{
needs.pre-setup.outputs.wheel-artifact-name
}}'
-t $CONTAINER_TAG .
&&
docker run
-d
-p 8899:8899
$CONTAINER_TAG
--hostname 0.0.0.0
--enable-web-server
&&
./tests/integration/test_integration.sh 8899
analyze:
runs-on: ubuntu-latest
name: 🛡️ Analyze
Expand Down Expand Up @@ -672,34 +732,15 @@ jobs:
make ca-certificates
python3 -m proxy --version
check: # This job does nothing and is only used for the branch protection
if: always()

needs:
- analyze
- test
- lint
- dashboard
- brew
- developer

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

docker:
ghcr-latest:
runs-on: Ubuntu-latest
permissions:
packages: write
if: success()
needs:
- check
- test-container
- pre-setup # transitive, for accessing settings
name: 🐳 containerize
name: 🐳 ghcr:latest
strategy:
fail-fast: false
steps:
Expand Down Expand Up @@ -736,26 +777,6 @@ jobs:
docker buildx use proxypybuilder
docker buildx inspect
docker buildx ls
- name: Build, run & test container
run: >-
CONTAINER_TAG="abhinavsingh/proxy.py:${{
needs.pre-setup.outputs.container-version
}}";
docker buildx build
--load
--build-arg PROXYPY_PKG_PATH='dist/${{
needs.pre-setup.outputs.wheel-artifact-name
}}'
-t $CONTAINER_TAG .
&&
docker run
-d
-p 8899:8899
$CONTAINER_TAG
--hostname 0.0.0.0
--enable-web-server
&&
./tests/integration/test_integration.sh 8899
- name: Push to GHCR
run: >-
REGISTRY_URL="ghcr.io/abhinavsingh/proxy.py";
Expand Down Expand Up @@ -794,6 +815,52 @@ jobs:
needs.pre-setup.outputs.wheel-artifact-name
}}'
-t $LATEST_TAG .
ghcr-openssl:
runs-on: Ubuntu-latest
permissions:
packages: write
if: success()
needs:
- test-container
- pre-setup # transitive, for accessing settings
name: 🐳 ghcr:openssl
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.release-commitish }}
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
# See https://github.com/docker/buildx/issues/850#issuecomment-996408167
with:
version: v0.7.0
buildkitd-flags: --debug
config: .github/buildkitd.toml
install: true
- name: Enable Multiarch # This slows down arm build by 4-5x
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Create builder
run: |
docker buildx create --name proxypybuilder
docker buildx use proxypybuilder
docker buildx inspect
docker buildx ls
- name: Push openssl to GHCR
run: >-
REGISTRY_URL="ghcr.io/abhinavsingh/proxy.py";
Expand Down Expand Up @@ -830,6 +897,46 @@ jobs:
needs.pre-setup.outputs.wheel-artifact-name
}}'
-t $LATEST_TAG .
docker-latest:
runs-on: Ubuntu-latest
permissions:
packages: write
if: success()
needs:
- test-container
- pre-setup # transitive, for accessing settings
name: 🐳 docker:latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.release-commitish }}
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
# See https://github.com/docker/buildx/issues/850#issuecomment-996408167
with:
version: v0.7.0
buildkitd-flags: --debug
config: .github/buildkitd.toml
install: true
- name: Enable Multiarch # This slows down arm build by 4-5x
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Create builder
run: |
docker buildx create --name proxypybuilder
docker buildx use proxypybuilder
docker buildx inspect
docker buildx ls
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -853,6 +960,28 @@ jobs:
}}'
-t $CONTAINER_TAG .
check: # This job does nothing and is only used for the branch protection
if: always()

needs:
- analyze
- test
- lint
- dashboard
- brew
- developer
- ghcr-latest
- ghcr-openssl
- docker-latest

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

publish-pypi:
name: Publish 🐍📦 ${{ needs.pre-setup.outputs.git-tag }} to PyPI
needs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ htmlcov
dist
build

proxy/public
profile.svg
24 changes: 24 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://github.com/timothycrosley/isort/wiki/isort-Settings
[settings]
default_section = THIRDPARTY
# force_to_top=file1.py,file2.py
# forced_separate = django.contrib,django.utils
include_trailing_comma = true
indent = 4
known_first_party = proxy
# known_future_library = future,pies
# known_standard_library = std,std2
known_testing = pytest,unittest
length_sort = 1
# Should be: 80 - 1
line_length = 79
lines_after_imports = 2
# https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html
# NOTE: Another mode could be "5" for grouping multiple "import from" under
# NOTE: a single instruction.
multi_line_output = 5
no_lines_before = LOCALFOLDER
sections=FUTURE,STDLIB,TESTING,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
# skip=file3.py,file4.py
use_parentheses = true
verbose = true
9 changes: 1 addition & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- --py36-plus

# - repo: https://github.com/timothycrosley/isort.git
# rev: 5.4.2
# rev: 5.10.0
# hooks:
# - id: isort
# args:
Expand Down Expand Up @@ -63,13 +63,6 @@ repos:
src/core/plugins/inspect_traffic\.json|
static/bootstrap-4\.3\.1\.min\.(cs|j)s
)|
menubar/proxy\.py/(
Assets\.xcassets/(
AppIcon\.appiconset/|
StatusBarButtonImage\.imageset/|
)|
Preview\sContent/Preview\sAssets\.xcassets/
)Contents\.json|
requirements-release\.txt
$
- id: requirements-txt-fixer
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
".venv*/**/*.py",
"venv*/**/*.py",
"docs/**/*.py",
"helper/**/*.py",
"menubar/**/*.py"
"helper/**/*.py"
],
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--generate-members"],
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ exclude ProxyPy.png
exclude Dashboard.png
exclude shortlink.gif
prune dashboard
prune menubar
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ HTTPS_CERT_FILE_PATH := https-cert.pem
HTTPS_CSR_FILE_PATH := https-csr.pem
HTTPS_SIGNED_CERT_FILE_PATH := https-signed-cert.pem

CA_KEY_FILE_PATH := ca-key.pem
CA_CERT_FILE_PATH := ca-cert.pem
CA_SIGNING_KEY_FILE_PATH := ca-signing-key.pem
CA_CERT_SUFFIX :=
CA_KEY_FILE_PATH := ca-key$(CA_CERT_SUFFIX).pem
CA_CERT_FILE_PATH := ca-cert$(CA_CERT_SUFFIX).pem
CA_SIGNING_KEY_FILE_PATH := ca-signing-key$(CA_CERT_SUFFIX).pem

# Dummy invalid hardcoded value
PROXYPY_PKG_PATH := dist/proxy.py.whl
Expand All @@ -28,7 +29,7 @@ endif

.PHONY: all https-certificates sign-https-certificates ca-certificates
.PHONY: lib-check lib-clean lib-test lib-package lib-coverage lib-lint lib-pytest
.PHONY: lib-release-test lib-release lib-profile lib-doc
.PHONY: lib-release-test lib-release lib-profile lib-doc lib-pre-commit
.PHONY: lib-dep lib-flake8 lib-mypy lib-speedscope container-buildx-all-platforms
.PHONY: container container-run container-release container-build container-buildx
.PHONY: devtools dashboard dashboard-clean container-without-openssl
Expand Down Expand Up @@ -91,16 +92,21 @@ lib-clean:
rm -rf proxy.py.egg-info
rm -rf .pytest_cache
rm -rf .hypothesis
# Doc RST files are cached and can cause issues
# See https://github.com/abhinavsingh/proxy.py/issues/642#issuecomment-1003444578
rm docs/pkg/*.rst

lib-dep:
pip install --upgrade pip && \
pip install \
-r requirements.txt \
-r requirements-testing.txt \
-r requirements-release.txt \
-r requirements-tunnel.txt && \
pip install "setuptools>=42"

lib-pre-commit:
python -m pre_commit run --hook-stage manual --all-files -v

lib-lint:
python -m tox -e lint

Expand Down
Loading

0 comments on commit 177689c

Please sign in to comment.