PYTHON-3423 Make dnspython a required dependency (#1055)
This commit is contained in:
parent
179efda312
commit
dcb1327395
@ -90,6 +90,11 @@ Dependencies
|
||||
|
||||
PyMongo supports CPython 3.7+ and PyPy3.7+.
|
||||
|
||||
Required dependencies:
|
||||
|
||||
Support for mongodb+srv:// URIs requires `dnspython
|
||||
<https://pypi.python.org/pypi/dnspython>`_
|
||||
|
||||
Optional dependencies:
|
||||
|
||||
GSSAPI authentication requires `pykerberos
|
||||
@ -104,10 +109,6 @@ MONGODB-AWS authentication requires `pymongo-auth-aws
|
||||
|
||||
$ python -m pip install "pymongo[aws]"
|
||||
|
||||
Support for mongodb+srv:// URIs requires `dnspython
|
||||
<https://pypi.python.org/pypi/dnspython>`_::
|
||||
|
||||
$ python -m pip install "pymongo[srv]"
|
||||
|
||||
OCSP (Online Certificate Status Protocol) requires `PyOpenSSL
|
||||
<https://pypi.org/project/pyOpenSSL/>`_, `requests
|
||||
|
||||
@ -4,6 +4,10 @@ Changelog
|
||||
Changes in Version 4.3
|
||||
----------------------
|
||||
|
||||
`dnspython <https://pypi.python.org/pypi/dnspython>`_ is now a required
|
||||
dependency. This change makes PyMongo easier to install for use with "mongodb+srv://"
|
||||
connection strings and `MongoDB Atlas <https://www.mongodb.com/cloud>`_.
|
||||
|
||||
PyMongo 4.3 brings a number of improvements including:
|
||||
|
||||
- Added support for decoding BSON datetimes outside of the range supported
|
||||
|
||||
@ -30,6 +30,12 @@ Dependencies
|
||||
|
||||
PyMongo supports CPython 3.7+ and PyPy3.7+.
|
||||
|
||||
Required dependencies:
|
||||
|
||||
Support for mongodb+srv:// URIs requires `dnspython
|
||||
<https://pypi.python.org/pypi/dnspython>`_
|
||||
|
||||
|
||||
Optional dependencies:
|
||||
|
||||
GSSAPI authentication requires `pykerberos
|
||||
@ -44,10 +50,7 @@ dependency can be installed automatically along with PyMongo::
|
||||
|
||||
$ python3 -m pip install "pymongo[aws]"
|
||||
|
||||
Support for mongodb+srv:// URIs requires `dnspython
|
||||
<https://pypi.python.org/pypi/dnspython>`_::
|
||||
|
||||
$ python3 -m pip install "pymongo[srv]"
|
||||
|
||||
:ref:`OCSP` requires `PyOpenSSL
|
||||
<https://pypi.org/project/pyOpenSSL/>`_, `requests
|
||||
|
||||
@ -469,8 +469,8 @@ def parse_uri(
|
||||
raise ConfigurationError(
|
||||
'The "dnspython" module must be '
|
||||
"installed to use mongodb+srv:// URIs. "
|
||||
"To fix this error install pymongo with the srv extra:\n "
|
||||
'%s -m pip install "pymongo[srv]"' % (python_path)
|
||||
"To fix this error install pymongo again:\n "
|
||||
"%s -m pip install pymongo>=4.3" % (python_path)
|
||||
)
|
||||
is_srv = True
|
||||
scheme_free = uri[SRV_SCHEME_LEN:]
|
||||
|
||||
4
setup.py
4
setup.py
@ -281,7 +281,7 @@ extras_require = {
|
||||
"snappy": ["python-snappy"],
|
||||
"zstd": ["zstandard"],
|
||||
"aws": ["pymongo-auth-aws<2.0.0"],
|
||||
"srv": ["dnspython>=1.16.0,<3.0.0"],
|
||||
"srv": [],
|
||||
}
|
||||
|
||||
# GSSAPI extras
|
||||
@ -314,7 +314,7 @@ setup(
|
||||
author="The MongoDB Python Team",
|
||||
url="http://github.com/mongodb/mongo-python-driver",
|
||||
keywords=["mongo", "mongodb", "pymongo", "gridfs", "bson"],
|
||||
install_requires=[],
|
||||
install_requires=["dnspython>=1.16.0,<3.0.0"],
|
||||
license="Apache License, Version 2.0",
|
||||
python_requires=">=3.7",
|
||||
classifiers=[
|
||||
|
||||
Loading…
Reference in New Issue
Block a user