Skip to content

Conversation

@gandiddi
Copy link
Contributor

@gandiddi gandiddi commented Aug 26, 2024

Fixes #2111, #2112

Description

Fixed DeprecationWarning in Python 3.13.0rc1

Specific Changes

Below is the list of deprecation warnings/errors:

  1. ModuleNotFoundError: No module named 'pkg_resources'

    • Added setuptools==72.1.0 in /libraries/botframework-connector/tests/requirements.txt
  2. ModuleNotFoundError: No module named '_sha256'

    • Changed _sha256 to hashlib in telemetry_processor.py
  3. ModuleNotFoundError: No module named 'cgi'

    • Updated the older Django 3.2.24 version to Django 4.2.15
  4. TypeError: 'NoneType' object is not subscriptable

    • Handled 'NoneType' error in the 'oauth_prompt.py'
  5. DeprecationWarning: datetime.datetime.utcnow(), datetime.datetime.utcfromtimestamp() is deprecated

    • Used datetime.now(), datetime.fromtimestamp() with UTC instead.
  6. DeprecationWarning: The object should be created within an async function

    • Updated pytest-asyncio version to 0.23.8
  7. DeprecationWarning: There is no current event loop

    • Creating a new event loop object, if there is no running event loop.
  8. DeprecationWarning: It is deprecated to return a value that is not None from a test case

    • Removed non-'None' return values from the test case
  9. RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited

    • Updated async method calls to ensure they are awaited.

Testing

Ran the pip install commands and pytest in the following Python versions, and they are working as expected
Python 3.13.0rc1, 3.12.5, 3.11.7, 3.10.11, 3.9.13, 3.8.10

@gandiddi gandiddi requested a review from a team as a code owner August 26, 2024 18:33
@gandiddi gandiddi changed the title python313 deprecation warnings Fixing python313 deprecation warnings Aug 26, 2024
@gandiddi gandiddi requested a review from tracyboehrer August 26, 2024 18:48
@tracyboehrer tracyboehrer merged commit bb1561e into main Sep 4, 2024
@tracyboehrer tracyboehrer deleted the v-gandiddi/Python313DeprecationWarnings branch September 4, 2024 15:33
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 this pull request may close these issues.

Correct deprecation warnings around ClientSession

3 participants