Skip to content

Commit 2784cfb

Browse files
abhinavsinghpre-commit-ci[bot]dependabot[bot]webknjaz
authored
v2.4.0rc4 (#894)
* Merge pull request #840 from abhinavsingh/release-schedule-notes Add release schedule under FAQ * Green CI (#841) * Cleanup parser & url classes (#843) * Optimize parser logic * Add `is_complete` property * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * pre commit fixes * We need `ValueError` * wuff * useless * flake8 * Simplify url Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * pip prod(deps): bump twine from 3.6.0 to 3.7.0 (#845) Bumps [twine](https://github.com/pypa/twine) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/pypa/twine/releases) - [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst) - [Commits](pypa/twine@3.6.0...3.7.0) --- updated-dependencies: - dependency-name: twine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm: bump jasmine from 3.6.3 to 3.10.0 in /dashboard (#844) Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.6.3 to 3.10.0. - [Release notes](https://github.com/jasmine/jasmine-npm/releases) - [Commits](jasmine/jasmine-npm@v3.6.3...v3.10.0) --- updated-dependencies: - dependency-name: jasmine dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * npm: bump chrome-devtools-frontend in /dashboard (#846) Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.944903 to 1.0.947377. - [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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 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](coveragepy/coveragepy@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * Fix GHA check-gate to properly identify failures (#849) * 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](pylint-dev/pylint@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm: bump @types/js-cookie from 2.2.6 to 3.0.1 in /dashboard (#850) Bumps [@types/js-cookie](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-cookie) from 2.2.6 to 3.0.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-cookie) --- updated-dependencies: - dependency-name: "@types/js-cookie" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * pip prod(deps): bump sphinx from 4.3.0 to 4.3.1 (#853) Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.0 to 4.3.1. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES) - [Commits](sphinx-doc/sphinx@v4.3.0...v4.3.1) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * pip prod(deps): bump paramiko from 2.8.0 to 2.8.1 (#855) * npm: bump ws from 7.4.6 to 8.3.0 in /dashboard (#854) * pip prod(deps): bump uvicorn from 0.15.0 to 0.16.0 (#857) Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.15.0 to 0.16.0. - [Release notes](https://github.com/encode/uvicorn/releases) - [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md) - [Commits](Kludex/uvicorn@0.15.0...0.16.0) --- updated-dependencies: - dependency-name: uvicorn dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm: bump chrome-devtools-frontend in /dashboard (#856) Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.947377 to 1.0.949424. - [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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * Process `--enable-*` flags before loading plugins (#860) * Process `--enable-*` flags before loading plugins * Fix spelling * Ignore RST299 and RST499 * npm: bump http-server from 0.12.3 to 14.0.0 in /dashboard (#858) Bumps [http-server](https://github.com/http-party/http-server) from 0.12.3 to 14.0.0. - [Release notes](https://github.com/http-party/http-server/releases) - [Commits](http-party/http-server@v0.12.3...v14.0.0) --- updated-dependencies: - dependency-name: http-server dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * pip prod(deps): bump furo from 2021.11.15 to 2021.11.23 (#859) Bumps [furo](https://github.com/pradyunsg/furo) from 2021.11.15 to 2021.11.23. - [Release notes](https://github.com/pradyunsg/furo/releases) - [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md) - [Commits](pradyunsg/furo@2021.11.15...2021.11.23) --- updated-dependencies: - dependency-name: furo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * Update web log context fields to match proxy log context fields (#861) * Update web log context fields to match those with proxy log context for consistency * Fix spell * Fix `DEFAULT_WEB_ACCESS_LOG_FORMAT` * 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](pytest-dev/pytest-xdist@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm: bump eslint-plugin-node from 10.0.0 to 11.1.0 in /dashboard (#863) Bumps [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) from 10.0.0 to 11.1.0. - [Release notes](https://github.com/mysticatea/eslint-plugin-node/releases) - [Commits](mysticatea/eslint-plugin-node@v10.0.0...v11.1.0) --- updated-dependencies: - dependency-name: eslint-plugin-node dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * 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? * docker/buildx#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> * Integrate showing unreleased changelog draft (#873) * pip prod(deps): bump types-paramiko from 2.8.2 to 2.8.4 (#868) * npm: bump @types/jasmine from 3.6.1 to 3.10.2 in /dashboard (#867) * 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](benfred/py-spy@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * [GHA] Add container integration test & publish containers to GHCR (#818) * Handle KBI in threadless * Remove line-length disable clause * Move `Set PROXYPY_CONTAINER_VERSION env` within pre-setup * Use step output * Use review suggestion * Break line at less essential places * Possibly fix? * alignment necessary? * :) * Fix integration * Add `v` prefix * Load buildx image within docker for integration tests to work * Run container in detached mode * Enable web server for integration test to work * Push to GHCR after successful tests * Tag & Push to GHCR * Add package permission * Login to GHCR * Login to GHCR * Login to GHCR * Explicitly use ghcr.io registry * Add a ghcr manifest creation step which depends upon docker step * Probably we need all images (tags) locally * arm not amd * Fix syntax * Fix typo * `Unable to find image ghcr.io/abhinavsingh/proxy.py:latest locally` * GHCR doesnt support manifest? * Publish multi-platform containers on GHCR (#877) * Build containers without matrix based strategy. Helps with buildx based manifest generation * Use buildx directly in workflows * Add PROXYPY_PKG_PATH arg * Add missing . * --push from buildx * Also add latest tag for GHCR * Fix typo * Explain differences between latest tag on DockerHub (stable) and GHCR (develop) * Publish multi-platform containers to DockerHub (#878) * Use `--local-executor` flag by default for Docker container (#880) * Benchmark gets packaged within wheel if set as a package * Use `--local-executor` flag by default for Docker containers * Dockerfile update * Fix mypy issues * Remove conflicting dir names * [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> * Pre-evaluate `args.threadless = is_threadless` (#881) * Pre-evaluate `args.threadless = is_threadless` during flag initialization * Address some antipatterns in code * Executor pool only started for _env_threadless_compliant * ignore WPS450 * pip prod(deps): bump blacksheep from 1.2.1 to 1.2.2 (#885) Bumps [blacksheep](https://github.com/Neoteroi/BlackSheep) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/Neoteroi/BlackSheep/releases) - [Changelog](https://github.com/Neoteroi/BlackSheep/blob/main/CHANGELOG.md) - [Commits](Neoteroi/BlackSheep@v1.2.1...v1.2.2) --- updated-dependencies: - dependency-name: blacksheep dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * npm: bump chrome-devtools-frontend in /dashboard (#884) Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.949424 to 1.0.952784. - [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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * Tag GHCR latest only when publishing from develop branch (#887) * Tag GHCR latest only when publishing from develop branch * Fix condition * Quote platforms * Fix output(s) typo * Fix conditional for latest tag on GHCR (#889) * 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](python/mypy@v0.910...v0.920) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * npm: bump chrome-devtools-frontend in /dashboard (#886) Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.949424 to 1.0.952865. - [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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * npm: bump jquery from 3.5.1 to 3.6.0 in /dashboard (#891) Bumps [jquery](https://github.com/jquery/jquery) from 3.5.1 to 3.6.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](jquery/jquery@3.5.1...3.6.0) --- updated-dependencies: - dependency-name: jquery dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <[email protected]> * [TLSInterception] Fix serial number generation (#892) * Fix serial number generation * Fix spellcheck-doc 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> Co-authored-by: Sviatoslav Sydorenko <[email protected]>
2 parents 009935b + ef730ec commit 2784cfb

File tree

20 files changed

+133
-127
lines changed

20 files changed

+133
-127
lines changed

.github/workflows/test-library.yml

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
sdist-artifact-name: ${{ steps.artifact-name.outputs.sdist }}
6868
wheel-artifact-name: ${{ steps.artifact-name.outputs.wheel }}
6969
container-version: v${{ steps.container.outputs.version }}
70+
container-platforms: ${{ steps.container.outputs.platforms }}
7071
steps:
7172
- name: Switch to using Python 3.9 by default
7273
uses: actions/setup-python@v2
@@ -204,7 +205,9 @@ jobs:
204205
&& github.event.inputs.release-version
205206
|| steps.scm-version.outputs.dist-version
206207
}}' | tr + .);
207-
echo "::set-output name=version::$VER"
208+
PLATFORMS="linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x";
209+
echo "::set-output name=version::$VER";
210+
echo "::set-output name=platforms::$PLATFORMS"
208211
209212
build:
210213
name: 👷 dists ${{ needs.pre-setup.outputs.git-tag }}
@@ -727,19 +730,36 @@ jobs:
727730
--local-executor && ./tests/integration/test_integration.sh 8899
728731
- name: Push to GHCR
729732
run: >-
730-
PLATFORMS=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x;
731733
REGISTRY_URL="ghcr.io/abhinavsingh/proxy.py";
732734
CONTAINER_TAG=$REGISTRY_URL:${{
733735
needs.pre-setup.outputs.container-version
734736
}};
737+
docker buildx build
738+
--push
739+
--platform ${{
740+
needs.pre-setup.outputs.container-platforms
741+
}}
742+
--build-arg PROXYPY_PKG_PATH='dist/${{
743+
needs.pre-setup.outputs.wheel-artifact-name
744+
}}'
745+
-t $CONTAINER_TAG .
746+
- name: Tag latest on GHCR
747+
if: >-
748+
github.event_name == 'push' &&
749+
github.ref == format(
750+
'refs/heads/{0}', github.event.repository.default_branch
751+
)
752+
run: >-
753+
REGISTRY_URL="ghcr.io/abhinavsingh/proxy.py";
735754
LATEST_TAG=$REGISTRY_URL:latest;
736755
docker buildx build
737756
--push
738-
--platform $PLATFORMS
757+
--platform ${{
758+
needs.pre-setup.outputs.container-platforms
759+
}}
739760
--build-arg PROXYPY_PKG_PATH='dist/${{
740761
needs.pre-setup.outputs.wheel-artifact-name
741762
}}'
742-
-t $CONTAINER_TAG
743763
-t $LATEST_TAG .
744764
- name: Login to DockerHub
745765
uses: docker/login-action@v1
@@ -748,14 +768,15 @@ jobs:
748768
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
749769
- name: Push to DockerHub
750770
run: >-
751-
PLATFORMS=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x;
752771
REGISTRY_URL="abhinavsingh/proxy.py";
753772
CONTAINER_TAG=$REGISTRY_URL:${{
754773
needs.pre-setup.outputs.container-version
755774
}};
756775
docker buildx build
757776
--push
758-
--platform $PLATFORMS
777+
--platform ${{
778+
needs.pre-setup.outputs.container-platforms
779+
}}
759780
--build-arg PROXYPY_PKG_PATH='dist/${{
760781
needs.pre-setup.outputs.wheel-artifact-name
761782
}}'
@@ -839,35 +860,6 @@ jobs:
839860
password: ${{ secrets.TESTPYPI_API_TOKEN }}
840861
repository_url: https://test.pypi.org/legacy/
841862
842-
# publish-docker:
843-
# name: Publish 🐳 📦 ${{ needs.pre-setup.outputs.git-tag }} to Docker Hub
844-
# needs:
845-
# - check
846-
# - pre-setup # transitive, for accessing settings
847-
# if: >-
848-
# fromJSON(needs.pre-setup.outputs.release-requested)
849-
# runs-on: Ubuntu-latest
850-
851-
# environment:
852-
# name: release-docker
853-
# url: >-
854-
# https://test.pypi.org/project/proxy.py/${{
855-
# needs.pre-setup.outputs.dist-version
856-
# }}
857-
858-
# steps:
859-
# - name: Download all the dists
860-
# uses: actions/download-artifact@v2
861-
# with:
862-
# name: python-package-distributions
863-
# path: dist/
864-
# - name: >-
865-
# Publish 🐳 📦 ${{ needs.pre-setup.outputs.git-tag }} to Docker Hub
866-
# uses: pypa/gh-action-pypi-publish@release/v1
867-
# with:
868-
# password: ${{ secrets.TESTPYPI_API_TOKEN }}
869-
# repository_url: https://test.pypi.org/legacy/
870-
871863
post-release-repo-update:
872864
name: >-
873865
Publish post-release Git tag

