-
Notifications
You must be signed in to change notification settings - Fork 14
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
json/form/text - remove pendulum dependency #448
Labels
enhancement
New feature or request
help wanted
Good candidate for a pull request
priority:p1
High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7days
type:enhancement
Enhancement request targeting an existing experience
WIP
Comments
@svrooij Is this something you'd like to submit a pull request for provided some guidance? |
@baywet I would, but I have no idea what I'm doing python wise 😄 Let's see what Github Copilot workspace has to say about this issue. |
svrooij
added a commit
to svrooij/kiota-python
that referenced
this issue
Jan 14, 2025
Fixes microsoft#448 Remove the `pendulum` dependency and replace it with equivalent BCL/abstractions methods. * **Add `parseTimeDeltaFromIsoFormat` function**: - Implement a static function `parseTimeDeltaFromIsoFormat` in `packages/abstractions/kiota_abstractions/utils.py` to parse ISO 8601 duration strings. - Add import for `re` module. * **Replace `pendulum` calls**: - Replace `pendulum.parse` calls with equivalent BCL/abstractions methods in `packages/serialization/form/kiota_serialization_form/form_parse_node.py`. - Replace `pendulum.parse` calls with equivalent BCL/abstractions methods in `packages/serialization/json/kiota_serialization_json/json_parse_node.py`. * **Remove `pendulum` dependency**: - Remove `pendulum` dependency from `packages/serialization/form/pyproject.toml`. - Remove `pendulum` dependency from `packages/serialization/json/pyproject.toml`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/kiota-python/issues/448?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
help wanted
Good candidate for a pull request
priority:p1
High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7days
type:enhancement
Enhancement request targeting an existing experience
WIP
related #348
Pendulum is a fairly heavy dependency (requires cargo at install???), which maintenance over time doesn't see guaranteed (author fatigue).
We have only 3 (non-test) files making references to this dependency, with a total of 12 references to parsing functions.
https://github.com/search?q=repo%3Amicrosoft%2Fkiota-python+pendulum+language%3APython+NOT+path%3A%2F%5Epackages%5C%2Fserialization%5C%2Fjson%5C%2Ftests%5C%2Funit%5C%2F%2F+NOT+path%3A%2F%5Epackages%5C%2Fserialization%5C%2Fform%5C%2Ftests%5C%2Funit%5C%2F%2F&type=code&l=Python
Except for time delta, all those parsing functions have equivalents in the main python BCL.
https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat
https://docs.python.org/3/library/datetime.html#datetime.time.fromisoformat
https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat
Here are the steps to take:
The text was updated successfully, but these errors were encountered: