Jim Paris
ba915bb290
Use os.replace instead of os.remove; remove a "no cover"
4 years ago
Jim Paris
f93edc469c
Remove dummy lock functions from lock.py
4 years ago
Jim Paris
087fb39475
Add tests for two more "no cover" blocks
4 years ago
Jim Paris
cadba9fbba
Fix branch coverage
4 years ago
Jim Paris
edf4568e8f
Fix error in interval comparisons; add coverage
4 years ago
Jim Paris
57751f5b32
Consistently use bytes everywhere for stream data
Previous commits went back and forth a bit on whether the various APIs
should use bytes or strings, but bytes appears to be a better answer,
because actual data in streams will always be 7-bit ASCII or raw
binary. There's no reason to apply the performance penalty of
constantly converting between bytes and strings.
One drawback now is that lots of code now has to have "b" prefixes on
strings, especially in tests, which inflates this commit quite a bit.
4 years ago
Jim Paris
1c005518d8
Remove old unicode helpers
4 years ago
Jim Paris
113633459d
Don't wait for thread to exit in __del__
This can hit a deadlock waiting for the thread to exit. We don't
need to wait; it will die when it can, or get terminated when the
interpreter exits.
4 years ago
Jim Paris
fef3e1d31e
Fix various string/bytes issues with Python 3
4 years ago
Jim Paris
b69358a185
Fix error with reraising exceptions in serializer
4 years ago
Jim Paris
5da7e6558e
Fix interval comparisons for Python 3
4 years ago
Jim Paris
1928caa1d7
Use pip version of datetime_tz; fix timestamper test
4 years ago
Jim Paris
5db034432c
Update mustclose and test_mustclose for Python 3 (this was hard!)
4 years ago
Jim Paris
55119a3e07
Port cython and C code to python 3
4 years ago
Jim Paris
a9eff10dbf
Fix 2to3 mistake
4 years ago
Jim Paris
0f5c1c0db6
Run 2to3 automatic fixes over entire tree
4 years ago
Jim Paris
78cfda32e3
Handle another exception from some versions of dateutil.parser
9 years ago
Jim Paris
0a22db3965
Ignore exceptions during __del__ handlers, which may get called during shutdown
10 years ago
Jim Paris
8bb8f068de
Catch harmless error seen in apache logs during shutdown
10 years ago
Jim Paris
06f7390c9e
Fix disk usage block size
10 years ago
Jim Paris
6de77a08f1
Report actual disk size, not apparent size
10 years ago
Jim Paris
bbd59c8b50
Add nilmdb.utils.interval.intersection by generalizing set_difference
10 years ago
Jim Paris
405c110fd7
Doc updates
10 years ago
Jim Paris
6cd28b67b1
Support iterator protocol in Serializer
10 years ago
Jim Paris
d6d215d53d
Improve boolean HTTP parameter handling
10 years ago
Jim Paris
90633413bb
Add nilmdb.utils.interval.human_string function
10 years ago
Jim Paris
c7c3aff0fb
Add nilmdb.utils.interval.optimize function
10 years ago
Jim Paris
9a2699adfc
Attempt at fixing up more Unicode issues with metadata.
11 years ago
Jim Paris
9bbb95b18b
Add unicode decode/encode helpers
11 years ago
Jim Paris
00e6ba1124
Avoid ENOENT in nilmdb.utils.diskusage.du
ENOENT might show up if we're actively deleting files in the nilmdb
thread while trying to read available space from e.g. the server
thread.
11 years ago
Jim Paris
01029230c9
Tweaks to sorting
11 years ago
Jim Paris
23f31c472b
Split sort_streams_nicely into separate file
11 years ago
Jim Paris
230ec72609
Fix timestamp display issues with --annotate
11 years ago
Jim Paris
06038062a2
Fix error in time parsing
11 years ago
Jim Paris
ae9fe89759
Parse timestamps with '@' before any other checks
11 years ago
Jim Paris
f8ca8d31e6
Remove Iteratorizer, as it's no longer needed
11 years ago
Jim Paris
3d24092cd2
Replace bare 'except:' with 'except: Exception'
Otherwise we might inadvertently catch SystemExit or KeyboardExit or
something we don't want to catch.
11 years ago
Jim Paris
c0d450d39e
Add locking mechanism to avoid multiple servers on one DB
11 years ago
Jim Paris
2d72891162
Accept "min" and "max" as timestamps on command line
11 years ago
Jim Paris
57d3d60f6a
Fix relative import problems
11 years ago
Jim Paris
7429c1788d
Update nilmdb.utils.time
11 years ago
Jim Paris
4f06d6ae68
Move Interval set_difference inside nilmdb.utils for clients
Clients might need to to Interval math too, so move a simple Interval
class and start putting helpers in there.
11 years ago
Jim Paris
955d7aa871
Remove floating port time support from nilmdb.utils.time
11 years ago
Jim Paris
90b96799ac
Bulk of the switch to int64 microsecond timestamps, including test data.
11 years ago
Jim Paris
b5541722c2
Continue moving time-handling code into nilmdb.utils.time
11 years ago
Jim Paris
aaea105861
Consolidate most timestamp <-> string conversions (outside of rocket)
11 years ago
Jim Paris
e6a081d639
Consolidate timestamp constants into nilmdb.utils.time
11 years ago
Jim Paris
1d61d61a81
Add interval.set_difference function and associated tests
11 years ago
Jim Paris
1c27dd72d6
Fill out client tests and fix various bugs
Fixes various corner cases and other bugs regarding lines with
comments, having data but no endpoints, etc.
11 years ago
Jim Paris
92724d10ba
Rework 'nilmtool insert' and some client stuff to speed up inserting data
Still needs work.
11 years ago