Skip to content

Commit a33e1c3

Browse files
committed
Format
1 parent c754b25 commit a33e1c3

10 files changed

+585
-599
lines changed

MySQLdb/_mysql_exceptions.py

-13
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,35 @@
1313

1414

1515
class MySQLError(StandardError):
16-
1716
"""Exception related to operation with MySQL."""
1817

1918

2019
class Warning(Warning, MySQLError):
21-
2220
"""Exception raised for important warnings like data truncations
2321
while inserting, etc."""
2422

2523
class Error(MySQLError):
26-
2724
"""Exception that is the base class of all other error exceptions
2825
(not Warning)."""
2926

3027

3128
class InterfaceError(Error):
32-
3329
"""Exception raised for errors that are related to the database
3430
interface rather than the database itself."""
3531

3632

3733
class DatabaseError(Error):
38-
3934
"""Exception raised for errors that are related to the
4035
database."""
4136

4237

4338
class DataError(DatabaseError):
44-
4539
"""Exception raised for errors that are due to problems with the
4640
processed data like division by zero, numeric value out of range,
4741
etc."""
4842

4943

5044
class OperationalError(DatabaseError):
51-
5245
"""Exception raised for errors that are related to the database's
5346
operation and not necessarily under the control of the programmer,
5447
e.g. an unexpected disconnect occurs, the data source name is not
@@ -57,31 +50,25 @@ class OperationalError(DatabaseError):
5750

5851

5952
class IntegrityError(DatabaseError):
60-
6153
"""Exception raised when the relational integrity of the database
6254
is affected, e.g. a foreign key check fails, duplicate key,
6355
etc."""
6456

6557

6658
class InternalError(DatabaseError):
67-
6859
"""Exception raised when the database encounters an internal
6960
error, e.g. the cursor is not valid anymore, the transaction is
7061
out of sync, etc."""
7162

7263

7364
class ProgrammingError(DatabaseError):
74-
7565
"""Exception raised for programming errors, e.g. table not found
7666
or already exists, syntax error in the SQL statement, wrong number
7767
of parameters specified, etc."""
7868

7969

8070
class NotSupportedError(DatabaseError):
81-
8271
"""Exception raised in case a method or database API was used
8372
which is not supported by the database, e.g. requesting a
8473
.rollback() on a connection that does not support transaction or
8574
has transactions turned off."""
86-
87-

doc/FAQ.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ probably the issue, but it shouldn't happen any more.
2626
ImportError
2727
-----------
2828

29-
ImportError: No module named _mysql
29+
ImportError: No module named _mysql
3030

3131
If you see this, it's likely you did some wrong when installing
3232
MySQLdb; re-read (or read) README. _mysql is the low-level C module
@@ -42,7 +42,7 @@ still have to edit a configuration file so that the setup knows where
4242
to find MySQL and what libraries to include.
4343

4444

45-
ImportError: libmysqlclient_r.so.14: cannot open shared object file: No such file or directory
45+
ImportError: libmysqlclient_r.so.14: cannot open shared object file: No such file or directory
4646

4747
The number after .so may vary, but this means you have a version of
4848
MySQLdb compiled against one version of MySQL, and are now trying to
@@ -67,7 +67,7 @@ Solutions:
6767
<http://docs.oracle.com/cd/E19253-01/817-1984/chapter6-63352/>`_.
6868

6969

70-
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
70+
ImportError: ld.so.1: python: fatal: libmtmalloc.so.1: DF_1_NOOPEN tagged object may not be dlopen()'ed
7171

7272
This is a weird one from Solaris. What does it mean? I have no idea.
7373
However, things like this can happen if there is some sort of a compiler
@@ -79,9 +79,9 @@ different vendors.
7979

8080
Solution: Rebuild Python or MySQL (or maybe both) from source.
8181

82-
ImportError: dlopen(./_mysql.so, 2): Symbol not found: _sprintf$LDBLStub
83-
Referenced from: ./_mysql.so
84-
Expected in: dynamic lookup
82+
ImportError: dlopen(./_mysql.so, 2): Symbol not found: _sprintf$LDBLStub
83+
Referenced from: ./_mysql.so
84+
Expected in: dynamic lookup
8585

8686
This is one from Mac OS X. It seems to have been a compiler mismatch,
8787
but this time between two different versions of GCC. It seems nearly
@@ -110,7 +110,7 @@ rolled back, and they cause pending transactions to commit.
110110
Other Errors
111111
------------
112112

113-
OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')
113+
OperationalError: (1251, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')
114114

115115
This means your server and client libraries are not the same version.
116116
More specifically, it probably means you have a 4.1 or newer server

doc/MySQLdb.constants.rst

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
constants Package
2-
=================
3-
4-
:mod:`constants` Package
5-
------------------------
6-
7-
.. automodule:: MySQLdb.constants
8-
:members:
9-
:undoc-members:
10-
:show-inheritance:
11-
12-
:mod:`CLIENT` Module
13-
--------------------
14-
15-
.. automodule:: MySQLdb.constants.CLIENT
16-
:members:
17-
:undoc-members:
18-
:show-inheritance:
19-
20-
:mod:`CR` Module
21-
----------------
22-
23-
.. automodule:: MySQLdb.constants.CR
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:
27-
28-
:mod:`ER` Module
29-
----------------
30-
31-
.. automodule:: MySQLdb.constants.ER
32-
:members:
33-
:undoc-members:
34-
:show-inheritance:
35-
36-
:mod:`FIELD_TYPE` Module
37-
------------------------
38-
39-
.. automodule:: MySQLdb.constants.FIELD_TYPE
40-
:members:
41-
:undoc-members:
42-
:show-inheritance:
43-
44-
:mod:`FLAG` Module
45-
------------------
46-
47-
.. automodule:: MySQLdb.constants.FLAG
48-
:members:
49-
:undoc-members:
50-
:show-inheritance:
51-
52-
:mod:`REFRESH` Module
53-
---------------------
54-
55-
.. automodule:: MySQLdb.constants.REFRESH
56-
:members:
57-
:undoc-members:
58-
:show-inheritance:
59-
1+
constants Package
2+
=================
3+
4+
:mod:`constants` Package
5+
------------------------
6+
7+
.. automodule:: MySQLdb.constants
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
12+
:mod:`CLIENT` Module
13+
--------------------
14+
15+
.. automodule:: MySQLdb.constants.CLIENT
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:
19+
20+
:mod:`CR` Module
21+
----------------
22+
23+
.. automodule:: MySQLdb.constants.CR
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
28+
:mod:`ER` Module
29+
----------------
30+
31+
.. automodule:: MySQLdb.constants.ER
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
35+
36+
:mod:`FIELD_TYPE` Module
37+
------------------------
38+
39+
.. automodule:: MySQLdb.constants.FIELD_TYPE
40+
:members:
41+
:undoc-members:
42+
:show-inheritance:
43+
44+
:mod:`FLAG` Module
45+
------------------
46+
47+
.. automodule:: MySQLdb.constants.FLAG
48+
:members:
49+
:undoc-members:
50+
:show-inheritance:
51+
52+
:mod:`REFRESH` Module
53+
---------------------
54+
55+
.. automodule:: MySQLdb.constants.REFRESH
56+
:members:
57+
:undoc-members:
58+
:show-inheritance:
59+

doc/_mysql_exceptions.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
_mysql_exceptions Module
2-
========================
3-
4-
.. automodule:: _mysql_exceptions
5-
:members:
6-
:undoc-members:
7-
:show-inheritance:
1+
_mysql_exceptions Module
2+
========================
3+
4+
.. automodule:: _mysql_exceptions
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

doc/modules.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
MySQLdb
2-
=======
3-
4-
.. toctree::
5-
:maxdepth: 4
6-
7-
MySQLdb
1+
MySQLdb
2+
=======
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
MySQLdb

setup_windows.py

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ def get_config():
4747

4848
if __name__ == "__main__":
4949
sys.stderr.write("""You shouldn't be running this directly; it is used by setup.py.""")
50-

0 commit comments

Comments
 (0)