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

Create a new type for the current document's environment state #13151

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

AA-Turner
Copy link
Member

Feature or Bugfix

  • Refactoring

Purpose

As a step towards #13072, this PR introduces a new CurrentDocument type to store and manipulate state in the environment for the document currently being read. This is currently stored in a temp_data dict.

We also rename the attribute on BuildEnvironment to current_document from temp_data, keeping the old name as an alias.

At present, none of the old names or e.g. the mapping interface to CurrentDocument are deprecated, though I expect that in the future this would be done.

For downstream extensions that make use of env.temp_data['...'], this should be a transparent refactor.

xref:

@AA-Turner AA-Turner added this to the 8.2.0 milestone Nov 22, 2024
Sign up for free to 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.

1 participant