Skip to content

fromisotime cleanup when 3.11 is Python miniumum #304

Description

@phanak-sap

Matrix builds for #303 exposed change in fromisotime for fractional-seconds between Python 3.10 and 3.11. Since 3.10 EOL is quite soon, adding what can be changed when support for 3.10 will be dropped as well.

Cleanup tasks for when Python 3.11 becomes minimum version

  • parse_datetime_literal in pyodata/v2/model.py: remove fractional-seconds padding workaround (the if '.' in value block), fromisoformat accepts any number of fractional digits in 3.11+
  • EdmDateTimeOffsetTypTraits.from_literal in pyodata/v2/model.py: remove fractional-seconds padding workaround (the if '.' in normalized block) for the same reason
  • EdmDateTimeOffsetTypTraits.from_literal: remove the .replace('Z', '+00:00') normalisation, fromisoformat accepts Z natively in 3.11+

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions