forked from urllib3/urllib3
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.3.900 (2023-11-18) ==================== - Disabled unsafe renegotiation option with TLS by default where applicable. - Added fallback package ``urllib3_future`` in addition to ``urllib3``. This became increasingly needed as a significant number of projects require ``urllib3`` and accidentally override this fork.
- Loading branch information
Showing
9 changed files
with
131 additions
and
15 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Restrict all files related to deploying to | ||
# require lead maintainer approval. | ||
|
||
.github/workflows/ @sethmlarson @pquentin @shazow | ||
.github/CODEOWNERS @sethmlarson @pquentin @shazow | ||
src/urllib3/_version.py @sethmlarson @pquentin @shazow | ||
pyproject.toml @sethmlarson @pquentin @shazow | ||
ci/ @sethmlarson @pquentin @shazow | ||
.github/workflows/ @Ousret | ||
.github/CODEOWNERS @Ousret | ||
src/urllib3/_version.py @Ousret | ||
pyproject.toml @Ousret | ||
ci/ @Ousret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import annotations | ||
|
||
from os import environ, path | ||
from shutil import copytree, rmtree | ||
from typing import Any | ||
|
||
from hatchling.builders.hooks.plugin.interface import BuildHookInterface | ||
|
||
SHOULD_PREVENT_FORK_OVERRIDE = environ.get("URLLIB3_NO_OVERRIDE", None) == "true" | ||
|
||
|
||
class CustomBuildHook(BuildHookInterface): | ||
def initialize(self, version: str, build_data: dict[str, Any]) -> None: | ||
#: Clean-up in case of previously missed proper exit | ||
if path.exists("./src/urllib3_future"): | ||
rmtree("./src/urllib3_future") | ||
|
||
#: Copying the main package and duplicate it. Provide an escape hatch. | ||
copytree("./src/urllib3", "./src/urllib3_future") | ||
|
||
#: Aimed at OS package manager, so that they don't override accidentally urllib3. | ||
if SHOULD_PREVENT_FORK_OVERRIDE and path.exists("./src/urllib3"): | ||
rmtree("./src/urllib3") | ||
|
||
def finalize( | ||
self, version: str, build_data: dict[str, Any], artifact_path: str | ||
) -> None: | ||
#: We shall restore the original package before exiting | ||
if SHOULD_PREVENT_FORK_OVERRIDE and not path.exists("./src/urllib3"): | ||
copytree("./src/urllib3_future", "./src/urllib3") | ||
|
||
#: Removing the temporary duplicate | ||
if path.exists("./src/urllib3_future"): | ||
rmtree("./src/urllib3_future") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This file is protected via CODEOWNERS | ||
from __future__ import annotations | ||
|
||
__version__ = "2.2.907" | ||
__version__ = "2.3.900" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters