Commit Graph

58 Commits

Author SHA1 Message Date
Shane Harvey
0092b0af79
PYTHON-2504 Run pyupgrade 3.4.0 and ruff 0.0.265 (#1196)
pyupgrade --py37-plus bson/*.py pymongo/*.py gridfs/*.py test/*.py tools/*.py test/*/*.py
ruff --fix-only --select ALL --fixable ALL --target-version py37 --line-length=100 --unfixable COM812,D400,D415,ERA001,RUF100,SIM108,D211,D212,SIM105,SIM,PT,ANN204,EM bson/*.py pymongo/*.py gridfs/*.py test/*.py test/*/*.py
2023-05-11 15:27:17 -07:00
Shane Harvey
9a829acf2e
PYTHON-3251 Make extra whitespace visible in invalid port exception (#937) 2022-05-04 11:12:58 -07:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
f4cef37328
PYTHON-3064 Add typings to test package (#844) 2022-02-07 19:33:41 -06:00
Julius Park
42324c69cf
PYTHON-2973 Revert back to using quote_plus/unquote_plus (#767) 2021-10-29 16:30:55 -07:00
Julius Park
11e6f9860a
PYTHON-1579 Update URI parser to adhere to new connection string spec (#755) 2021-10-20 13:39:32 -07:00
Shane Harvey
2eb0df812c
PYTHON-2879 Fix get_ssl_context for CSFLE and ocsptest.py (#713) 2021-08-24 13:36:37 -04:00
Prashant Mital
9055bb09e6
PYTHON-2702 Remove deprecated URI options (#710) 2021-08-20 10:17:06 -07:00
Prashant Mital
b3118e034e
PYTHON-2162 Remove support for ssl* URI options (#706) 2021-08-19 14:58:31 -07:00
Prashant Mital
3c8b78348d
PYTHON-2866 Setting tlsDisableOCSPEndpointCheck=false must enable OCSP endpoint check
(cherry picked from commit fe1d19dea4)
2021-08-16 12:18:12 -07:00
Shane Harvey
e3a61b9ff7
PYTHON-1840 Remove waitQueueMultiple and ExceededMaxWaiters (#699) 2021-08-09 10:53:28 -07:00
Bernie Hackett
a72e8b8823 PYTHON-2133 Remove py2 support from test
Also delete bson/py3compat.py
2021-01-20 09:40:36 -08:00
Prashant Mital
47a6718352
PYTHON-2161 add support for tlsDisableOcspEndpointCheck URI option 2020-03-11 18:35:11 -07:00
Shane Harvey
e26dc96e31 PYTHON-2034 Support MONGODB-AWS authentication mechanism
Use botocore to perform the manual Signature Version 4 Signing Process.
Test MONGODB-AWS in Evergreen.
Properly unquote URI option values in authMechanismProperties and
readPreferenceTags.
2020-03-03 09:43:48 -08:00
Bernie Hackett
5df94d08f0 PYTHON-2040 PyOpenSSL support 2020-02-06 18:03:21 -08:00
Prashant Mital
4800512c36
PYTHON-1839 Deprecate waitQueueMultiple option 2019-08-09 17:07:30 -07:00
Prashant Mital
f85a9f9450
PYTHON-1675 SRV polling for mongos discovery 2019-06-10 12:51:49 -07:00
Prashant Mital
8dbf41a5ff
PYTHON-1827 Follow-on work for unifying URI options 2019-05-28 11:04:47 -07:00
Prashant Mital
927a97e39b PYTHON-1670: Implement Unified URI Options (#386) 2019-02-27 15:56:48 -08:00
Thomas Hisch
19827c41ec PYTHON-1467 Remove outdated code for old python versions (#395) 2019-02-06 13:23:43 -08:00
Prashant Mital
b1fc024143
PYTHON-1683 Remove _partition and _rpartition from uri_parser module (#383) 2018-11-14 10:52:31 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Michael Elovskikh
9f07ff35a1 PYTHON-1334 Don't change readpreference value at uri parsing (#325) 2017-07-25 17:43:51 -07:00
A. Jesse Jiryu Davis
c72ee15b52 PYTHON-1282 Username/password must be URI-escaped
Not just "%", "@", and ":" must be escaped, all delimiters from RFC 3986
must be percent-encoded. Therefore, since "/" must be escaped in
username and password, we can split the URI at the first "/" instead of
the last.
2017-06-16 18:33:32 -04:00
Sergey Ninua
1d81aea087 allow connect option to be passed as string 2016-03-02 15:43:07 -05:00
aherlihy
193915e636 PYTHON-959 - Connection string spec compliance. 2015-08-06 13:14:31 -04:00
Len Buckens
64009228f8 PYTHON-934 - allow ssl_match_hostname option to be passed as string 2015-06-15 13:16:30 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
4fd6f8a0b1 PYTHON-854 max_pool_size -> maxPoolSize
With this change the max_pool_size named parameter to
MongoClient is removed. It is replaced by the maxPoolSize
MongoDB URI option, which can be passed in a URI, or as a
keyword argument to MongoClient.
2015-03-09 10:08:13 -07:00
Bernie Hackett
8f0bd0a6d4 PYTHON-850 - Change some uses of ConfigurationError to Type/ValueError. 2015-02-26 16:02:25 -08:00
A. Jesse Jiryu Davis
ee11436675 PYTHON-764 SCRAM-SHA-1 automatic upgrade / downgrade. 2014-10-23 16:30:55 -04:00
Luke Lovett
141200083e PYTHON-680 Stop using nose in favor of pure unittest/unittest2 2014-04-25 22:57:33 +00:00
Luke Lovett
4d6d1e067b PYTHON-676 python 2/3 single-source for the test module 2014-04-23 18:37:02 +00:00
behackett
e0b52baf8e PYTHON-672 - Make read preference a class
This commit introduces the following changes:

- Each read preference is now a class.
- Read preferences other than Primary accept a tag_sets parameter.
- The tag_sets attribute of MongoClient, Database, and Collection has
  been removed. Use the tag_sets parameter of the new classes instead.
- The read_preferences.ReadPreference constant still exists and should
continue to work as expected for most users.
2014-04-14 16:28:07 -07:00
Bernie Hackett
48a65eb9c1 PYTHON-526 Drop support for slaveOk/slave_okay.
Use any ReadPreference other than PRIMARY instead.
2014-04-04 16:37:32 -07:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
hawka
74546ec88d Adding Support for readPreferenceTags and uuidRepresentation in URI parsing. PYTHON-473 2013-08-30 15:38:34 -04:00
A. Jesse Jiryu Davis
78bcc97846 Handle unicode connection URIs in Python 2.4
Unicode MongoDB connection URIs, if they have options like "/?fsync=true", raised a TypeError in old Pythons.
2013-05-01 15:27:45 -04:00
behackett
f09e38879d MONGO-CR -> MONGODB-CR (spec change) 2013-02-15 16:06:38 -08:00
behackett
8de9051228 Remove MongoAuthenticationMechanism PYTHON-465
The spec changed - MongoAuthenticationMechanism is
no longer required.
2013-02-12 14:30:11 -08:00
behackett
18d20ed181 Support GSSAPI (Kerberos) authentication PYTHON-465
This only works with the subscriber addition of MongoDB
>= 2.4 and requires the python "kerberos" module, sometimes
referred to as pykerberos.

http://pypi.python.org/pypi/kerberos

This change also adds support for the authMechanism
and authSource URI options.
2013-02-08 16:04:53 -08:00
Craig Hobbs
e2ec7bd09c Ensure parse_uri accepts readPreference option 2013-01-23 11:03:38 -08:00
Craig Hobbs
f56460b293 Fix uri_parser read_preference validation 2013-01-23 11:03:38 -08:00
A. Jesse Jiryu Davis
6164fcf3f6 float('inf') isn't available everywhere, use 1e100000 instead 2012-11-26 21:45:14 -05:00
Ross Lawley
7577a19703 Add support for unix domain sockets PYTHON-297 2012-10-23 23:45:27 +00:00
A. Jesse Jiryu Davis
28a7ed9a93 Prohibit +/-infinity as timeout values 2012-10-06 11:19:17 -07:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00
behackett
2d21ba9376 Replace deprecated unittest assert method aliases.
assert_ -> assertTrue
assertEquals -> assertEqual

This is needed to clean up deprecation warnings
in python >= 3.2
2012-03-16 17:20:21 -07:00
behackett
11abdfe08d Fix max_pool_size and tz_aware validation. 2012-03-16 16:45:24 -07:00