Skip to content

Commit 2c932df

Browse files
committed
PYTHON-1477 PYTHON-1478 PYTHON-1480 - Doc improvements
1 parent b86c1e6 commit 2c932df

File tree

7 files changed

+77
-68
lines changed

7 files changed

+77
-68
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ You can also download the project source and do::
8181

8282
$ python setup.py install
8383

84-
Do **not** install the "bson" package. PyMongo comes with its own bson package;
85-
doing "easy_install bson" installs a third-party package that is incompatible
86-
with PyMongo.
84+
Do **not** install the "bson" package from pypi. PyMongo comes with its own
85+
bson package; doing "easy_install bson" installs a third-party package that
86+
is incompatible with PyMongo.
8787

8888
Dependencies
8989
============
@@ -123,10 +123,10 @@ Other optional packages:
123123
- `backports.pbkdf2 <https://pypi.python.org/pypi/backports.pbkdf2/>`_,
124124
improves authentication performance with SCRAM-SHA-1, the default
125125
authentication mechanism for MongoDB 3.0+. It especially improves
126-
performance on Python older than 2.7.8, or on Python 3 before Python 3.4.
126+
performance on Python versions older than 2.7.8.
127127
- `monotonic <https://pypi.python.org/pypi/monotonic>`_ adds support for
128128
a monotonic clock, which improves reliability in environments
129-
where clock adjustments are frequent. Not needed in Python 3.3+.
129+
where clock adjustments are frequent. Not needed in Python 3.
130130

131131

132132
Additional dependencies are:

RELEASE.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,43 @@ Versioning
55
----------
66

77
We shoot for a release every few months - that will generally just
8-
increment the middle version number (e.g. 2.6.3 -> 2.7).
8+
increment the middle / minor version number (e.g. 3.5.0 -> 3.6.0).
99

