Uh oh!
There was an error while loading. Please reload this page.
Allow installation of current 'structlog' major version 21.x - #75
Conversation
dgarros
commented
Oct 28, 2021
Looks like there is a breaking change that we need to account for Line 45 in 3c3060f |
grelleum
commented
Nov 2, 2021
Thanks @dgarros - I will look further into this as see how these changes affects DiffSync. |
| structlog_float_version = float(".".join(structlog.__version__.split(".")[:2])) | ||
| if structlog_float_version < 21.2: | ||
| return True |
There was a problem hiding this comment.
This looks pretty gross. Can we use packaging.Version objects here instead? Something like:
frompackagingimportversionifversion.parse(structlog.__version__) <version.Version("21.2.0"):There was a problem hiding this comment.
Great suggestion - I've implemented the change.
| structlog.processors.StackInfoRenderer(), | ||
| structlog.processors.format_exc_info, | ||
| structlog.dev.ConsoleRenderer(), | ||
| ], |
There was a problem hiding this comment.
Don't we need a processors=processors, line added here?
There was a problem hiding this comment.
Indeed, it got lost somewhere in the experimentation phase. Added this back in.
grelleum
commented
Nov 23, 2021
The structlog change in 21.2.0 and above changes behavior with regards to the use of When using 21.2.0 or newer and either The code added here determines if the |
grelleum
commented
Nov 23, 2021
Found another issue in my code. It looks like |
grelleum
commented
Nov 24, 2021
For compatibility with Python 3.9, I changed: to |
dgarros
left a comment
There was a problem hiding this comment.
LGTM thank you @grelleum for the PR
@glennmatthews do you think we are good to merge ?

This PR allows using
structlogmajor version 21 to be installed withdiffsync.This fixes issue: #74
Three changes are made:
pylintversion to 2.6.x so thatinvoke testswill complete successfully after runningpoetry lock.structlogversioning to allow 20.x.x or 21.x.x. Ran complete tests to verify compatibility.poetry.lockfile to include currentstructlogversion.