Skip to content

Template globals not accessible within imported macros#1495

Merged
davidism merged 1 commit intopallets:3.0.xfrom
daniel-stoneuk:patch-async-globals
Oct 4, 2021
Merged

Template globals not accessible within imported macros#1495
davidism merged 1 commit intopallets:3.0.xfrom
daniel-stoneuk:patch-async-globals

Conversation

@daniel-stoneuk
Copy link
Copy Markdown

  • Pass context to _get_default_module_async to provide template globals to imports.
  • Added tests.
  • Refactored existing and new import global tests to use existing fixtures.
  • Copied CHANGES.rst entry from Fix bug with imported macros and template globals #1241 since it best described the fix.

Relevant issues and PRs:

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@daniel-stoneuk
Copy link
Copy Markdown
Author

These tests look like they're failing due to a bug with 3.9.7 since the library's usage looks fine.

https://bugs.python.org/issue45097

@davidism davidism linked an issue Sep 26, 2021 that may be closed by this pull request
@davidism davidism added this to the 3.0.2 milestone Oct 4, 2021
@davidism davidism force-pushed the patch-async-globals branch from 1e6c789 to 629c244 Compare October 4, 2021 20:43
@davidism davidism force-pushed the patch-async-globals branch from 629c244 to baff54f Compare October 4, 2021 20:49
@davidism davidism merged commit 355ef53 into pallets:3.0.x Oct 4, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Template globals are not accessible within imports w/ enable_async

2 participants