Add CODEOWNERS restricting access to files related to deployment
ADD
.github/CODEOWNERS
+# Restrict all files related to deploying to
+# require lead maintainer approval.
+
+.github/CODEOWNERS @sethmlarson @shazow
+src/urllib3/_version.py @sethmlarson @shazow
+setup.py @sethmlarson @shazow
+_travis/ @sethmlarson @shazow
+.travis.yml @sethmlarson @shazow

MODIFY
setup.py
setup.py
#!/usr/bin/env python
+# This file is protected via CODEOWNERS
from setuptools import setup
@@ -9,7 +10,7 @@ import codecs
base_path = os.path.dirname(__file__)
# Get the version (borrowed from SQLAlchemy)
-with open(os.path.join(base_path, "src", "urllib3", "__init__.py")) as fp:
+with open(os.path.join(base_path, "src", "urllib3", "_version.py")) as fp:
VERSION = (
re.compile(r""".*__version__ = ["'](.*?)['"]""", re.S).match(fp.read()).group(1)
)

MODIFY
src/urllib3/__init__.py
src/urllib3/__init__.py
@@ -14,6 +14,7 @@ from .util.request import make_headers
from .util.url import get_host
from .util.timeout import Timeout
from .util.retry import Retry
+from ._version import __version__
# Set default logging handler to avoid "No handler found" warnings.
@@ -22,7 +23,7 @@ from logging import NullHandler
__author__ = "Andrey Petrov (andrey.petrov@shazow.net)"
__license__ = "MIT"
-__version__ = "1.25.8"
+__version__ = __version__
__all__ = (
"HTTPConnectionPool",

ADD
src/urllib3/_version.py
+# This file is protected via CODEOWNERS
+__version__ = "1.25.9"

Add CODEOWNERS restricting access to files related to deployment (#1857)