Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit sending null values #105

Open
EliRibble opened this issue Jan 5, 2024 · 0 comments · May be fixed by #106
Open

Permit sending null values #105

EliRibble opened this issue Jan 5, 2024 · 0 comments · May be fixed by #106

Comments

@EliRibble
Copy link

There are various places in the JMAP spec where null values should be allowed. Specific to my use case:

2.1 Mailbox/get
This is a standard “/get” method as described in [@!RFC8620], Section 5.1. The ids argument may be null to fetch all at once.

Currently if you specify:

client.request(MailboxGet(ids=None))

the serializer class will elide the ids=null that the spec allows. This is because the serializer uses None as a default value and omits it as unspecified.

It seems there are a couple possible fixes. One is to distinguish between None and Unspecified for all models. This is a big, breaking API change, but possibly more correct. The other is to add a new type that specifically permits None that could me marked on some methods. This is less invasive.

@EliRibble EliRibble linked a pull request Jan 5, 2024 that will close this issue
smkent added a commit that referenced this issue Jul 9, 2024
Applied updates from upstream project template commits:

smkent/cookie-python@ef0eb85...9404738

*   9404738 Merge pull request #106 from smkent/manage
|\
| * c3a564f Add get_branch() to mock repo response in manage unit tests
| * b4dd69d Add html_url to mock repo response in manage unit tests
| * ae30c7c Improve GitHub API/repo interactions in manage-cookie
* |   36c238b Merge pull request #105 from smkent/manage-cookie
|\ \
| |/
|/|
| * b0dc20f Update project template cruft, dependencies
|/
*   9cedf76 Merge pull request #104 from smkent/actions
|\
| * c85a1a5 Add CODECOV_TOKEN to codecov action in CI workflow
| * 6624aeb Update Github action versions
|/
*   9e52fa1 Merge pull request #103 from smkent/manage-cookie
|\
| * 36078ed Update dependencies
|/
*   9313b3e Merge pull request #102 from smkent/temp-cache-dir
|\
| * 4f47bdc Use temp dir for Poetry cache directory in manage-cookie
|/
*   95be994 Merge pull request #101 from smkent/manage-cookie
|\
| * 22e3bcf Apply automatic linting fixes
| * 4faeb9b Update dependencies
|/
* b7ed95d Merge pull request #100 from smkent/manage-cookie
* 97c1031 Update project template cruft, dependencies

Updated project dependencies via `poetry update`:

Package operations: 1 install, 29 updates, 1 removal

- Removing setuptools (69.1.1)
- Updating certifi (2024.2.2 -> 2024.7.4)
- Updating idna (3.6 -> 3.7)
- Updating pygments (2.17.2 -> 2.18.0)
- Updating types-python-dateutil (2.8.19.20240106 -> 2.9.0.20240316)
- Updating urllib3 (2.2.1 -> 2.2.2)
- Updating filelock (3.13.1 -> 3.15.4)
- Updating jinja2 (3.1.3 -> 3.1.4)
- Updating platformdirs (4.2.0 -> 4.2.2)
- Updating pluggy (1.4.0 -> 1.5.0)
- Updating requests (2.31.0 -> 2.32.3)
- Updating typing-extensions (4.10.0 -> 4.12.2)
- Updating packaging (23.2 -> 24.1)
- Installing shellingham (1.5.4)
- Updating coverage (7.4.3 -> 7.5.4)
- Updating gitpython (3.1.42 -> 3.1.43)
- Updating identify (2.5.35 -> 2.6.0)
- Updating nodeenv (1.8.0 -> 1.9.1)
- Updating typer (0.9.0 -> 0.12.3)
- Updating marshmallow (3.21.1 -> 3.21.3)
- Updating pytest (8.0.2 -> 8.2.2)
- Updating virtualenv (20.25.1 -> 20.26.3)
- Updating bandit (1.7.7 -> 1.7.9)
- Updating black (24.2.0 -> 24.4.2)
- Updating dataclasses-json (0.6.4 -> 0.6.7)
- Updating mypy (1.8.0 -> 1.10.1)
- Updating pep8-naming (0.13.3 -> 0.14.1)
- Updating poethepoet (0.25.0 -> 0.27.0)
- Updating pytest-cov (4.1.0 -> 5.0.0)
- Updating responses (0.25.0 -> 0.25.3)
- Updating types-requests (2.31.0.20240218 -> 2.32.0.20240622)