10-
Minor releases are reserved for bug fixes (in general no new features
10+
Patch releases are reserved for bug fixes (in general no new features
1111
or deprecations) - they only happen in cases where there is a critical
1212
bug in a recently released version, or when a release has no new
1313
features or API changes.
1414

1515
In between releases we add .devN to the version number to denote the version
16-
under development. So if we just released 3.0, then the current dev
17-
version would be 3.1.dev0. When we make the next release we
18-
replace all instances of 3.1.devN in the docs with the new version number.
16+
under development. So if we just released 3.6.0, then the current dev
17+
version might be 3.6.1.dev0 or 3.7.0.dev0. When we make the next release we
18+
replace all instances of 3.x.x.devN in the docs with the new version number.
19+
20+
https://semver.org/
21+
https://www.python.org/dev/peps/pep-0440/
1922

2023
Deprecation
2124
-----------
2225

2326
Changes should be backwards compatible unless absolutely necessary. When making
2427
API changes the approach is generally to add a deprecation warning but keeping
25-
the existing API functional. Eventually (after at least ~4 releases) we can
26-
remove the old API.
28+
the existing API functional. Deprecated features can be removed in a release
29+
that changes the major version number.
2730

2831
Doing a Release
2932
---------------
3033

31-
1. Test release on Python 2.6-2.7 and 3.2-3.4 on Windows, Linux and OSX,
32-
with and without the C extension. Generally enough to just run the tests on
33-
2.6, 2.7, 3.2 and the latest 3.x version with and without the extension on
34-
a single platform, and then just test any version on the other platforms
35-
as a sanity check. `python setup.py test` will build the extension
36-
and test. `python tools/clean.py` will remove the extension, and
37-
then `python setup.py --no_ext test` will run the tests without
38-
it. Run the replica set and mongos high-availability tests with
39-
`PYTHONPATH=. python test/high_availability/test_ha.py`. Can also
40-
run the doctests: `python setup.py doc -t`. For building extensions
41-
on Windows check section below.
34+
1. Test releases on Python 2.6-2.7 and 3.4+ on Windows, Linux and OSX,
35+
with and without the C extensions. It's generally enough to just run the
36+
tests on 2.6, 2.7, 3.4 and the latest 3.x version with and without the
37+
extensions on a single platform, and then just test any version on the
38+
other platforms as a sanity check. `python setup.py test` will build the
39+
extensions and test. `python tools/clean.py` will remove the extensions,
40+
and then `python setup.py --no_ext test` will run the tests without
41+
them. You can also run the doctests: `python setup.py doc -t`.
4242

4343
2. Add release notes to doc/changelog.rst. Generally just summarize/clarify
44-
the git log, but might add some more long form notes for big changes.
44+
the git log, but you might add some more long form notes for big changes.
4545

4646
3. Search and replace the "devN" version number w/ the new version number (see
4747
note above).
@@ -58,8 +58,8 @@ Doing a Release
5858

5959
9. Push binaries to PyPI; for each version of python and platform do:`python
6060
setup.py bdist_egg upload`. Probably best to do `python setup.py bdist_egg`
61-
first, to make sure the egg builds properly. On Windows we also push a binary
62-
installer. The setup.py target for that is `bdist_wininst`.
61+
first, to make sure the egg builds properly. We also publish wheels.
62+
`python setup.py bdist_wheel upload`.
6363

6464
10. Make sure to push a build of the new docs (see the apidocs repo).
6565

doc/examples/authentication.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ Or through the MongoDB URI::
4646
>>> uri = "mongodb://user:password@example.com/the_database?authMechanism=SCRAM-SHA-1"
4747
>>> client = MongoClient(uri)
4848

49-
For best performance install `backports.pbkdf2`_, especially on Python older
50-
than 2.7.8, or on Python 3 before Python 3.4.
49+
For best performance on Python versions older than 2.7.8 install `backports.pbkdf2`_.
5150

5251
.. _backports.pbkdf2: https://pypi.python.org/pypi/backports.pbkdf2/
5352

doc/examples/tls.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ When using CPython < 2.7.9 or PyPy < 2.5.1:
3030

3131
Python 3.x
3232
``````````
33-
On Windows, the `wincertstore`_ module is required when using CPython < 3.4.0
34-
or any version of PyPy3.
33+
On Windows, the `wincertstore`_ module is required when using PyPy3 < 3.5.
3534

3635
.. _ipaddress: https://pypi.python.org/pypi/ipaddress
3736
.. _wincertstore: https://pypi.python.org/pypi/wincertstore

doc/installation.rst

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Installing / Upgrading
55
**PyMongo** is in the `Python Package Index
66
<http://pypi.python.org/pypi/pymongo/>`_.
77

8-
.. warning:: **Do not install the "bson" package.** PyMongo comes with its own
9-
bson package; doing "pip install bson" or "easy_install bson" installs a
10-
third-party package that is incompatible with PyMongo.
8+
.. warning:: **Do not install the "bson" package from pypi.** PyMongo comes
9+
with its own bson package; doing "pip install bson" or "easy_install bson"
10+
installs a third-party package that is incompatible with PyMongo.
1111

1212
Installing with pip
1313
-------------------
@@ -19,7 +19,7 @@ to install pymongo on all platforms::
1919

2020
To get a specific version of pymongo::
2121

22-
$ python -m pip install pymongo==3.1.1
22+
$ python -m pip install pymongo==3.5.1
2323

2424
To upgrade using pip::
2525

@@ -80,21 +80,31 @@ Other optional packages:
8080
- `backports.pbkdf2 <https://pypi.python.org/pypi/backports.pbkdf2/>`_,
8181
improves authentication performance with SCRAM-SHA-1, the default
8282
authentication mechanism for MongoDB 3.0+. It especially improves
83-
performance on Python older than 2.7.8, or on Python 3 before Python 3.4.
83+
performance on Python versions older than 2.7.8.
8484
- `monotonic <https://pypi.python.org/pypi/monotonic>`_ adds support for
8585
a monotonic clock, which improves reliability in environments
86-
where clock adjustments are frequent. Not needed in Python 3.3+.
86+
where clock adjustments are frequent. Not needed in Python 3.
8787

8888

89-
Dependencies for installing C Extensions on Unix
90-
------------------------------------------------
89+
Installing from source
90+
----------------------
91+
92+
If you'd rather install directly from the source (i.e. to stay on the
93+
bleeding edge), install the C extension dependencies then check out the
94+
latest source from github and install the driver from the resulting tree::
95+
96+
$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
97+
$ cd pymongo/
98+
$ python setup.py install
99+
100+
Installing from source on Unix
101+
..............................
91102

92-
MongoDB, Inc. does not provide statically linked binary packages for Unix
93-
flavors other than OSX. To build the optional C extensions you must have the
94-
GNU C compiler (gcc) installed. Depending on your flavor of Unix (or Linux
95-
distribution) you may also need a python development package that provides
96-
the necessary header files for your version of Python. The package name may
97-
vary from distro to distro.
103+
To build the optional C extensions on Linux or another non-macOS Unix you must
104+
have the GNU C compiler (gcc) installed. Depending on your flavor of Unix
105+
(or Linux distribution) you may also need a python development package that
106+
provides the necessary header files for your version of Python. The package
107+
name may vary from distro to distro.
98108