benchmark/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
aiohttp==3.8.1
2-
blacksheep==1.2.1
2+
blacksheep==1.2.2
33
starlette==0.17.1
44
tornado==6.1
55
uvicorn==0.16.0

dashboard/package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@types/js-cookie": "^3.0.1",
3131
"@typescript-eslint/eslint-plugin": "^2.34.0",
3232
"@typescript-eslint/parser": "^2.34.0",
33-
"chrome-devtools-frontend": "^1.0.949424",
33+
"chrome-devtools-frontend": "^1.0.952865",
3434
"eslint": "^6.8.0",
3535
"eslint-config-standard": "^14.1.1",
3636
"eslint-plugin-import": "^2.25.3",
@@ -40,7 +40,7 @@
4040
"http-server": "^14.0.0",
4141
"jasmine": "^3.10.0",
4242
"jasmine-ts": "^0.3.0",
43-
"jquery": "^3.5.1",
43+
"jquery": "^3.6.0",
4444
"js-cookie": "^3.0.1",
4545
"jsdom": "^15.2.1",
4646
"ncp": "^2.0.0",

helper/benchmark.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ run_benchmark
6464

6565
POST_RUN_OPEN_FILES=$(./helper/monitor_open_files.sh)
6666

67-
echo $output
68-
6967
echo "Open files diff:"
7068
diff <( echo "$PRE_RUN_OPEN_FILES" ) <( echo "$POST_RUN_OPEN_FILES" )
7169

