Commit 3f7a145
committed
internal: change datetime implementation
Rework our implementation of tarantool.Datetime class. Previously it had
relied on pandas.Timestamp and pandas.Timedelta. There were user
complaints about pandas as a requirement since it's rather heavy. Now
our implementation of datetime uses built-in datetime.datetime,
datetime.timedelta and other built-in tools.
It is expected that the implementation change wouldn't affect users, but
some minor behavior traits were broken in this patch:
- Now we rely on datetime argument validation which if differs from
pandas one. For example, it doesn't allow overflows for fields.
Exceptions that user may receive from internal datetime are, of
course, had changed as well.
- We drop the support of `__eq__` for pandas.Timestamp. We simply
compared underlying pandas.Timestamp with argument one, and now it's
impossible. If the feature would be required later, we may implement
its comparison in some compatible way.
- `__repr__` has been changed since internal representation has been
changed as well.
Closes #2901 parent 4bdbdda commit 3f7a145
File tree
6 files changed
+286
-87
lines changed- docs/source
- rpm/SPECS
- tarantool/msgpack_ext/types
- test/suites
6 files changed
+286
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
0 commit comments