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.0rc1
Specific Changes
Below is the list of deprecation warnings/errors:
ModuleNotFoundError: No module named 'pkg_resources'
setuptools==72.1.0
in/libraries/botframework-connector/tests/requirements.txt
ModuleNotFoundError: No module named '_sha256'
_sha256
tohashlib
intelemetry_processor.py
ModuleNotFoundError: No module named 'cgi'
Django 3.2.24
version toDjango 4.2.15
TypeError: 'NoneType' object is not subscriptable
Handled 'NoneType' error in the 'oauth_prompt.py'
DeprecationWarning: datetime.datetime.utcnow(), datetime.datetime.utcfromtimestamp() is deprecated
datetime.now()
,datetime.fromtimestamp()
withUTC
instead.DeprecationWarning: The object should be created within an async function
pytest-asyncio
version to0.23.8
DeprecationWarning: There is no current event loop
DeprecationWarning: It is deprecated to return a value that is not None from a test case
RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
Testing
Ran the
pip install
commands andpytest
in 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