proxy/common/backports.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def randint(self):
5555
backports
5656
getter
5757
Arndt
58+
del
5859
"""
5960

6061
def __init__(self, ttl: float = 0):

proxy/common/flag.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ._compat import IS_WINDOWS # noqa: WPS436
2323
from .plugins import Plugins
2424
from .types import IpAddress
25-
from .utils import bytes_, is_py2, set_open_file_limit
25+
from .utils import bytes_, is_py2, is_threadless, set_open_file_limit
2626
from .constants import COMMA, DEFAULT_DATA_DIRECTORY_PATH, DEFAULT_NUM_ACCEPTORS, DEFAULT_NUM_WORKERS
2727
from .constants import DEFAULT_DEVTOOLS_WS_PATH, DEFAULT_DISABLE_HEADERS, PY2_DEPRECATION_MESSAGE
2828
from .constants import PLUGIN_DASHBOARD, PLUGIN_DEVTOOLS_PROTOCOL, DEFAULT_MIN_COMPRESSION_LIMIT
@@ -186,7 +186,7 @@ def initialize(
186186
for p in FlagParser.get_default_plugins(args)
187187
]
188188
requested_plugins = Plugins.resolve_plugin_flag(
189-
args.plugins, opts.get('plugins', None),
189+
args.plugins, opts.get('plugins'),
190190
)
191191
plugins = Plugins.load(
192192
default_plugins + auth_plugins + requested_plugins,
@@ -340,21 +340,29 @@ def initialize(
340340
),
341341
)
342342
args.timeout = cast(int, opts.get('timeout', args.timeout))
343-
args.threadless = cast(bool, opts.get('threadless', args.threadless))
344-
args.threaded = cast(bool, opts.get('threaded', args.threaded))
345-
args.pid_file = cast(
346-
Optional[str], opts.get(
347-
'pid_file',
348-
args.pid_file,
349-
),
350-
)
351343
args.local_executor = cast(
352344
bool,
353345
opts.get(
354346
'local_executor',
355347
args.local_executor,
356348
),
357349
)
350+
args.threaded = cast(bool, opts.get('threaded', args.threaded))
351+
# Pre-evaluate threadless values based upon environment and config
352+
#
353+
# --threadless is now default mode of execution
354+
# but we still have exceptions based upon OS config.
355+
# Make sure executors are not started if is_threadless
356+
# evaluates to False.
357+
args.threadless = cast(bool, opts.get('threadless', args.threadless))
358+
args.threadless = is_threadless(args.threadless, args.threaded)
359+
360+
args.pid_file = cast(
361+
Optional[str], opts.get(
362+
'pid_file',
363+
args.pid_file,
364+
),
365+
)
358366

359367
args.proxy_py_data_dir = DEFAULT_DATA_DIRECTORY_PATH
360368
os.makedirs(args.proxy_py_data_dir, exist_ok=True)

proxy/common/pki.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,16 @@ def run_openssl_command(command: List[str], timeout: int) -> bool:
298298
', '.join(available_actions),
299299
)
300300
sys.exit(1)
301-
if args.action in ('gen_private_key', 'gen_public_key'):
302-
if args.private_key_path is None:
303-
logger.error('--private-key-path is required for ' + args.action)
304-
sys.exit(1)
305-
if args.action == 'gen_public_key':
306-
if args.public_key_path is None:
307-
logger.error(
308-
'--public-key-file is required for private key generation',
309-
)
310-
sys.exit(1)
301+
if args.action in ('gen_private_key', 'gen_public_key') and \
302+
args.private_key_path is None:
303+
logger.error('--private-key-path is required for ' + args.action)
304+
sys.exit(1)
305+
if args.action == 'gen_public_key' and \
306+
args.public_key_path is None:
307+
logger.error(
308+
'--public-key-file is required for private key generation',
309+
)
310+
sys.exit(1)
311311

312312
# Execute
313313
if args.action == 'gen_private_key':

proxy/common/plugins.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ def load(
7474
mro = list(inspect.getmro(klass))
7575
mro.reverse()
7676
iterator = iter(mro)
77-
while next(iterator) is not abc.ABC:
78-
pass
79-
base_klass = next(iterator)
80-
if klass not in p[bytes_(base_klass.__name__)]:
81-
p[bytes_(base_klass.__name__)].append(klass)
82-
logger.info('Loaded plugin %s.%s', module_name, klass.__name__)
77+
try:
78+
while next(iterator) is not abc.ABC:
79+
pass
80+
base_klass = next(iterator)
81+
if klass not in p[bytes_(base_klass.__name__)]:
82+
p[bytes_(base_klass.__name__)].append(klass)
83+
logger.info('Loaded plugin %s.%s', module_name, klass.__name__)
84+
except StopIteration:
85+
logger.warn(
86+
'%s is NOT a valid plugin',
87+
text_(plugin_),
88+
)
8389
return p
8490

8591
@staticmethod

proxy/common/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def build_http_response(
9999
headers = {}
100100
has_content_length = False
101101
has_transfer_encoding = False
102-
for k in headers:
102+
for k, _ in headers.items():
103103
if k.lower() == b'content-length':
104104
has_content_length = True
105105
if k.lower() == b'transfer-encoding':
@@ -124,8 +124,8 @@ def build_http_pkt(
124124
"""Build and returns a HTTP request or response packet."""
125125
pkt = WHITESPACE.join(line) + CRLF
126126
if headers is not None:
127-
for k in headers:
128-
pkt += build_http_header(k, headers[k]) + CRLF
127+
for k, v in headers.items():
128+
pkt += build_http_header(k, v) + CRLF
129129
pkt += CRLF
130130
if body:
131131
pkt += body

0 commit comments

Comments
 (0)