99109
Debian and Ubuntu users should issue the following command::
100110

@@ -105,22 +115,18 @@ Fedora, etc.) should issue the following command::
105115

106116
$ sudo yum install gcc python-devel
107117

108-
Installing from source
109-
----------------------
110-
111-
If you'd rather install directly from the source (i.e. to stay on the
112-
bleeding edge), install the C extension dependencies then check out the
113-
latest source from github and install the driver from the resulting tree::
118+
Installing from source on macOS / OSX
119+
.....................................
114120

115-
$ git clone git://github.com/mongodb/mongo-python-driver.git pymongo
116-
$ cd pymongo/
117-
$ python setup.py install
121+
If you want to install PyMongo with C extensions from source you will need
122+
the command line developer tools. On modern versions of macOS they can be
123+
installed by running the following in Terminal (found in
124+
/Applications/Utilities/)::
118125

119-
Installing from source on OSX
120-
.............................
126+
xcode-select --install
121127

122-
If you want to install PyMongo from source on OSX you will have to install the
123-
following to build the C extensions:
128+
For older versions of OSX you may need Xcode. See the notes below for various
129+
OSX and Xcode versions.
124130

125131
**Snow Leopard (10.6)** - Xcode 3 with 'UNIX Development Support'.
126132

@@ -173,11 +179,10 @@ requirements apply to both CPython and ActiveState's ActivePython:
173179
~~~~~~~~~~~~~~
174180

175181
For Python 3.5 and newer install Visual Studio 2015. For Python 3.4
176-
install Visual Studio 2010. For Python 2.6 and 2.7 install Visual Studio
177-
2008, or the Microsoft Visual C++ Compiler for Python 2.7. You must use the
178-
full version of Visual Studio 2010 or 2008 as Visual C++ Express does not
179-
provide 64-bit compilers. Make sure that you check the "x64 Compilers and
180-
Tools" option under Visual C++.
182+
install Visual Studio 2010. You must use the full version of Visual Studio
183+
2010 as Visual C++ Express does not provide 64-bit compilers. Make sure that
184+
you check the "x64 Compilers and Tools" option under Visual C++. For Python 2.6
185+
and 2.7 install the `Microsoft Visual C++ Compiler for Python 2.7`_.
181186

182187
32-bit Windows
183188
~~~~~~~~~~~~~~
@@ -186,7 +191,9 @@ For Python 3.5 and newer install Visual Studio 2015.
186191

187192
For Python 3.4 install Visual C++ 2010 Express.
188193

189-
For Python 2.6 and 2.7 install Visual C++ 2008 Express SP1.
194+
For Python 2.6 and 2.7 install the `Microsoft Visual C++ Compiler for Python 2.7`_
195+
196+
.. _`Microsoft Visual C++ Compiler for Python 2.7`: https://www.microsoft.com/en-us/download/details.aspx?id=44266
190197

191198
.. _install-no-c:
192199

doc/tools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ uMongo
7777
Its inception comes from two needs: the lack of async ODM and the
7878
difficulty to do document (un)serialization with existing ODMs.
7979
Works with multiple drivers: PyMongo, TxMongo, motor_asyncio, and
80-
mongomock. The source `is on github
80+
mongomock. The source `is available on github
8181
<https://github.com/Scille/umongo>`_
8282

8383
No longer maintained

setup.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,16 @@ class custom_build_ext(build_ext):
262262
$ sudo yum install gcc python-devel
263263
264264
If you are seeing this message on Microsoft Windows please install
265-
PyMongo using the MS Windows installer for your version of Python,
266-
available on pypi here:
265+
PyMongo using pip. Modern versions of pip will install PyMongo
266+
from binary wheels available on pypi. If you must install from
267+
source read the documentation here:
267268
268-
http://pypi.python.org/pypi/pymongo/#downloads
269+
https://api.mongodb.com/python/current/installation.html#installing-from-source-on-windows
269270
270-
If you are seeing this message on OSX please read the documentation
271+
If you are seeing this message on macOS / OSX please install PyMongo
272+
using pip. Modern versions of pip will install PyMongo from binary
273+
wheels available on pypi. If wheels are not available for your version
274+
of macOS / OSX, or you must install from source read the documentation
271275
here:
272276
273277
http://api.mongodb.org/python/current/installation.html#osx

0 commit comments

Comments
 (0)