Commit graph

49 commits

Author SHA1 Message Date
trhr
fb83d7f277 log_error is not a function in utils/logger.py; changed to log_err in utils/dbserialize.py 2020-02-14 23:50:44 -06:00
Griatch
05f2264eb1 Ran black on sources, some minor tweaks 2020-02-12 23:07:56 +01:00
trhr
ad8b1d81d5 django.utils.safestring.SafeBytes - Unused since Django 2.0. 2020-02-09 20:14:47 -06:00
Griatch
69d85bd184 Make scripts/objects lists use EvMore. Change EvMore to not justify by default. 2020-01-11 15:49:12 +01:00
Griatch
ca39276001 Ran black on master branch 2019-12-16 20:33:38 +01:00
Griatch
85535b7baa Fix serialization for Class store, add more log error on dbserialize error. Resolve #1979 2019-10-28 17:45:25 +01:00
Griatch
c2c7fa311a Format code with black. Add makefile to run fmt/tests 2019-09-28 18:18:11 +02:00
Greg Taylor
5e1a672fc2 Remove builtins imports
This module is not intended to be used directly in most cases, per:
https://docs.python.org/3/library/builtins.html

None of our usages warrant the explicit import. We also avoid some
confusion as folks dig to see what we are doing to require
importing builtins directly.
2019-09-15 20:29:59 -07:00
Griatch
30b489ce94 Convert string to bytes safely, resolves #1770. 2019-01-23 20:52:56 +01:00
Vincent Le Goff
d8252fc26a Remove yet another to_str in data manipulation 2019-01-19 12:36:27 +01:00
Griatch
72644c6f57 Remove to_str from pickle.loads call 2019-01-17 20:38:30 +01:00
Griatch
aa48593a40 Made all unit tests pass 2019-01-09 22:08:48 +01:00
Griatch
72f4fedcbe Merge with develop and fix merge conflicts 2018-10-01 20:58:16 +02:00
Griatch
bed96328a9 Lots of bug fixes, still issues in prototype-update from menu 2018-09-21 00:05:23 +02:00
Tehom
315977c285 Fix __add__ in SaverList 2018-05-29 23:05:34 -04:00
Ryan Stein
7d524ac328 Unwrap for expressions in comprehensions, too. 2017-11-02 22:52:16 -04:00
Ryan Stein
cd21fb2396 Use Python 3's new super() convention. 2017-11-02 10:41:41 -04:00
Ryan Stein
6fa280b9fd Run 2to3. 2017-10-29 13:40:30 -04:00
Griatch
b3c6e9d2cc Update alerts reported by LGTM 2017-09-23 16:46:54 +02:00
Griatch
4f8d70118e Remove check of datestring if trying to load an replaced class from an Attribute 2017-09-17 14:02:14 +02:00
Griatch
14fc12fb6b Add ATTRIBUTE_STORED_MODEL_RENAME setting to manage renamed models stored in Attributes. 2017-09-07 22:04:37 +02:00
Griatch
f6b4155aed Rename migration to indicate slowness - may need to drop migration table and --fake run again. 2017-09-07 21:27:13 +02:00
Griatch
92df3ce5ae Structure handlers to allow .get() to return lists
See #1154. In the end I didn't modify the Attributehandler and
TagHandler like this, instead I added the `return_list` argument
for cases when one wants a guaranteed return.
2017-08-27 14:56:05 +02:00
Griatch
f0d1abc4ff Some refactoring of the error message and code. 2017-08-24 22:30:04 +02:00
Tehom
d0dc2841d9 Add more clear error message to _SaverMutable 2017-08-22 17:49:28 -04:00
Griatch
b278337172 Make PEP8 cleanup of line spaces and character distances as well as indents 2017-08-19 23:16:36 +02:00
Griatch
5590ee2258 Rename all instances of Player->Account. 2017-07-07 23:47:21 +02:00
BlauFeuer
c27c96f423 PEP 8 comply 2017-03-19 20:24:51 +01:00
Griatch
052e1845a2 Fix error in MonitorHandler recovering a saved Session across a reload. This probably affected the TickerHandler as well. Add a new hook to the server object that gets called once the portal has synced, and run the monitorhandler/tickerhandler restores there. Also some changes to the serialization of Sessions. Resolves #1164. 2017-01-15 19:55:51 +01:00
Dan Feeney
8cba8ab429 added the append saver method 2016-09-20 16:19:46 +02:00
Griatch
756d4be4bc Fix missing rotate argument for deque-attriutes, actually commit unittest updates. 2016-09-02 14:32:42 +02:00
Griatch
88b217c0b8 Add support for collections.OrderedDict and collections.deque to Attribute serializer mechanism. Also some cleanups in dbserializer. 2016-08-31 22:45:57 +02:00
Griatch
00881c3bbe Make _SaverList properly handle index/remove operations. Resolves #1027. 2016-08-31 14:45:56 +02:00
Griatch
96542418c0 Made sure that the various _SaverMutable objects evaluate to False when they are empty. 2016-06-26 11:56:58 +02:00
Griatch
03ef093d36 Resolves problems in storing/restoring tickerhandler keys. Resolves #997. 2016-06-24 18:15:01 +02:00
Griatch
bdcc093c23 Make tickerhandler correctly clean subs to deleted objs.
Also makes the dbunserialize mechanism a little more robust, making it return None instead of crashing when unpacking an invalid packed-tuple.
2016-06-14 22:04:41 +02:00
Sina Mashek
7e3bc95c4c Removed 'self' from _get_mysql_db_version() 2016-05-22 20:49:45 +02:00
Griatch
899ce2f138 Extended dbserialize to safely serialize Session instances. Sessions can otherwise not be safely stored since they contain references to database objects (like puppets and players) 2016-05-22 20:45:41 +02:00
Griatch
8090d92d85 MonitorHandler implemented as a replacement for the OOBHandler monitor functionality, as per #924. 2016-05-22 20:45:39 +02:00
Griatch
e80ad9fd18 Fixed dbserialize pickle processor typo 2016-02-06 21:56:26 +01:00
Ahmed Charles
be7035416c Cleanup int include. 2015-11-09 10:11:34 +01:00
Ahmed Charles
c9404bfb51 Don't use long, since it doesn't exist in python3. 2015-11-02 00:19:04 +01:00
Ahmed Charles
11b61fe335 Import python3 compatible object. 2015-11-02 00:19:04 +01:00
Griatch
50371b6abd Merged conflicts. 2015-10-19 23:32:00 +02:00
Griatch
eb2bd8d44c Converted a large part of utils/ folder to google code docstrings as per #709. 2015-09-27 20:24:03 +02:00
tajmone
90bef1a8d5 more docstrings
more docstrings
2015-03-09 13:13:09 +01:00
Griatch
3fbc9acc51 Some more work to get modules to load in the right order. 2015-01-07 20:10:03 +01:00
Griatch
ad3f19896c Changed all src/ and ev references to evennia 2015-01-07 15:36:32 +01:00
Griatch
c7325a5032 Further reworking, naming the library folder 'evennia' instead of lib or src. 2015-01-07 13:36:57 +01:00
Renamed from lib/utils/dbserialize.py (Browse further)