summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Michael Larson <sethmichaellarson@gmail.com>2020-04-19 12:18:37 -0500
committerGitHub <noreply@github.com>2020-04-19 21:18:37 +0400
commitbf153951df7f083ac126fc22cca4c65a208c7e86 (patch)
tree2d41cd5cb42afdc4f5dec581f00fb255681977ee
parent8fadde1f8a2add75b1de135a9374b5fa24a7c0d9 (diff)
downloadurllib3-bf153951df7f083ac126fc22cca4c65a208c7e86.tar.gz
Add CODEOWNERS restricting access to files related to deployment (#1857)
-rw-r--r--.github/CODEOWNERS8
-rwxr-xr-xsetup.py3
-rw-r--r--src/urllib3/__init__.py3
-rw-r--r--src/urllib3/_version.py2
4 files changed, 14 insertions, 2 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..9a14747c
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,8 @@
+# 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
diff --git a/setup.py b/setup.py
index c1aeea07..8a96b994 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
#!/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)
)
diff --git a/src/urllib3/__init__.py b/src/urllib3/__init__.py
index 9bd8323f..09024d47 100644
--- a/src/urllib3/__init__.py
+++ b/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",
diff --git a/src/urllib3/_version.py b/src/urllib3/_version.py
new file mode 100644
index 00000000..3693acdb
--- /dev/null
+++ b/src/urllib3/_version.py
@@ -0,0 +1,2 @@
+# This file is protected via CODEOWNERS
+__version__ = "1.25.9"