Writing lock file
smkent added a commit that referenced this issue Jul 9, 2024
Applied updates from upstream project template commits:

smkent/cookie-python@ef0eb85...dee411e

*   dee411e Merge pull request #107 from smkent/poetry
|\
| * 42c4a3b Update Poetry to version 1.8 in CI workflows
* |   8831a68 Merge pull request #108 from smkent/manage
|\ \
| |/
|/|
| * 296f6b5 Fix CODECOV_TOKEN reference rendering in template CI workflow
|/
*   9404738 Merge pull request #106 from smkent/manage
|\
| * c3a564f Add get_branch() to mock repo response in manage unit tests
| * b4dd69d Add html_url to mock repo response in manage unit tests
| * ae30c7c Improve GitHub API/repo interactions in manage-cookie
* |   36c238b Merge pull request #105 from smkent/manage-cookie
|\ \
| |/
|/|
| * b0dc20f Update project template cruft, dependencies
|/
*   9cedf76 Merge pull request #104 from smkent/actions
|\
| * c85a1a5 Add CODECOV_TOKEN to codecov action in CI workflow
| * 6624aeb Update Github action versions
|/
*   9e52fa1 Merge pull request #103 from smkent/manage-cookie
|\
| * 36078ed Update dependencies
|/
*   9313b3e Merge pull request #102 from smkent/temp-cache-dir
|\
| * 4f47bdc Use temp dir for Poetry cache directory in manage-cookie
|/
*   95be994 Merge pull request #101 from smkent/manage-cookie
|\
| * 22e3bcf Apply automatic linting fixes
| * 4faeb9b Update dependencies
|/
* b7ed95d Merge pull request #100 from smkent/manage-cookie
* 97c1031 Update project template cruft, dependencies

Updated project dependencies via `poetry update`:

Package operations: 1 install, 29 updates, 1 removal

- Removing setuptools (69.1.1)
- Updating certifi (2024.2.2 -> 2024.7.4)
- Updating idna (3.6 -> 3.7)
- Updating pygments (2.17.2 -> 2.18.0)
- Updating types-python-dateutil (2.8.19.20240106 -> 2.9.0.20240316)
- Updating urllib3 (2.2.1 -> 2.2.2)
- Updating filelock (3.13.1 -> 3.15.4)
- Updating jinja2 (3.1.3 -> 3.1.4)
- Updating packaging (23.2 -> 24.1)
- Updating pluggy (1.4.0 -> 1.5.0)
- Installing shellingham (1.5.4)
- Updating platformdirs (4.2.0 -> 4.2.2)
- Updating requests (2.31.0 -> 2.32.3)
- Updating typing-extensions (4.10.0 -> 4.12.2)
- Updating coverage (7.4.3 -> 7.5.4)
- Updating gitpython (3.1.42 -> 3.1.43)
- Updating identify (2.5.35 -> 2.6.0)
- Updating marshmallow (3.21.1 -> 3.21.3)
- Updating nodeenv (1.8.0 -> 1.9.1)
- Updating pytest (8.0.2 -> 8.2.2)
- Updating typer (0.9.0 -> 0.12.3)
- Updating virtualenv (20.25.1 -> 20.26.3)
- Updating bandit (1.7.7 -> 1.7.9)
- Updating black (24.2.0 -> 24.4.2)
- Updating dataclasses-json (0.6.4 -> 0.6.7)
- Updating mypy (1.8.0 -> 1.10.1)
- Updating pep8-naming (0.13.3 -> 0.14.1)
- Updating poethepoet (0.25.0 -> 0.27.0)
- Updating pytest-cov (4.1.0 -> 5.0.0)
- Updating responses (0.25.0 -> 0.25.3)
- Updating types-requests (2.31.0.20240218 -> 2.32.0.20240622)

Writing lock file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant