Fixing python313 deprecation warnings #2159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2111, #2112
Description
Fixed DeprecationWarning in Python
3.13.0rc1Specific Changes
Below is the list of deprecation warnings/errors:
ModuleNotFoundError: No module named 'pkg_resources'setuptools==72.1.0in/libraries/botframework-connector/tests/requirements.txtModuleNotFoundError: No module named '_sha256'_sha256tohashlibintelemetry_processor.pyModuleNotFoundError: No module named 'cgi'Django 3.2.24version toDjango 4.2.15TypeError: 'NoneType' object is not subscriptableHandled 'NoneType' error in the 'oauth_prompt.py'DeprecationWarning: datetime.datetime.utcnow(), datetime.datetime.utcfromtimestamp() is deprecateddatetime.now(),datetime.fromtimestamp()withUTCinstead.DeprecationWarning: The object should be created within an async functionpytest-asyncioversion to0.23.8DeprecationWarning: There is no current event loopDeprecationWarning: It is deprecated to return a value that is not None from a test caseRuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaitedTesting
Ran the
pip installcommands andpytestin the following Python versions, and they are working as expectedPython 3.13.0rc1, 3.12.5, 3.11.7, 3.10.11, 3.9.13, 3.8.10