rtmilk 3.0.2__tar.gz → 3.0.3__tar.gz

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.
Files changed (26) hide show
  1. {rtmilk-3.0.2 → rtmilk-3.0.3}/.github/workflows/ci.yml +2 -2
  2. {rtmilk-3.0.2 → rtmilk-3.0.3}/PKG-INFO +5 -5
  3. {rtmilk-3.0.2 → rtmilk-3.0.3}/pyproject.toml +6 -7
  4. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/_sansio.py +4 -2
  5. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/test_api_wrapper.py +11 -2
  6. {rtmilk-3.0.2 → rtmilk-3.0.3}/.gitignore +0 -0
  7. {rtmilk-3.0.2 → rtmilk-3.0.3}/LICENSE +0 -0
  8. {rtmilk-3.0.2 → rtmilk-3.0.3}/README.md +0 -0
  9. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/__init__.py +0 -0
  10. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/_properties.py +0 -0
  11. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/_secrets.py +0 -0
  12. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/_utils.py +0 -0
  13. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/api_async.py +0 -0
  14. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/api_base.py +0 -0
  15. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/api_sync.py +0 -0
  16. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/authorization.py +0 -0
  17. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/client.py +0 -0
  18. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/filter.py +0 -0
  19. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/mirror.py +0 -0
  20. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/models.py +0 -0
  21. {rtmilk-3.0.2 → rtmilk-3.0.3}/src/rtmilk/py.typed +0 -0
  22. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/conftest.py +0 -0
  23. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/generate_credentials.py +0 -0
  24. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/test_client.py +0 -0
  25. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/test_filter.py +0 -0
  26. {rtmilk-3.0.2 → rtmilk-3.0.3}/tests/test_mirror.py +0 -0
@@ -15,7 +15,7 @@ jobs:
15
15
  strategy:
16
16
  fail-fast: false
17
17
  matrix:
18
- python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
18
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v4
@@ -36,7 +36,7 @@ jobs:
36
36
  RTM_TOKEN: ${{ secrets.RTM_TOKEN }}
37
37
  if: ${{needs.secrets.outputs.valid}} == 'true'
38
38
  run: |
39
- if python --version | grep -q 'Python 3.13' ; then
39
+ if uv run python --version | grep -q 'Python 3.13' ; then
40
40
  uv run poe test-with-coverage
41
41
  fi
42
42
  - name: Codecov
@@ -1,19 +1,19 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: rtmilk
3
- Version: 3.0.2
3
+ Version: 3.0.3
4
4
  Summary: Remember The Milk API wrapper
5
5
  Project-URL: Homepage, https://github.com/rkhwaja/rtmilk
6
6
  Maintainer-email: Rehan Khwaja <rehan@khwaja.name>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
7
9
  Keywords: Milk,Remember,RememberTheMilk
8
10
  Classifier: Development Status :: 5 - Production/Stable
9
11
  Classifier: Intended Audience :: Developers
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Python: >=3.9
16
+ Requires-Python: >=3.10
17
17
  Requires-Dist: aiohttp>=3.9
18
18
  Requires-Dist: listdiff>=1.0.2
19
19
  Requires-Dist: pydantic>=2.8
@@ -1,23 +1,23 @@
1
1
  [project]
2
2
  name = "rtmilk"
3
- version = "3.0.2"
3
+ version = "3.0.3"
4
4
  description = "Remember The Milk API wrapper"
5
5
  maintainers = [
6
6
  { name = "Rehan Khwaja", email = "rehan@khwaja.name" }
7
7
  ]
8
8
  keywords = ["RememberTheMilk", "Remember", "Milk"]
9
9
  readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
10
12
  classifiers = [
11
- "License :: OSI Approved :: MIT License",
12
13
  "Development Status :: 5 - Production/Stable",
13
14
  "Intended Audience :: Developers",
14
- "Programming Language :: Python :: 3.9",
15
15
  "Programming Language :: Python :: 3.10",
16
16
  "Programming Language :: Python :: 3.11",
17
17
  "Programming Language :: Python :: 3.12",
18
18
  "Programming Language :: Python :: 3.13",
19
19
  ]
