Skip to content

updating communication shared code to use the isodate instead of the … #42085

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

Merged

Conversation

v-dharmarajv
Copy link
Member

…date util

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the python-dateutil library with isodate for datetime parsing across all Azure Communication Services SDK packages. The change standardizes datetime parsing using isodate.parse_datetime() instead of dateutil.parser.parse() while removing the external dependency from development requirements.

  • Updates shared token utility modules to use isodate for parsing datetime strings
  • Removes python-dateutil dependency from dev_requirements.txt files
  • Maintains consistent datetime parsing functionality across all communication service packages

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

File Description
*/dev_requirements.txt Removes python-dateutil dependency from development requirements
*/token_utils.py Replaces dateutil.parser with isodate for datetime parsing functionality

@v-dharmarajv v-dharmarajv marked this pull request as draft July 17, 2025 23:59
@cemateia
Copy link
Member

the failures in the tests pipeline should be fixed with adding this

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"

to the pyproject.toml files

image

@cemateia
Copy link
Member

I did some manual tests with the isdate change and everything works fine

@v-dharmarajv v-dharmarajv marked this pull request as ready for review July 18, 2025 19:08
@cemateia
Copy link
Member

/check-enforcer override

@v-dharmarajv v-dharmarajv enabled auto-merge (squash) July 21, 2025 17:59
@v-dharmarajv v-dharmarajv disabled auto-merge July 21, 2025 18:19
@annatisch
Copy link
Member

/check-enforcer override

@annatisch annatisch merged commit a3cc32c into main Jul 24, 2025
23 of 25 checks passed
@annatisch annatisch deleted the users/v-dharmarajv/isoDateInsteadDateUtilForCommunicationShared branch July 24, 2025 00:26
v-dharmarajv added a commit that referenced this pull request Jul 24, 2025
#42085)

* udpating communication shared code to use the isodate instead of the date util

* fixing the tests

* fix the test failure

* Updated communications dependencies

* Local transport import statements

* Use fixed offsets instead of ZoneInfo to fix tests in all environments

* addressing the comments

* changing to zoneinfo as per the comments

* Revert "changing to zoneinfo as per the comments"

This reverts commit 3e2610d.

---------

Co-authored-by: antisch <[email protected]>
Co-authored-by: Cezara Mateiasi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants