Skip to content

Bump structlog to 26.1.0 and drop WRITE_LOCKS workaround - #68168

Closed
wjddn279 wants to merge 2 commits into
apache:mainfrom
wjddn279:remove-temporal-logic-and-update-struclog
Closed

Bump structlog to 26.1.0 and drop WRITE_LOCKS workaround#68168
wjddn279 wants to merge 2 commits into
apache:mainfrom
wjddn279:remove-temporal-logic-and-update-struclog

Conversation

@wjddn279

Copy link
Copy Markdown
Contributor

related: #65121

As the struclog release the version (26.1.0, https://github.com/hynek/structlog/releases/tag/26.1.0) including the fix of the issue, remove the workaround and bump the version constraint


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@wjddn279

Copy link
Copy Markdown
ContributorAuthor

waiting until exclude-newer = "4 days" and it maybe 6/10

@wjddn279
wjddn279force-pushed the remove-temporal-logic-and-update-struclog branch 2 times, most recently from ad75d24 to eae215aCompareJune 11, 2026 13:07
@wjddn279
wjddn279 marked this pull request as ready for review June 11, 2026 14:49
@wjddn279
wjddn279force-pushed the remove-temporal-logic-and-update-struclog branch 3 times, most recently from ce510ca to ae4353dCompareJune 12, 2026 08:10
@wjddn279wjddn279 changed the title Remove the structlog workaround and bump the version constraintBump structlog to 26.1.0 and drop WRITE_LOCKS workaroundJun 12, 2026
@uranusjr

Copy link
Copy Markdown
Member

I believe only the shared logging package’s dependency needs bumping. But it’s not a bad idea to keep everything in sync.

@amoghrajeshamoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@uranusjr if we bump the shared package's version, we have a prek hook that synchronises it for all consuming packages

@ashbashb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have produced changes to uv.lock too

@wjddn279
wjddn279force-pushed the remove-temporal-logic-and-update-struclog branch from 3b9c313 to 2998db5CompareJune 13, 2026 09:21
structlog 26.1.0 ships the upstream fix for file-descriptor write
locks leaking after their file is closed, which Airflow previously
worked around by swapping structlog's WRITE_LOCKS dict for a
WeakKeyDictionary at logging-configuration time.
Now that the fix is released, remove that monkey-patch and raise the
structlog lower bound to >=26.1.0 across all distributions so the
workaround is no longer required.
@wjddn279
wjddn279force-pushed the remove-temporal-logic-and-update-struclog branch from 2998db5 to a4247f5CompareJune 13, 2026 13:38
@potiukpotiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 17, 2026
@wjddn279

Copy link
Copy Markdown
ContributorAuthor

@ashb@amoghrajesh@uranusjr

I think it is ok to merge

"msgspec>=0.19.0",
"pygtrie>=2.5.0",
"structlog>=25.4.0",
"structlog>=26.1.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This landed on main earlier today as #70694, which bumps the same eight distributions to structlog>=26.1.0 and removes the same WRITE_LOCKS monkeypatch from configure_logging along with the import weakref. Against main at 724aaad the remaining delta here is zero, so I think this can be closed. #70694 went a bit further and also raised croniter to 6.2.2 and dropped the _BYTES_LOGGER_HAS_NAME fallback that goes dead at the new structlog floor.

Apologies this sat for seven weeks after three approvals -- you spotted the fix first.

@kaxilkaxil closed this Jul 30, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@wjddn279@uranusjr@ashb@kaxil@amoghrajesh@potiuk