Commit Graph

91 Commits

Author SHA1 Message Date
tkeffer@gmail.com
d1b15032f7 Can now recover from MariaDB-specific database connection error 1927.
Also, now wait only 60 seconds after a database error before restarting.
2019-12-31 05:30:59 -07:00
Tom Keffer
de34845da5 Allow import pymysql in lieu of MySQLdb 2019-11-19 11:43:00 -08:00
Tom Keffer
49effd9297 Ported test_errors to later versions of MySQL (8.8) 2019-11-19 10:03:25 -08:00
Tom Keffer
fdee14a969 Fixed some misleading comments. Lightly refactored. 2019-11-13 08:33:15 -08:00
Tom Keffer
d13f6c0e55 Merge branch 'development' into extended_types
# Conflicts:
#	docs/changes.txt
2019-11-08 08:19:10 -08:00
Tom Keffer
75f683c69e Merge branch 'master' of git://github.com/bellrichm/weewx into bellrichm-master 2019-11-08 07:49:55 -08:00
Rich Bell
7f2f65ef4b Do not directly instantiate Cursor, use the Connection cursor method.
It appears to clean up old Cursor objects
2019-11-07 16:55:45 -05:00
Tom Keffer
ccb4fa8d2e Fixed problem under Python 2 2019-10-19 12:02:57 -07:00
Tom Keffer
be2453eadf Moved test file sqdb1.sdb to /var/tmp/weewx_test 2019-10-19 10:34:18 -07:00
Tom Keffer
e708dab311 Allow SQLite in-memory databases. 2019-10-15 06:26:34 -07:00
Tom Keffer
4e4405595e Changed raised error to NotImplementedError 2019-08-22 17:00:47 -07:00
Tom Keffer
d5412d05cd Ported to Python2-PyMySQL package on OpenSUSE. 2019-03-17 05:35:04 -07:00
Tom Keffer
4726d52a67 Report status after setting up MySQL 2019-03-10 18:20:25 -07:00
Tom Keffer
472d393487 Cover all bases for the location of MySQL's DatabaseError class 2019-03-10 09:18:02 -07:00
Tom Keffer
6d91e499b6 Ported weedb test suite to Python 3 2019-03-10 07:21:48 -07:00
Tom Keffer
77480391d0 Changed name of test subdirectory from 'test' to 'tests'. 2019-03-02 17:26:05 -08:00
Tom Keffer
188670f60f Ported to mysqlclient and to Python 3 2019-02-11 11:14:57 -08:00
Matthew Wall
e9ebf331ec added info about skipped tests to the summary for the 'test' target 2019-01-22 23:26:13 -05:00
Matthew Wall
a41f73a220 if no mysqldb driver, then skip instead of error 2019-01-22 13:50:21 -05:00
Tom Keffer
599e44d535 Python 3 changes 2018-09-29 20:24:21 -07:00
Tom Keffer
736604ccc7 Fixed problem where MySQL error 2013 crashes WeeWX. Fixes issue #327. 2018-06-18 11:59:58 -07:00
vinceskahan
701f094a59 2to3 -f except -w (#315) 2018-04-09 05:55:16 -07:00
vinceskahan
bc1f8dfd25 make test runs ok on ubuntu 16.04 and 18.04 (#313) 2018-04-09 05:03:40 -07:00
Tom Keffer
b0656b0e1d Fixed bug that crashes the program if a Sqlite permission error occurs. 2018-02-09 16:05:05 -08:00
Tom Keffer
80b3140d79 Merge branch 'master' into development
Catch up with the 'master' branch
2017-08-24 15:40:19 -07:00
gjr80
8b16391db5 Add @guard decorator to __init__() to ensure we get a weedb exception if our Connection object has an initialisation error
__init() in class Connection originally had a try..except around the
MySQLdb.connect() call to catch any errors and return a weedb exception.
This was removed when the code was restructured at commit
b00989a632 and the @guard decorator added
to the class. This decorator was removed at commit
69dc7a808d. Not sure if this is the
pythonic way to do this or if the old try..exception should be
re-instated  - but this eliminates errors in the test suite test_no_db()
test.
2017-08-16 15:43:57 +10:00
gjr80
64025d77a4 Refer description
- update test_no_db() target exception
- add a couple of extra pre-requisites for make test
2017-08-16 15:18:31 +10:00
Tom Keffer
d62f424905 Merge branch 'master' into development 2017-06-24 18:57:23 -07:00
Tom Keffer
69dc7a808d Removed errant @guard decorator 2017-06-23 08:35:31 -07:00
Tom Keffer
a3299cf7bd Added weewx to the MySQL users to be setup 2017-04-17 14:37:49 -07:00
Raymon de Looff
a9929e8896 Add MySQL Error 2006 to exceptions (#246)
Any other "Cannot connect" errors that we should be mapping?
2017-03-24 16:19:54 -07:00
Tom Keffer
3e6331de2c Now calls autocommit member function instead of using initializer option 2017-03-22 18:25:08 -07:00
Tom Keffer
6df7ca26dd By default, autocommit is now enabled for the MySQL driver. Fixes issue #237.
Included regression test.
2017-03-17 07:56:31 -07:00
Raymon de Looff
a0bd1446f7 Add MySQL Error 2003 to exceptions (#234) 2017-03-15 15:45:10 -07:00
Tom Keffer
d93ffeeba6 Fixed bug that prevented a port from being specified for MySQL installations. 2017-03-14 14:13:10 -07:00
Tom Keffer
163d7dac6d Fixed problem that prevented a MySQL port from being specified. 2017-03-14 06:02:02 -07:00
Tom Keffer
2a2651cfa4 The weedb Cursor object can now be used in a "with" clause. 2017-02-05 18:16:15 -08:00
Tom Keffer
3c34e7672f The weedb Connection object can now be used in a "with" clause. 2017-02-05 18:07:58 -08:00
Tom Keffer
b00989a632 Ported MySQLdb to the new database exception hierarchy. 2017-02-05 17:29:43 -08:00
Tom Keffer
a533ad2307 Ported the weedb sqlite driver to the new exception hierarchy. 2017-02-05 14:34:53 -08:00
Tom Keffer
4eb6d7adf6 First cut at V3.7 exception hierarchy 2017-02-05 08:42:27 -08:00
Tom Keffer
eebef95bdc Finished formal test of errors 2017-02-05 08:18:39 -08:00
Tom Keffer
17f6fca587 Added sqlite3 exceptions. 2017-02-04 16:20:32 -08:00
Tom Keffer
059a3a887d Formal check of the various MySQLdb exceptions. 2017-02-04 15:31:56 -08:00
Tom Keffer
9af4fc74b8 Now uses dedicated test users 'weewx1' and 'weewx2' 2017-02-04 12:43:56 -08:00
Tom Keffer
923fffcdd6 Reverted back to MySQLdb only version. 2017-02-02 05:19:25 -08:00
Tom Keffer
1c35d31ab4 Defaults now support MySQLdb over pymysql 2017-02-01 05:41:11 -08:00
Tom Keffer
04582fba1b pymysql seems to have problems connecting via file socket
unless it is told explicitly about it.
2017-01-31 16:37:04 -08:00
Tom Keffer
595f513adf Recognize additional MySQL "Can't connect" error 2017-01-31 13:23:14 -08:00
Tom Keffer
f64b9af002 Ported to PyMySQL as an alternative to python-mysqldb
See https://github.com/PyMySQL/PyMySQL for a description of PyMySQL
2017-01-31 08:47:47 -08:00