From 3e6609da07d978126a8f95296e50985fb3fd206b Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Mon, 23 May 2022 11:27:05 +0530 Subject: [PATCH 01/28] Merge pull request #1162 from abhinavsingh/master v2.4.2 (#1158) From 0c203f9dece36c4ca186f08b2e343876b225d130 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 10:36:47 +0530 Subject: [PATCH 02/28] pip prod(deps): bump blacksheep from 1.2.2 to 1.2.7 (#1161) Bumps [blacksheep](https://github.com/Neoteroi/BlackSheep) from 1.2.2 to 1.2.7. - [Release notes](https://github.com/Neoteroi/BlackSheep/releases) - [Changelog](https://github.com/Neoteroi/BlackSheep/blob/main/CHANGELOG.md) - [Commits](https://github.com/Neoteroi/BlackSheep/compare/v1.2.2...v1.2.7) --- updated-dependencies: - dependency-name: blacksheep dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- benchmark/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/requirements.txt b/benchmark/requirements.txt index 3da05de1a1..3a79ad29db 100644 --- a/benchmark/requirements.txt +++ b/benchmark/requirements.txt @@ -1,5 +1,5 @@ aiohttp==3.8.1 -blacksheep==1.2.2 +blacksheep==1.2.7 starlette==0.17.1 tornado==6.1 uvicorn==0.16.0 From 2a2cd00df7ac0c95ab9d2a51a101e0a342290513 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 10:37:15 +0530 Subject: [PATCH 03/28] Bump fregante/setup-git-user from 1.0.1 to 1.1.0 (#1160) Bumps [fregante/setup-git-user](https://github.com/fregante/setup-git-user) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/fregante/setup-git-user/releases) - [Commits](https://github.com/fregante/setup-git-user/compare/v1.0.1...v1.1.0) --- updated-dependencies: - dependency-name: fregante/setup-git-user dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test-library.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 2f4a94e194..fe201eb0ff 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -284,7 +284,7 @@ jobs: if: >- fromJSON(needs.pre-setup.outputs.is-untagged-devel) || fromJSON(needs.pre-setup.outputs.release-requested) - uses: fregante/setup-git-user@v1.0.1 + uses: fregante/setup-git-user@v1.1.0 - name: >- Tag the release in the local Git repo as ${{ needs.pre-setup.outputs.git-tag }} @@ -1057,7 +1057,7 @@ jobs: fetch-depth: 1 ref: ${{ github.event.inputs.release-commitish }} - name: Setup git user as [bot] - uses: fregante/setup-git-user@v1.0.1 + uses: fregante/setup-git-user@v1.1.0 - name: >- Tag the release in the local Git repo From 2260235f40afaf288aee8bcbcd49196ed7b782f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 10:37:28 +0530 Subject: [PATCH 04/28] npm: bump ts-node from 10.7.0 to 10.8.0 in /dashboard (#1159) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.7.0 to 10.8.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.7.0...v10.8.0) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dashboard/package-lock.json | 98 ++++++++++++++++++++++++------------- dashboard/package.json | 2 +- 2 files changed, 66 insertions(+), 34 deletions(-) diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index b9445ccfec..82115f23ee 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -32,7 +32,7 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-javascript-obfuscator": "^1.0.4", "rollup-plugin-typescript": "^1.0.1", - "ts-node": "^10.7.0", + "ts-node": "^10.8.0", "typescript": "^4.5.4", "ws": "^8.5.0" } @@ -63,27 +63,43 @@ "js-tokens": "^4.0.0" } }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -4789,12 +4805,12 @@ } }, "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.0.tgz", + "integrity": "sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==", "dev": true, "dependencies": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -4805,7 +4821,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { @@ -5363,19 +5379,35 @@ "js-tokens": "^4.0.0" } }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", "dev": true }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "requires": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "@nodelib/fs.scandir": { @@ -8991,12 +9023,12 @@ } }, "ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.8.0.tgz", + "integrity": "sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==", "dev": true, "requires": { - "@cspotcode/source-map-support": "0.7.0", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -9007,7 +9039,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "dependencies": { diff --git a/dashboard/package.json b/dashboard/package.json index eac02ae6ab..f3c01a2582 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -48,7 +48,7 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-javascript-obfuscator": "^1.0.4", "rollup-plugin-typescript": "^1.0.1", - "ts-node": "^10.7.0", + "ts-node": "^10.8.0", "typescript": "^4.5.4", "ws": "^8.5.0" } From c7268b7f9cb923667392aedae4616fa9c719c997 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 11:39:51 +0530 Subject: [PATCH 05/28] npm: bump ws from 8.5.0 to 8.6.0 in /dashboard (#1165) Bumps [ws](https://github.com/websockets/ws) from 8.5.0 to 8.6.0. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.5.0...8.6.0) --- updated-dependencies: - dependency-name: ws dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> --- dashboard/package-lock.json | 14 +++++++------- dashboard/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index 82115f23ee..06c866ac7f 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -34,7 +34,7 @@ "rollup-plugin-typescript": "^1.0.1", "ts-node": "^10.8.0", "typescript": "^4.5.4", - "ws": "^8.5.0" + "ws": "^8.6.0" } }, "node_modules/@babel/code-frame": { @@ -5239,9 +5239,9 @@ } }, "node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", + "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", "dev": true, "engines": { "node": ">=10.0.0" @@ -9356,9 +9356,9 @@ } }, "ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz", + "integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==", "dev": true, "requires": {} }, diff --git a/dashboard/package.json b/dashboard/package.json index f3c01a2582..d3b3c440a3 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -50,6 +50,6 @@ "rollup-plugin-typescript": "^1.0.1", "ts-node": "^10.8.0", "typescript": "^4.5.4", - "ws": "^8.5.0" + "ws": "^8.6.0" } } From 5f1b108dcaa2fd098a886c2968706d4ea4e88753 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Wed, 25 May 2022 21:33:00 +0530 Subject: [PATCH 06/28] Delete FUNDING.yml --- .github/FUNDING.yml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b814208f01..0000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -open_collective: proxypy -... From 921f57c7f39e45882bbfa888a4a4412481ca5b55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 23:35:54 +0530 Subject: [PATCH 07/28] pip prod(deps): bump pytest from 6.2.5 to 7.0.1 (#1164) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index 1ffbbcfd0b..1c6a0d61cd 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -2,7 +2,7 @@ wheel==0.37.1 python-coveralls==2.9.3 coverage==6.2 flake8==4.0.1 -pytest==6.2.5 +pytest==7.0.1 pytest-cov==3.0.0 pytest-xdist == 2.5.0 pytest-mock==3.6.1 From beddce041a139171f0c9138cd078d028b48033b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 09:09:49 +0530 Subject: [PATCH 08/28] pip prod(deps): bump rope from 0.22.0 to 1.1.1 (#1167) Bumps [rope](https://github.com/python-rope/rope) from 0.22.0 to 1.1.1. - [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.22.0...1.1.1) --- updated-dependencies: - dependency-name: rope dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index 1c6a0d61cd..4d93783438 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -14,7 +14,7 @@ codecov==2.1.12 tox==3.25.0 mccabe==0.6.1 pylint==2.13.7 -rope==0.22.0 +rope==1.1.1 # Required by test_http2.py httpx==0.22.0 h2==4.1.0 From 0e7c48ca269d15e94cbfddf080ddcd67a9582080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 12:36:14 +0530 Subject: [PATCH 09/28] pip prod(deps): bump starlette from 0.17.1 to 0.19.1 (#1168) Bumps [starlette](https://github.com/encode/starlette) from 0.17.1 to 0.19.1. - [Release notes](https://github.com/encode/starlette/releases) - [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md) - [Commits](https://github.com/encode/starlette/compare/0.17.1...0.19.1) --- updated-dependencies: - dependency-name: starlette dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- benchmark/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/requirements.txt b/benchmark/requirements.txt index 3a79ad29db..fa0ad1432f 100644 --- a/benchmark/requirements.txt +++ b/benchmark/requirements.txt @@ -1,5 +1,5 @@ aiohttp==3.8.1 blacksheep==1.2.7 -starlette==0.17.1 +starlette==0.19.1 tornado==6.1 uvicorn==0.16.0 From c93b028654954f2c81c3899c4aa970451cc895b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 14:43:35 +0530 Subject: [PATCH 10/28] pip prod(deps): bump mypy from 0.940 to 0.960 (#1170) Bumps [mypy](https://github.com/python/mypy) from 0.940 to 0.960. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.940...v0.960) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index 4d93783438..5fdec9b2b4 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -8,7 +8,7 @@ pytest-xdist == 2.5.0 pytest-mock==3.6.1 pytest-asyncio==0.16.0 autopep8==1.6.0 -mypy==0.940 +mypy==0.960 py-spy==0.3.11 codecov==2.1.12 tox==3.25.0 From 9513ab741a8b8c63bb482c1899b0dba304e54bb5 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Tue, 31 May 2022 11:39:05 +0530 Subject: [PATCH 11/28] Create FUNDING.yml --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..60439f2798 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: abhinavsingh From fa748c984a67d4bfed9b852b3f68e5d20f0dcdd2 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Thu, 9 Jun 2022 01:20:54 +0530 Subject: [PATCH 12/28] Address yaml lint --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 60439f2798..2fa2380906 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ +--- # These are supported funding model platforms github: abhinavsingh From e8177f8f468f7ba42a659cd75239a1d3a786d146 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 10:32:39 +0530 Subject: [PATCH 13/28] Bump actions/cache from 3.0.2 to 3.0.4 (#1185) Bumps [actions/cache](https://github.com/actions/cache) from 3.0.2 to 3.0.4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.2...v3.0.4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test-library.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index fe201eb0ff..6a588d5d8a 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -135,7 +135,7 @@ jobs: - name: Set up pip cache if: >- steps.request-check.outputs.release-requested != 'true' - uses: actions/cache@v3.0.2 + uses: actions/cache@v3.0.4 with: path: ${{ steps.pip-cache-dir.outputs.dir }} key: >- @@ -244,7 +244,7 @@ jobs: run: >- echo "::set-output name=dir::$(pip cache dir)" - name: Set up pip cache - uses: actions/cache@v3.0.2 + uses: actions/cache@v3.0.4 with: path: ${{ steps.pip-cache.outputs.dir }} key: >- @@ -369,7 +369,7 @@ jobs: run: >- echo "::set-output name=dir::$(pip cache dir)" - name: Set up pip cache - uses: actions/cache@v3.0.2 + uses: actions/cache@v3.0.4 with: path: ${{ steps.pip-cache.outputs.dir }} key: >- @@ -486,7 +486,7 @@ jobs: run: >- echo "::set-output name=dir::$(pip cache dir)" - name: Set up pip cache - uses: actions/cache@v3.0.2 + uses: actions/cache@v3.0.4 with: path: ${{ steps.pip-cache.outputs.dir }} key: >- From 57bf518cdd7709090eb2ba6a258b07a51d629e9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 10:34:08 +0530 Subject: [PATCH 14/28] Bump actions/setup-python from 3 to 4 (#1186) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test-library.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 6a588d5d8a..4f49831221 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -72,7 +72,7 @@ jobs: container-platforms: ${{ steps.container.outputs.platforms }} steps: - name: Switch to using Python 3.9 by default - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: 3.9 - name: >- @@ -225,7 +225,7 @@ jobs: steps: - name: Switch to using Python v3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.10' - name: >- @@ -350,7 +350,7 @@ jobs: steps: - name: Switch to using Python v3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: '3.10' - name: >- @@ -467,7 +467,7 @@ jobs: steps: - name: Switch to using Python v${{ matrix.python }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: >- @@ -670,7 +670,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Brew @@ -724,7 +724,7 @@ jobs: with: fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Install Pip Dependencies From 223d29c2513d3c93a99be3f6dfbedb12778aea2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 11:45:40 +0530 Subject: [PATCH 15/28] pip prod(deps): bump py-spy from 0.3.11 to 0.3.12 (#1174) Bumps [py-spy](https://github.com/benfred/py-spy) from 0.3.11 to 0.3.12. - [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.11...v0.3.12) --- updated-dependencies: - dependency-name: py-spy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index 5fdec9b2b4..a546332cea 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -9,7 +9,7 @@ pytest-mock==3.6.1 pytest-asyncio==0.16.0 autopep8==1.6.0 mypy==0.960 -py-spy==0.3.11 +py-spy==0.3.12 codecov==2.1.12 tox==3.25.0 mccabe==0.6.1 From c3b966e4ec3cf70f6bba03f801a096bf40633368 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jun 2022 10:42:24 +0530 Subject: [PATCH 16/28] pip prod(deps): bump mypy from 0.960 to 0.961 (#1187) Bumps [mypy](https://github.com/python/mypy) from 0.960 to 0.961. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.960...v0.961) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index a546332cea..200567b70c 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -8,7 +8,7 @@ pytest-xdist == 2.5.0 pytest-mock==3.6.1 pytest-asyncio==0.16.0 autopep8==1.6.0 -mypy==0.960 +mypy==0.961 py-spy==0.3.12 codecov==2.1.12 tox==3.25.0 From 7195b07b24ce20d22c9781eab0611da739746689 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Sat, 11 Jun 2022 22:44:27 +0530 Subject: [PATCH 17/28] Add support for dynamic reverse proxy routing (#1180) * Add support for dynamic reverse proxy routing. Plugins must implement the `handle_route(self, request, pattern) -> Url` method from the base class to provide a choice of upstream url to serve. This work is backward compatible a.k.a. Old style static route patterns with hardcoded upstream urls will continue to work as-is. See `ReverseProxyBasePlugin` documentation for more details. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Address type issues * Fix spellcheck * Attempt to solve type errors * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Py3.8 also doesnt allow subscriptable pattern type * Remove debug print Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- README.md | 16 +++++----- docs/conf.py | 1 + proxy/common/types.py | 9 ++++++ proxy/http/server/plugin.py | 38 ++++++++++++++++++++-- proxy/http/server/reverse.py | 53 +++++++++++++++---------------- proxy/plugin/__init__.py | 1 + proxy/plugin/reverse_proxy.py | 60 +++++++++++++++++++++++++---------- 7 files changed, 122 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 273a6bcece..a0a2f9b49b 100644 --- a/README.md +++ b/README.md @@ -2315,9 +2315,9 @@ usage: -m [-h] [--tunnel-hostname TUNNEL_HOSTNAME] [--tunnel-port TUNNEL_PORT] [--filtered-client-ips FILTERED_CLIENT_IPS] [--filtered-url-regex-config FILTERED_URL_REGEX_CONFIG] -proxy.py v2.4.2.dev11+g0beb02d.d20220420 +proxy.py v2.4.3.dev14+gc6b2de6.d20220605 -options: +optional arguments: -h, --help show this help message and exit --tunnel-hostname TUNNEL_HOSTNAME Default: None. Remote hostname or IP address to which @@ -2334,11 +2334,11 @@ options: --tunnel-remote-port TUNNEL_REMOTE_PORT Default: 8899. Remote port which will be forwarded locally for proxy. - --threadless Default: True. Enabled by default on Python 3.8+ (mac, - linux). When disabled a new thread is spawned to + --threadless Default: False. Enabled by default on Python 3.8+ + (mac, linux). When disabled a new thread is spawned to handle each client connection. - --threaded Default: False. Disabled by default on Python < 3.8 - and windows. When enabled a new thread is spawned to + --threaded Default: True. Disabled by default on Python < 3.8 and + windows. When enabled a new thread is spawned to handle each client connection. --num-workers NUM_WORKERS Defaults to number of CPU cores. @@ -2434,8 +2434,8 @@ options: Default: None. Signing certificate to use for signing dynamically generated HTTPS certificates. If used, must also pass --ca-key-file and --ca-signing-key-file - --ca-file CA_FILE Default: /Users/abhinavsingh/Dev/proxy.py/venv310/lib/ - python3.10/site-packages/certifi/cacert.pem. Provide + --ca-file CA_FILE Default: /Users/abhinavsingh/Dev/proxy.py/venv373/lib/ + python3.7/site-packages/certifi/cacert.pem. Provide path to custom CA bundle for peer certificate verification --ca-signing-key-file CA_SIGNING_KEY_FILE diff --git a/docs/conf.py b/docs/conf.py index 20d20df6c9..40573d5edc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -320,6 +320,7 @@ (_py_class_role, 'T'), (_py_class_role, 'HostPort'), (_py_class_role, 'TcpOrTlsSocket'), + (_py_class_role, 're.Pattern'), (_py_obj_role, 'proxy.core.work.threadless.T'), (_py_obj_role, 'proxy.core.work.work.T'), (_py_obj_role, 'proxy.core.base.tcp_server.T'), diff --git a/proxy/common/types.py b/proxy/common/types.py index 603dd9524d..984cc3bdd3 100644 --- a/proxy/common/types.py +++ b/proxy/common/types.py @@ -8,7 +8,9 @@ :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE for more details. """ +import re import ssl +import sys import queue import socket import ipaddress @@ -30,3 +32,10 @@ IpAddress = Union[ipaddress.IPv4Address, ipaddress.IPv6Address] TcpOrTlsSocket = Union[ssl.SSLSocket, socket.socket] HostPort = Tuple[str, int] + +if sys.version_info.minor == 6: + RePattern = Any +elif sys.version_info.minor in (7, 8): + RePattern = re.Pattern # type: ignore +else: + RePattern = re.Pattern[Any] # type: ignore diff --git a/proxy/http/server/plugin.py b/proxy/http/server/plugin.py index 0115558c18..4e290178f4 100644 --- a/proxy/http/server/plugin.py +++ b/proxy/http/server/plugin.py @@ -11,14 +11,16 @@ import argparse import mimetypes from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Optional +from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union, Optional +from proxy.http.url import Url from ..parser import HttpParser from ..responses import NOT_FOUND_RESPONSE_PKT, okResponse from ..websocket import WebsocketFrame from ..connection import HttpClientConnection from ...core.event import EventQueue from ..descriptors import DescriptorsHandlerMixin +from ...common.types import RePattern from ...common.utils import bytes_ @@ -127,6 +129,36 @@ class ReverseProxyBasePlugin(ABC): """ReverseProxy base plugin class.""" @abstractmethod - def routes(self) -> List[Tuple[str, List[bytes]]]: - """Return List(path, List(upstream)) reverse proxy config.""" + def routes(self) -> List[Union[str, Tuple[str, List[bytes]]]]: + """List of routes registered by plugin. + + There are 2 types of routes: + + 1) Dynamic routes (str): Should be a regular expression + 2) Static routes (tuple): Contain 2 elements, a route regular expression + and list of upstream urls to serve when the route matches. + + Static routes doesn't require you to implement the `handle_route` method. + Reverse proxy core will automatically pick one of the configured upstream URL + and serve it out-of-box. + + Dynamic routes are helpful when you want to dynamically match and serve upstream urls. + To handle dynamic routes, you must implement the `handle_route` method, which + must return the url to serve.""" raise NotImplementedError() # pragma: no cover + + def handle_route(self, request: HttpParser, pattern: RePattern) -> Url: + """Implement this method if you have configured dynamic routes.""" + pass + + def regexes(self) -> List[str]: + """Helper method to return list of route regular expressions.""" + routes = [] + for route in self.routes(): + if isinstance(route, str): + routes.append(route) + elif isinstance(route, tuple): + routes.append(route[0]) + else: + raise ValueError('Invalid route type') + return routes diff --git a/proxy/http/server/reverse.py b/proxy/http/server/reverse.py index 45afe1f91f..63bd3d6537 100644 --- a/proxy/http/server/reverse.py +++ b/proxy/http/server/reverse.py @@ -38,37 +38,39 @@ class ReverseProxy(TcpUpstreamConnectionHandler, HttpWebServerBasePlugin): def __init__(self, *args: Any, **kwargs: Any): super().__init__(*args, **kwargs) self.choice: Optional[Url] = None - self.reverse: Dict[str, List[bytes]] = {} + self.plugins: List['ReverseProxyBasePlugin'] = [] + for klass in self.flags.plugins[b'ReverseProxyBasePlugin']: + plugin: 'ReverseProxyBasePlugin' = klass() + self.plugins.append(plugin) def handle_upstream_data(self, raw: memoryview) -> None: self.client.queue(raw) def routes(self) -> List[Tuple[int, str]]: - reverse: List[Tuple[str, List[bytes]]] = [] - for klass in self.flags.plugins[b'ReverseProxyBasePlugin']: - instance: 'ReverseProxyBasePlugin' = klass() - reverse.extend(instance.routes()) r = [] - for (route, upstreams) in reverse: - r.append((httpProtocolTypes.HTTP, route)) - r.append((httpProtocolTypes.HTTPS, route)) - self.reverse[route] = upstreams + for plugin in self.plugins: + for route in plugin.regexes(): + r.append((httpProtocolTypes.HTTP, route)) + r.append((httpProtocolTypes.HTTPS, route)) return r def handle_request(self, request: HttpParser) -> None: - # TODO: Core must be capable of dispatching a context - # with each invocation of handle request callback. - # - # Example, here we don't know which of our registered - # route actually matched. - # - for route in self.reverse: - pattern = re.compile(route) - if pattern.match(text_(request.path)): - self.choice = Url.from_bytes( - random.choice(self.reverse[route]), - ) - break + for plugin in self.plugins: + for route in plugin.routes(): + if isinstance(route, tuple): + pattern = re.compile(route[0]) + if pattern.match(text_(request.path)): + self.choice = Url.from_bytes( + random.choice(route[1]), + ) + break + elif isinstance(route, str): + pattern = re.compile(route) + if pattern.match(text_(request.path)): + self.choice = plugin.handle_route(request, pattern) + break + else: + raise ValueError('Invalid route') assert self.choice and self.choice.hostname port = self.choice.port or \ DEFAULT_HTTP_PORT \ @@ -85,12 +87,7 @@ def handle_request(self, request: HttpParser) -> None: ), as_non_blocking=True, ) - # Update Host header - # if request.has_header(b'Host'): - # request.del_header(b'Host') - # request.add_header( - # b'Host', ('%s:%d' % self.upstream.addr).encode('utf-8'), - # ) + request.path = self.choice.remainder self.upstream.queue(memoryview(request.build())) except ConnectionRefusedError: raise HttpProtocolException( # pragma: no cover diff --git a/proxy/plugin/__init__.py b/proxy/plugin/__init__.py index 0d89ba86e7..c3ad91945b 100644 --- a/proxy/plugin/__init__.py +++ b/proxy/plugin/__init__.py @@ -15,6 +15,7 @@ onmessage httpbin localhost + Lua """ from .cache import CacheResponsesPlugin, BaseCacheResponsesPlugin from .shortlink import ShortLinkPlugin diff --git a/proxy/plugin/reverse_proxy.py b/proxy/plugin/reverse_proxy.py index 01eca2b09d..5d2530eda1 100644 --- a/proxy/plugin/reverse_proxy.py +++ b/proxy/plugin/reverse_proxy.py @@ -7,23 +7,19 @@ :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE for more details. -""" -from typing import List, Tuple -from ..http.server import ReverseProxyBasePlugin + .. spelling:: + Lua +""" +import re +from typing import List, Tuple, Union -# TODO: We must use nginx python parser and -# make this plugin nginx.conf complaint. -REVERSE_PROXY_LOCATION: str = r'/get$' -# Randomly choose either http or https upstream endpoint. -# -# This is just to demonstrate that both http and https upstream -# reverse proxy works. -REVERSE_PROXY_PASS = [ - b'http://httpbin.org/get', - b'https://httpbin.org/get', -] +from ..http import Url +from ..http.parser import HttpParser +from ..http.server import ReverseProxyBasePlugin +from ..common.types import RePattern +from ..http.exception.base import HttpProtocolException class ReverseProxyPlugin(ReverseProxyBasePlugin): @@ -35,8 +31,38 @@ class ReverseProxyPlugin(ReverseProxyBasePlugin): } ``` - Update the routes config before. + Plugin also demonstrates how to write "Python" equivalent for any + "Nginx Lua" based configuration i.e. your plugin code will have + full control over what do after one of your route has matched. """ - def routes(self) -> List[Tuple[str, List[bytes]]]: - return [(REVERSE_PROXY_LOCATION, REVERSE_PROXY_PASS)] + def routes(self) -> List[Union[str, Tuple[str, List[bytes]]]]: + return [ + # A static route + ( + r'/get$', + [b'http://httpbin.org/get', b'https://httpbin.org/get'], + ), + # A dynamic route to catch requests on "/get/"" + # See "handle_route" method below for what we do when + # this pattern matches. + r'/get/(\d+)$', + ] + + def handle_route(self, request: HttpParser, pattern: RePattern) -> Url: + """For our example dynamic route, we want to simply convert + any incoming request to "/get/1" into "/get?id=1" when serving from upstream. + """ + choice: Url = Url.from_bytes(b'http://httpbin.org/get') + assert request.path + result = re.search(pattern, request.path.decode()) + if not result or len(result.groups()) != 1: + raise HttpProtocolException('Invalid request') + assert choice.remainder == b'/get' + # NOTE: Internally, reverse proxy core replaces + # original request.path with the choice.remainder value. + # e.g. for this example, request.path will be "/get/1". + # Core will automatically replace that with "/get?id=1" + # before dispatching request to choice of upstream server. + choice.remainder += f'?id={result.groups()[0]}'.encode() + return choice From e65c450cea296f9bf65c9e545a916e79f08ab325 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:44:50 +0530 Subject: [PATCH 18/28] pip prod(deps): bump types-paramiko from 2.8.9 to 2.10.0 (#1192) Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.9 to 2.10.0. - [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-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-tunnel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-tunnel.txt b/requirements-tunnel.txt index 9682185834..1aae4fdc3d 100644 --- a/requirements-tunnel.txt +++ b/requirements-tunnel.txt @@ -1,3 +1,3 @@ paramiko==2.11.0 -types-paramiko==2.8.9 +types-paramiko==2.10.0 cryptography==36.0.2; python_version <= '3.6' From 5ab4adadd83774d3af0c1d44d41d8f2f58ce772f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:45:08 +0530 Subject: [PATCH 19/28] npm: bump jasmine from 4.1.0 to 4.2.0 in /dashboard (#1191) Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/jasmine/jasmine-npm/releases) - [Commits](https://github.com/jasmine/jasmine-npm/compare/v4.1.0...v4.2.0) --- updated-dependencies: - dependency-name: jasmine dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dashboard/package-lock.json | 30 +++++++++++++++--------------- dashboard/package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index 06c866ac7f..fc889f63d3 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -22,7 +22,7 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^5.0.0", "http-server": "^14.1.0", - "jasmine": "^4.1.0", + "jasmine": "^4.2.0", "jasmine-ts": "^0.4.0", "jquery": "^3.6.0", "js-cookie": "^3.0.1", @@ -2967,22 +2967,22 @@ "dev": true }, "node_modules/jasmine": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.1.0.tgz", - "integrity": "sha512-4VhjbUgwfNS9CBnUMoSWr9tdNgOoOhNIjAD8YRxTn+PmOf4qTSC0Uqhk66dWGnz2vJxtNIU0uBjiwnsp4Ud9VA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.0.tgz", + "integrity": "sha512-6SQRXHs5O++mp52PkoJoi9zuLYqp1IaqepRNmAQn5rUBo9VUnckpkkXQQD5PAuCCVVB1ULDImvWYCPV/ZVnaGQ==", "dev": true, "dependencies": { "glob": "^7.1.6", - "jasmine-core": "^4.1.0" + "jasmine-core": "^4.2.0" }, "bin": { "jasmine": "bin/jasmine.js" } }, "node_modules/jasmine-core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.1.1.tgz", - "integrity": "sha512-lmUfT5XcK9KKvt3lLYzn93hc4MGzlUBowExFVgzbSW0ZCrdeyS574dfsyfRhxbg81Wj4gk+RxUiTnj7KBfDA1g==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", + "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", "dev": true }, "node_modules/jasmine-ts": { @@ -7614,19 +7614,19 @@ "dev": true }, "jasmine": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.1.0.tgz", - "integrity": "sha512-4VhjbUgwfNS9CBnUMoSWr9tdNgOoOhNIjAD8YRxTn+PmOf4qTSC0Uqhk66dWGnz2vJxtNIU0uBjiwnsp4Ud9VA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.0.tgz", + "integrity": "sha512-6SQRXHs5O++mp52PkoJoi9zuLYqp1IaqepRNmAQn5rUBo9VUnckpkkXQQD5PAuCCVVB1ULDImvWYCPV/ZVnaGQ==", "dev": true, "requires": { "glob": "^7.1.6", - "jasmine-core": "^4.1.0" + "jasmine-core": "^4.2.0" } }, "jasmine-core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.1.1.tgz", - "integrity": "sha512-lmUfT5XcK9KKvt3lLYzn93hc4MGzlUBowExFVgzbSW0ZCrdeyS574dfsyfRhxbg81Wj4gk+RxUiTnj7KBfDA1g==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", + "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", "dev": true }, "jasmine-ts": { diff --git a/dashboard/package.json b/dashboard/package.json index d3b3c440a3..6a8a61a7bd 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -38,7 +38,7 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^5.0.0", "http-server": "^14.1.0", - "jasmine": "^4.1.0", + "jasmine": "^4.2.0", "jasmine-ts": "^0.4.0", "jquery": "^3.6.0", "js-cookie": "^3.0.1", From 315cd17fbd9ed8dda4d4f2eaa15db221852f2b8f Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:48:20 +0530 Subject: [PATCH 20/28] Add `timeout=1` when joining acceptors (#1196) * Add a context manager test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * `IS_WINDOWS` must also be True for cygwin environments. Addresses #1169 * Give an acceptor join timeout of 10 seconds instead of None * Reduce timeout to just 1 sec * Install necessary types (requests is translative dep) * Remove conflicting types * Give precommit the necessary type Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 1 + proxy/common/constants.py | 2 +- proxy/core/acceptor/pool.py | 2 +- requirements-testing.txt | 2 ++ tests/test_main.py | 24 +++++++++++++++++++++++- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d62799511..9c5050d667 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -158,6 +158,7 @@ repos: additional_dependencies: - paramiko == 2.11.0 - types-paramiko == 2.7.3 + - types-requests==2.27.30 - cryptography==36.0.2; python_version <= '3.6' - types-setuptools == 57.4.2 args: diff --git a/proxy/common/constants.py b/proxy/common/constants.py index a8b154fa53..bd0a40e785 100644 --- a/proxy/common/constants.py +++ b/proxy/common/constants.py @@ -22,7 +22,7 @@ SYS_PLATFORM = platform.system() -IS_WINDOWS = SYS_PLATFORM == 'Windows' +IS_WINDOWS = SYS_PLATFORM.lower() in ('windows', 'cygwin') def _env_threadless_compliant() -> bool: diff --git a/proxy/core/acceptor/pool.py b/proxy/core/acceptor/pool.py index 09fb9f447f..802a4fe17a 100644 --- a/proxy/core/acceptor/pool.py +++ b/proxy/core/acceptor/pool.py @@ -126,7 +126,7 @@ def shutdown(self) -> None: for acceptor in self.acceptors: acceptor.running.set() for acceptor in self.acceptors: - acceptor.join() + acceptor.join(timeout=1) logger.debug('Acceptors shutdown') def _start(self) -> None: diff --git a/requirements-testing.txt b/requirements-testing.txt index 200567b70c..eb839d11c5 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -21,4 +21,6 @@ h2==4.1.0 hpack==4.0.0 hyperframe==6.0.1 pre-commit==2.16.0 +# Types +types-requests==2.27.30 types-setuptools==57.4.10 diff --git a/tests/test_main.py b/tests/test_main.py index 1d4c11538f..39bc77abe9 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -14,7 +14,9 @@ import unittest from unittest import mock -from proxy.proxy import main, entry_point +import requests + +from proxy.proxy import Proxy, main, entry_point from proxy.common.utils import bytes_ from proxy.core.work.fd import RemoteFdExecutor from proxy.common.constants import ( # noqa: WPS450 @@ -368,3 +370,23 @@ def test_enable_ssh_tunnel( mock_ssh_tunnel_listener.return_value.shutdown.assert_called_once() # shutdown will internally call stop port forward mock_ssh_tunnel_listener.return_value.stop_port_forward.assert_not_called() + + +class TestProxyContextManager(unittest.TestCase): + + def test_proxy_context_manager(self) -> None: + with Proxy(port=8888): + response = requests.get( + 'http://httpbin.org/get', proxies={ + 'http': 'http://127.0.0.1:8888', + 'https': 'http://127.0.0.1:8888', + }, + ) + self.assertEqual(response.status_code, 200) + response = requests.get( + 'https://httpbin.org/get', proxies={ + 'http': 'http://127.0.0.1:8888', + 'https': 'http://127.0.0.1:8888', + }, + ) + self.assertEqual(response.status_code, 200) From bb8f8bee2fa14ee63b8488f5a1d3b1d9aea4d5ab Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Thu, 16 Jun 2022 02:42:21 +0530 Subject: [PATCH 21/28] Use only a single acceptor in tests to avoid Windows pitfalls (#1199) * Use only a single acceptor in tests to avoid Windows pitfalls * Revert `timeout=1`, likely single acceptor on Windows during tests on GHA is the escape route --- proxy/core/acceptor/pool.py | 2 +- tests/test_main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/core/acceptor/pool.py b/proxy/core/acceptor/pool.py index 802a4fe17a..09fb9f447f 100644 --- a/proxy/core/acceptor/pool.py +++ b/proxy/core/acceptor/pool.py @@ -126,7 +126,7 @@ def shutdown(self) -> None: for acceptor in self.acceptors: acceptor.running.set() for acceptor in self.acceptors: - acceptor.join(timeout=1) + acceptor.join() logger.debug('Acceptors shutdown') def _start(self) -> None: diff --git a/tests/test_main.py b/tests/test_main.py index 39bc77abe9..ad35f1d933 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -375,7 +375,7 @@ def test_enable_ssh_tunnel( class TestProxyContextManager(unittest.TestCase): def test_proxy_context_manager(self) -> None: - with Proxy(port=8888): + with Proxy(port=8888, num_acceptors=1): response = requests.get( 'http://httpbin.org/get', proxies={ 'http': 'http://127.0.0.1:8888', From a07ab1fe3b065344d59366582e68ed1966a05e03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:39:23 +0530 Subject: [PATCH 22/28] npm: bump typescript from 4.5.4 to 4.7.3 in /dashboard (#1200) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.4 to 4.7.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.4...v4.7.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dashboard/package-lock.json | 14 +++++++------- dashboard/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index fc889f63d3..592cd18384 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -33,7 +33,7 @@ "rollup-plugin-javascript-obfuscator": "^1.0.4", "rollup-plugin-typescript": "^1.0.1", "ts-node": "^10.8.0", - "typescript": "^4.5.4", + "typescript": "^4.7.3", "ws": "^8.6.0" } }, @@ -4941,9 +4941,9 @@ } }, "node_modules/typescript": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", - "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", + "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9115,9 +9115,9 @@ "dev": true }, "typescript": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", - "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", + "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", "dev": true }, "unbox-primitive": { diff --git a/dashboard/package.json b/dashboard/package.json index 6a8a61a7bd..1b07f87776 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -49,7 +49,7 @@ "rollup-plugin-javascript-obfuscator": "^1.0.4", "rollup-plugin-typescript": "^1.0.1", "ts-node": "^10.8.0", - "typescript": "^4.5.4", + "typescript": "^4.7.3", "ws": "^8.6.0" } } From ba6f5c3a0a3a7e7775456cc0355b9ca2ca7abb27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:40:25 +0530 Subject: [PATCH 23/28] pip prod(deps): bump types-setuptools from 57.4.10 to 57.4.17 (#1198) Bumps [types-setuptools](https://github.com/python/typeshed) from 57.4.10 to 57.4.17. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index eb839d11c5..ecab6bdf09 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -23,4 +23,4 @@ hyperframe==6.0.1 pre-commit==2.16.0 # Types types-requests==2.27.30 -types-setuptools==57.4.10 +types-setuptools==57.4.17 From 12ba7bfc14e0f3a5ac81768e1d598e1328572e19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:52:15 +0530 Subject: [PATCH 24/28] pip prod(deps): bump twine from 3.7.1 to 3.8.0 (#1201) Bumps [twine](https://github.com/pypa/twine) from 3.7.1 to 3.8.0. - [Release notes](https://github.com/pypa/twine/releases) - [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst) - [Commits](https://github.com/pypa/twine/compare/3.7.1...3.8.0) --- updated-dependencies: - dependency-name: twine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-release.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-release.txt b/requirements-release.txt index 0abc33fb64..6e7b54213a 100644 --- a/requirements-release.txt +++ b/requirements-release.txt @@ -1,2 +1,2 @@ setuptools-scm == 6.3.2 -twine==3.7.1 +twine==3.8.0 From 6f4da8afc9763ab59a59c727e91ddc1179027a30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 12:05:36 +0530 Subject: [PATCH 25/28] pip prod(deps): bump types-paramiko from 2.10.0 to 2.11.0 (#1203) Bumps [types-paramiko](https://github.com/python/typeshed) from 2.10.0 to 2.11.0. - [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-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-tunnel.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-tunnel.txt b/requirements-tunnel.txt index 1aae4fdc3d..8aed76e459 100644 --- a/requirements-tunnel.txt +++ b/requirements-tunnel.txt @@ -1,3 +1,3 @@ paramiko==2.11.0 -types-paramiko==2.10.0 +types-paramiko==2.11.0 cryptography==36.0.2; python_version <= '3.6' From 2e535360ce5ed9734f2c00dc6aefe5ebd281cea5 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Tue, 28 Jun 2022 01:34:22 +0530 Subject: [PATCH 26/28] Avoid installing `!=7.0.0,!=7.0.1,!=7.0.2` which leads to 0.0 as wheel version (#1209) --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7f9f7173cc..4f368f7bda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,8 @@ requires = [ "setuptools", # Plugins - "setuptools-scm[toml] >= 6", - "setuptools-scm-git-archive >= 1.1", + "setuptools-scm[toml]>=6,!=7.0.0,!=7.0.1,!=7.0.2", + "setuptools-scm-git-archive>=1.1", ] build-backend = "setuptools.build_meta" From 74d6dca8a17998292f11d56412fa719fbbf9d6f6 Mon Sep 17 00:00:00 2001 From: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> Date: Tue, 28 Jun 2022 01:56:11 +0530 Subject: [PATCH 27/28] Silence brew during workflows (#1210) --- .github/workflows/test-library.yml | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 4f49831221..9ae0a88a43 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -658,27 +658,27 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 - brew: - runs-on: ${{ matrix.os }}-latest - name: 🍺 🐍${{ matrix.python }} @ ${{ matrix.os }} - strategy: - matrix: - os: [macOS] - python: ['3.10'] - # max-parallel: 1 - fail-fast: false - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Brew - run: | - brew install ./helper/homebrew/develop/proxy.rb - - name: Verify - run: | - proxy -h + # brew: + # runs-on: ${{ matrix.os }}-latest + # name: 🍺 🐍${{ matrix.python }} @ ${{ matrix.os }} + # strategy: + # matrix: + # os: [macOS] + # python: ['3.10'] + # # max-parallel: 1 + # fail-fast: false + # steps: + # - uses: actions/checkout@v3 + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python }} + # - name: Brew + # run: | + # brew install ./helper/homebrew/develop/proxy.rb + # - name: Verify + # run: | + # proxy -h dashboard: runs-on: ${{ matrix.os }}-latest @@ -969,7 +969,7 @@ jobs: - test - lint - dashboard - - brew + # - brew - developer - ghcr-latest - ghcr-openssl From 25939d336431c1e8e0d7fbaf0e63b5b33a8e121b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 11:06:45 +0530 Subject: [PATCH 28/28] pip prod(deps): bump types-requests from 2.27.30 to 2.28.0 (#1208) Bumps [types-requests](https://github.com/python/typeshed) from 2.27.30 to 2.28.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com> --- requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-testing.txt b/requirements-testing.txt index ecab6bdf09..e0ac58ce85 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -22,5 +22,5 @@ hpack==4.0.0 hyperframe==6.0.1 pre-commit==2.16.0 # Types -types-requests==2.27.30 +types-requests==2.28.0 types-setuptools==57.4.17