Remove platform-specific pragmas for covered code
MODIFY
src/urllib3/connection.py
src/urllib3/connection.py
@@ -35,7 +35,7 @@ try: # Compiled with SSL?
import ssl
BaseSSLError = ssl.SSLError
-except (ImportError, AttributeError): # Platform-specific: No SSL.
+except (ImportError, AttributeError):
ssl = None # type: ignore[assignment]
class BaseSSLError(BaseException): # type: ignore[no-redef]

MODIFY
src/urllib3/connectionpool.py
src/urllib3/connectionpool.py
@@ -481,7 +481,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
try:
assert_header_parsing(httplib_response.msg)
- except (HeaderParsingError, TypeError) as hpe: # Platform-specific: Python 3
+ except (HeaderParsingError, TypeError) as hpe:
log.warning(
"Failed to parse headers (url=%s): %s",
self._absolute_url(url),

Remove platform-specific pragmas for covered code

Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>