dycw-utilities 0.162.2__py3-none-any.whl → 0.162.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dycw-utilities
3
- Version: 0.162.2
3
+ Version: 0.162.4
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.12
@@ -16,7 +16,7 @@ Requires-Dist: hypothesis<6.139,>=6.138.2; extra == 'test'
16
16
  Requires-Dist: pytest-asyncio<1.2,>=1.1.0; extra == 'test'
17
17
  Requires-Dist: pytest-cov<6.3,>=6.2.1; extra == 'test'
18
18
  Requires-Dist: pytest-instafail<0.6,>=0.5.0; extra == 'test'
19
- Requires-Dist: pytest-lazy-fixtures<1.4,>=1.3.3; extra == 'test'
19
+ Requires-Dist: pytest-lazy-fixtures<1.4,>=1.3.4; extra == 'test'
20
20
  Requires-Dist: pytest-randomly<3.17,>=3.16.0; extra == 'test'
21
21
  Requires-Dist: pytest-regressions<2.9,>=2.8.2; extra == 'test'
22
22
  Requires-Dist: pytest-repeat<0.10,>=0.9.4; extra == 'test'
@@ -1,4 +1,4 @@
1
- utilities/__init__.py,sha256=1BMqyPquxXnh8RKd9q0l_5OhFj85DjpVjSCebVKh1gQ,60
1
+ utilities/__init__.py,sha256=o6nUgPOHpIQS5SGb2XacqWt_oRNjojYulv7Rb46uZ2o,60
2
2
  utilities/aeventkit.py,sha256=ddoleSwW9zdc2tjX5Ge0pMKtYwV_JMxhHYOxnWX2AGM,12609
3
3
  utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
4
4
  utilities/asyncio.py,sha256=PUedzQ5deqlSECQ33sam9cRzI9TnygHz3FdOqWJWPTM,15288
@@ -39,7 +39,7 @@ utilities/more_itertools.py,sha256=syfIPhQF_WS-YiicdGe2h5F1G-Ld12Q2XsVduL2hA40,1
39
39
  utilities/numpy.py,sha256=Xn23sA2ZbVNqwUYEgNJD3XBYH6IbCri_WkHSNhg3NkY,26122
40
40
  utilities/operator.py,sha256=nhxn5q6CFNzUm1wpTwWPCu9JGCqVHSlaJf0o1-efoII,3616
41
41
  utilities/optuna.py,sha256=C-fhWYiXHVPo1l8QctYkFJ4DyhbSrGorzP1dJb_qvd8,1933
42
- utilities/orjson.py,sha256=Ll0U172ITMqOJc3kjV90C0eI-EWzSXlMHSdUBaUSe80,41499
42
+ utilities/orjson.py,sha256=QKodAoG0tFEJ8l6TUVFq7ZB9PSlKtRek8H5fOnIgMBc,41541
43
43
  utilities/os.py,sha256=8TjFLVWlGhhEpzZ0X_vNAyhYntjeVL5WTwaQcdTaNVw,3934
44
44
  utilities/parse.py,sha256=JcJn5yXKhIWXBCwgBdPsyu7Hvcuw6kyEdqvaebCaI9k,17951
45
45
  utilities/pathlib.py,sha256=qGuU8XPmdgGpy8tOMUgelfXx3kxI8h9IaV3TI_06QGE,8428
@@ -87,8 +87,8 @@ utilities/zoneinfo.py,sha256=tdIScrTB2-B-LH0ukb1HUXKooLknOfJNwHk10MuMYvA,3619
87
87
  utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
88
88
  utilities/pytest_plugins/pytest_randomly.py,sha256=B1qYVlExGOxTywq2r1SMi5o7btHLk2PNdY_b1p98dkE,409
89
89
  utilities/pytest_plugins/pytest_regressions.py,sha256=9v8kAXDM2ycIXJBimoiF4EgrwbUvxTycFWJiGR_GHhM,1466
90
- dycw_utilities-0.162.2.dist-info/METADATA,sha256=TL_z4m1KzcD0rapLtZJihbKMla6KtQoE5fvulbKJkyE,1643
91
- dycw_utilities-0.162.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
92
- dycw_utilities-0.162.2.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
93
- dycw_utilities-0.162.2.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
94
- dycw_utilities-0.162.2.dist-info/RECORD,,
90
+ dycw_utilities-0.162.4.dist-info/METADATA,sha256=IKECWa-zL_Rt2lFuNserGqVQ2QgXJh83tkoYOz5MEDM,1643
91
+ dycw_utilities-0.162.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
92
+ dycw_utilities-0.162.4.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
93
+ dycw_utilities-0.162.4.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
94
+ dycw_utilities-0.162.4.dist-info/RECORD,,
utilities/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.162.2"
3
+ __version__ = "0.162.4"
utilities/orjson.py CHANGED
@@ -218,9 +218,7 @@ def _pre_process(
218
218
  case ZonedDateTime() as date_time:
219
219
  return f"[{_Prefixes.zoned_date_time.value}]{date_time}"
220
220
  case ZonedDateTimePeriod() as period:
221
- return (
222
- f"[{_Prefixes.zoned_date_time_period.value}]{period.start},{period.end}"
223
- )
221
+ return f"[{_Prefixes.zoned_date_time_period.value}]{period.start.to_plain()},{period.end}"
224
222
  case dt.datetime() as py_datetime:
225
223
  match py_datetime.tzinfo:
226
224
  case None:
@@ -512,9 +510,9 @@ def _object_hook(
512
510
  if match := _ZONED_DATE_TIME_PATTERN.search(text):
513
511
  return ZonedDateTime.parse_common_iso(match.group(1))
514
512
  if match := _ZONED_DATE_TIME_PERIOD_PATTERN.search(text):
515
- start, end = map(
516
- ZonedDateTime.parse_common_iso, match.group(1).split(",")
517
- )
513
+ start, end = match.group(1).split(",")
514
+ end = ZonedDateTime.parse_common_iso(end)
515
+ start = PlainDateTime.parse_common_iso(start).assume_tz(end.tz)
518
516
  return ZonedDateTimePeriod(start, end)
519
517
  if (
520
518
  exc_class := _object_hook_exception_class(