Skip to content

Commit

Permalink
Update docs (#924)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jan 3, 2021
1 parent 744da2f commit 17a368b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The following examples make use of a simple table
`email` varchar(255) COLLATE utf8_bin NOT NULL,
`password` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8_bin
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
AUTO_INCREMENT=1 ;
Expand Down
3 changes: 2 additions & 1 deletion docs/source/user/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ and edit the new file to match your MySQL configuration::

To run all the tests, execute the script ``runtests.py``::

$ python runtests.py
$ pip install pytest
$ pytest -v pymysql

A ``tox.ini`` file is also provided for conveniently running tests on multiple
Python versions::
Expand Down
7 changes: 3 additions & 4 deletions docs/source/user/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following examples make use of a simple table
`email` varchar(255) COLLATE utf8_bin NOT NULL,
`password` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
AUTO_INCREMENT=1 ;
Expand All @@ -34,7 +34,7 @@ The following examples make use of a simple table
charset='utf8mb4',
cursorclass=pymysql.cursors.DictCursor)
try:
with connection:
with connection.cursor() as cursor:
# Create a new record
sql = "INSERT INTO `users` (`email`, `password`) VALUES (%s, %s)"
Expand All @@ -50,8 +50,7 @@ The following examples make use of a simple table
cursor.execute(sql, ('webmaster@python.org',))
result = cursor.fetchone()
print(result)
finally:
connection.close()
This example will print:

Expand Down
8 changes: 4 additions & 4 deletions docs/source/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Requirements

* Python -- one of the following:

- CPython_ >= 2.7 or >= 3.5
- Latest PyPy_
- CPython_ >= 3.6
- Latest PyPy_ 3

* MySQL Server -- one of the following:

- MySQL_ >= 5.5
- MariaDB_ >= 5.5
- MySQL_ >= 5.6
- MariaDB_ >= 10.0

.. _CPython: http://www.python.org/
.. _PyPy: http://pypy.org/
Expand Down

0 comments on commit 17a368b

Please sign in to comment.