mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:31:51 +02:00
Fix collections.abc imports for Python 3.9 (#7707)
* Fix collections.abc imports for Python 3.9 * Update AUTHORS.md * No longer ignore collections.abc deprecation warning * Update changelog * Remove outdated comment * Disabling no-name-in-module not needed as linting is on Python 3
This commit is contained in:
committed by
Adrien Ferrand
parent
5f315b46e9
commit
2f24726d4c
@@ -100,6 +100,7 @@ Authors
|
|||||||
* [Harlan Lieberman-Berg](https://github.com/hlieberman)
|
* [Harlan Lieberman-Berg](https://github.com/hlieberman)
|
||||||
* [Henri Salo](https://github.com/fgeek)
|
* [Henri Salo](https://github.com/fgeek)
|
||||||
* [Henry Chen](https://github.com/henrychen95)
|
* [Henry Chen](https://github.com/henrychen95)
|
||||||
|
* [Hugo van Kemenade](https://github.com/hugovk)
|
||||||
* [Ingolf Becker](https://github.com/watercrossing)
|
* [Ingolf Becker](https://github.com/watercrossing)
|
||||||
* [Jaap Eldering](https://github.com/eldering)
|
* [Jaap Eldering](https://github.com/eldering)
|
||||||
* [Jacob Hoffman-Andrews](https://github.com/jsha)
|
* [Jacob Hoffman-Andrews](https://github.com/jsha)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
*
|
* Fix collections.abc imports for Python 3.9.
|
||||||
|
|
||||||
More details about these changes can be found on our GitHub repo.
|
More details about these changes can be found on our GitHub repo.
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ from certbot import errors
|
|||||||
from certbot import interfaces
|
from certbot import interfaces
|
||||||
from certbot._internal import constants
|
from certbot._internal import constants
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Python 3.3+
|
||||||
|
from collections.abc import Mapping
|
||||||
|
except ImportError: # pragma: no cover
|
||||||
|
from collections import Mapping
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -178,7 +184,7 @@ class PluginEntryPoint(object):
|
|||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
class PluginsRegistry(collections.Mapping):
|
class PluginsRegistry(Mapping):
|
||||||
"""Plugins registry."""
|
"""Plugins registry."""
|
||||||
|
|
||||||
def __init__(self, plugins):
|
def __init__(self, plugins):
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
# In general, all warnings are treated as errors. Here are the exceptions:
|
# In general, all warnings are treated as errors. Here are the exceptions:
|
||||||
# 1- decodestring: https://github.com/rthalley/dnspython/issues/338
|
# 1- decodestring: https://github.com/rthalley/dnspython/issues/338
|
||||||
# 2- ignore warn for importing abstract classes from collections instead of collections.abc,
|
|
||||||
# too much third party dependencies are still relying on this behavior,
|
|
||||||
# but it should be corrected to allow Certbot compatibility with Python >= 3.8
|
|
||||||
filterwarnings =
|
filterwarnings =
|
||||||
error
|
error
|
||||||
ignore:decodestring:DeprecationWarning
|
ignore:decodestring:DeprecationWarning
|
||||||
ignore:.*collections\.abc:DeprecationWarning
|
|
||||||
|
|||||||
Reference in New Issue
Block a user