summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJess Shapiro <jess@x86.wtf>2021-03-02 13:53:20 -0800
committerJess Shapiro <jess@x86.wtf>2021-03-02 13:53:20 -0800
commitc8ed70e9463de8969fb61232f27e6e0147ec7dec (patch)
treed564680e4d911fa9dcf45edebc78489021fd5a31
parent8c7d86d674fe62997c4c978891ffae97af262fd1 (diff)
downloadurllib3-haikuginger/inline-typing-collections-exceptions.tar.gz
Move RLock mock to be explicitly privatehaikuginger/inline-typing-collections-exceptions
-rw-r--r--src/urllib3/_collections.py4
-rw-r--r--src/urllib3/_private_compat/__init__.py0
-rw-r--r--src/urllib3/_private_compat/rlock.py (renamed from src/urllib3/compat/rlock.py)0
3 files changed, 2 insertions, 2 deletions
diff --git a/src/urllib3/_collections.py b/src/urllib3/_collections.py
index 42b9b5ca..69ae5312 100644
--- a/src/urllib3/_collections.py
+++ b/src/urllib3/_collections.py
@@ -39,7 +39,7 @@ else:
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
- from urllib3.compat.rlock import RLock
+ from urllib3._private_compat.rlock import RLock
# Starting in Python 3.7 the 'dict' class is guaranteed to be
@@ -214,7 +214,7 @@ class HTTPHeaderDictItemView(Set[Tuple[str, str]]):
_headers: "HTTPHeaderDict"
def __init__(self, headers: "HTTPHeaderDict") -> None:
- self.headers = headers
+ self._headers = headers
def __len__(self) -> int:
return len(list(self._headers.iteritems()))
diff --git a/src/urllib3/_private_compat/__init__.py b/src/urllib3/_private_compat/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/urllib3/_private_compat/__init__.py
diff --git a/src/urllib3/compat/rlock.py b/src/urllib3/_private_compat/rlock.py
index 4ed4d22a..4ed4d22a 100644
--- a/src/urllib3/compat/rlock.py
+++ b/src/urllib3/_private_compat/rlock.py