Skip to content

json/form/text - remove pendulum dependency #448

@baywet

Description

@baywet

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:

  • implement a static function parseTimeDeltaFromIsoFormat in abstractions use the duration ABNF from RFC 3339
  • replace all calls to pendulum by the equivalent BCL/abstractions methods
  • remove the dependency from the packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WIPenhancementNew feature or requesthelp wantedGood candidate for a pull requestpriority:p1High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7daystype:enhancementEnhancement request targeting an existing experience

    Projects

    Status

    Done ✔️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions