jertel / elastalert2

ElastAlert 2 is a continuation of the original yelp/elastalert project. Pull requests are appreciated!
https://elastalert2.readthedocs.org
Apache License 2.0
922 stars 287 forks source link

upgrade to Python 3.12 #1327

Closed jertel closed 10 months ago

jertel commented 10 months ago

Description

Upgrade to Python 3.12 and correct unit tests that broke.

Checklist

Questions or Comments

jertel commented 10 months ago

Still pending: replacement of utcnow(). This isn't critical but would be nice to finish it now versus waiting.

jertel commented 10 months ago

Update: I've resolved the majority of the deprecation notices. There are still a few remaining:

python_dateutil - this package appears to have been abandoned. There hasn't been an update in years. I've removed some references to it but there are about 4 remaining that will need to be refactored away from dateutil.

botocore - there is an open issue tracking this deprecation: https://github.com/boto/boto3/issues/3889

tencentcloud - I don't see any signs that the team maintaining that project is aware of the deprecation. In fact it looks like they are only certified with Python 3.10. This is the line causing the deprecation: https://github.com/TencentCloud/tencentcloud-sdk-python/blob/4c3ac77e720958029de11d3cd0f55da5fdcbf5b8/tencentcloud/common/abstract_client.py#L209

I think this PR is sufficient for the next release. A separate effort can resume the deprecation resolutions later.

nsano-rururu commented 10 months ago

It seems that python-dateutil has been merging merge requests recently, but as you said, there is no sign that a new version will be released.

nsano-rururu commented 7 months ago

@jertel

python_dateutil - this package appears to have been abandoned. There hasn't been an update in years. I've removed some references to it but there are about 4 remaining that will need to be refactored away from dateutil.

It seems that dateutil has been updated. It seems that there was also a response to the deprecation warning of python3.12.

https://github.com/dateutil/dateutil/releases

jertel commented 7 months ago

Thanks. Updated in #1388.