Skip to content
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

Chore/update structlog #276

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

jamesharr
Copy link
Contributor

datetime.utcnow() is deprecated in Python 3.12, but is still being used in structlog. Structlog release 23.2.0 fixes this. This PR relaxes the structlog version requirement to allow for up to version 24.x, which will get rid of the warning.

Another thing to consider is that DiffSync's use of structlog is pretty basic and structlog's API is pretty stable from the perspective of something generating log messages. Most of the changes pertain to log processors and log configuration, so it might be worth considering removing the max version for structlog. If this is acceptable, I can update the PR to remove the upper version restriction.

@glennmatthews
Copy link
Collaborator

Looks like maybe your branch isn't up to date with develop and has some merge conflicts as a result. Otherwise, this looks like a very reasonable change. Thanks!

@jamesharr jamesharr force-pushed the chore/update-structlog branch from 6e33977 to e927536 Compare July 17, 2024 15:58
@jamesharr
Copy link
Contributor Author

With regards to removing the upper-bound structlog version, I was the last one to upgrade structlog in #211 :P

@jamesharr jamesharr force-pushed the chore/update-structlog branch 2 times, most recently from e2fafdf to 5ad293f Compare July 17, 2024 16:02
@jamesharr
Copy link
Contributor Author

Looks like maybe your branch isn't up to date with develop and has some merge conflicts as a result. Otherwise, this looks like a very reasonable change. Thanks!

Alright, third time is charm on the rebase. Helps if you rebase off the correct upstream branch

@glennmatthews
Copy link
Collaborator

Given that structlog uses CalVer instead of SemVer, I'm cautiously OK with removing the upper bound there.

If you don't want to handle all of the changes needed to correspond to updates to linters (bandit etc.) then reverting the poetry.lock and just doing only poetry update structlog should result in a smaller set of diffs there.

@jamesharr jamesharr force-pushed the chore/update-structlog branch from 6404a79 to d4c159d Compare July 17, 2024 18:57
@Kircheneer Kircheneer merged commit ce0cf04 into networktocode:develop Jul 23, 2024
17 checks passed
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.

3 participants