Skip to content

Commit 17a368b

Browse files
authored
Update docs (#924)
1 parent 744da2f commit 17a368b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The following examples make use of a simple table
9393
`email` varchar(255) COLLATE utf8_bin NOT NULL,
9494
`password` varchar(255) COLLATE utf8_bin NOT NULL,
9595
PRIMARY KEY (`id`)
96-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8_bin
96+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
9797
AUTO_INCREMENT=1 ;
9898
9999

docs/source/user/development.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ and edit the new file to match your MySQL configuration::
3030

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

33-
$ python runtests.py
33+
$ pip install pytest
34+
$ pytest -v pymysql
3435

3536
A ``tox.ini`` file is also provided for conveniently running tests on multiple
3637
Python versions::

docs/source/user/examples.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following examples make use of a simple table
1818
`email` varchar(255) COLLATE utf8_bin NOT NULL,
1919
`password` varchar(255) COLLATE utf8_bin NOT NULL,
2020
PRIMARY KEY (`id`)
21-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
21+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
2222
AUTO_INCREMENT=1 ;
2323
2424
@@ -34,7 +34,7 @@ The following examples make use of a simple table
3434
charset='utf8mb4',
3535
cursorclass=pymysql.cursors.DictCursor)
3636
37-
try:
37+
with connection:
3838
with connection.cursor() as cursor:
3939
# Create a new record
4040
sql = "INSERT INTO `users` (`email`, `password`) VALUES (%s, %s)"
@@ -50,8 +50,7 @@ The following examples make use of a simple table
5050
cursor.execute(sql, ('webmaster@python.org',))
5151
result = cursor.fetchone()
5252
print(result)
53-
finally:
54-
connection.close()
53+
5554
5655
This example will print:
5756

docs/source/user/installation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Requirements
1818

1919
* Python -- one of the following:
2020

21-
- CPython_ >= 2.7 or >= 3.5
22-
- Latest PyPy_
21+
- CPython_ >= 3.6
22+
- Latest PyPy_ 3
2323

2424
* MySQL Server -- one of the following:
2525

26-
- MySQL_ >= 5.5
27-
- MariaDB_ >= 5.5
26+
- MySQL_ >= 5.6
27+
- MariaDB_ >= 10.0
2828

2929
.. _CPython: http://www.python.org/
3030
.. _PyPy: http://pypy.org/

0 commit comments

Comments
 (0)