20
- requires-python = ">=3.9"
20
+ requires-python = ">=3.10"
21
21
  dependencies = [
22
22
  "requests>=2.23.0",
23
23
  "urllib3>=1.26; python_version>='3.10'",
@@ -48,7 +48,6 @@ coverage xml
48
48
  line-length = 1000
49
49
  lint.ignore = ["A002", "A003", "ANN", "COM812", "D", "DTZ", "EM", "ERA001", "FBT001", "FBT003", "FIX", "G004", "N802", "I", "N803", "N806", "N815", "PLR0913", "PT013", "PTH", "S101", "S311", "T20", "TCH", "TD", "TRY003", "W191"]
50
50
  lint.select = ["ALL"]
51
- target-version = "py39"
52
51
 
53
52
  [tool.ruff.lint.extend-per-file-ignores]
54
53
  "__init__.py" = ["F403"]
@@ -64,8 +63,8 @@ multiline-quotes = "single"
64
63
  pythonpath = ["src"]
65
64
  asyncio_default_fixture_loop_scope = "function"
66
65
 
67
- [tool.uv]
68
- dev-dependencies = [
66
+ [dependency-groups]
67
+ dev = [
69
68
  "pytest>=7.1",
70
69
  "pyperclip>=1.8.0",
71
70
  "python-dateutil>=2.8.1",
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from datetime import date, datetime, UTC
3
+ from datetime import date, datetime, timezone
4
4
  from hashlib import md5
5
5
  from logging import getLogger
6
6
  from pprint import pformat
@@ -223,6 +223,8 @@ class TagsGetList(AuthorizedCall):
223
223
  class TasksAdd(AuthorizedCall):
224
224
  def In(self, timeline: str, name: str, list_id: str | None = None, parse: bool | None = None, parent_task_id: str | None = None, external_id: str | None = None):
225
225
  kwargs = _RebuildArgs(list_id=list_id, parse=parse, parent_task_id=parent_task_id, external_id=external_id)
226
+ if 'parse' in kwargs:
227
+ kwargs['parse'] = '1' if kwargs['parse'] else '0'
226
228
  return self.CommonParams('rtm.tasks.add', timeline=timeline, name=name, **kwargs)
227
229
 
228
230
  @classmethod
@@ -263,7 +265,7 @@ class TasksGetList(AuthorizedCall):
263
265
  lastSyncDt = kwargs['last_sync']
264
266
  if lastSyncDt.tzinfo is not None:
265
267
  # switch to naive datetime in UTC
266
- lastSyncDt = lastSyncDt.astimezone(UTC).replace(tzinfo=None)
268
+ lastSyncDt = lastSyncDt.astimezone(timezone.utc).replace(tzinfo=None)
267
269
  kwargs['last_sync'] = _RtmDatetime(lastSyncDt)
268
270
  return self.CommonParams('rtm.tasks.getList', **kwargs)
269
271
 
@@ -1,4 +1,4 @@
1
- from datetime import datetime, timedelta, UTC
1
+ from datetime import datetime, timedelta, timezone
2
2
  from logging import info
3
3
  from random import randint
4
4
  from uuid import uuid4
@@ -97,6 +97,15 @@ def test_add_and_delete_basic_task(api, timeline):
97
97
  task.list.taskseries[0].id,
98
98
  task.list.taskseries[0].task[0].id)
99
99
 
100
+ def test_smart_add_task(api, timeline):
101
+ task = api.TasksAdd(timeline, 'Pick up the milk tomorrow', parse=1)
102
+ assert task.list.taskseries[0].name == 'Pick up the milk'
103
+ assert task.list.taskseries[0].task[0].due is not None
104
+ api.TasksDelete(
105
+ timeline, task.list.id,
106
+ task.list.taskseries[0].id,
107
+ task.list.taskseries[0].task[0].id)
108
+
100
109
  @mark.asyncio
101
110
  async def test_async_add_and_delete_basic_task(apiAsync, timeline):
102
111
  task = await apiAsync.TasksAdd(timeline, f'test_async_add_and_delete_basic_task {uuid4()}')
@@ -222,7 +231,7 @@ def test_get_list(api, task): # noqa: ARG001
222
231
  info(f'List ID: {list_.id}')
223
232
 
224
233
  def test_last_sync(api, taskCreatorAPI):
225
- start = datetime.now(UTC)
234
+ start = datetime.now(timezone.utc)
226
235
  noChange = api.TasksGetList(last_sync=start)
227
236
  assert noChange.tasks.list is None, 'No tasks added at the start'
228
237
  task1 = taskCreatorAPI.Add(f'task 1 {uuid4()}')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes