Skip to content

Resolve asset APIs#3815

Open
luhn wants to merge 5 commits into
Pylons:mainfrom
luhn:resolve-asset-api
Open

Resolve asset APIs#3815
luhn wants to merge 5 commits into
Pylons:mainfrom
luhn:resolve-asset-api

Conversation

@luhn
Copy link
Copy Markdown
Contributor

@luhn luhn commented Mar 29, 2026

This adds Configurator.resolve_asset and Request.resolve_asset methods. For #3731.

Considerations for Configurator.resolve_asset

  • Opted to put implementation in config/__init__.py, so it's next to maybe_dotted and absolute_asset_spec. Could also make sense to put in config/assets.py.
  • Set Configurator.asset_resolver at init-time rather than instantiating AssetResolver on-demand when the method is invoked.

Considerations for Request.resolve_asset:

  • Was not sure best place to put it. There wasn't a relevant mixin, so I put it in the base class. Could add potentially add AssetMethodsMixin.

luhn added 4 commits March 29, 2026 08:27
Considerations:

- Opted to put implementation in `config/__init__.py`, so it's next to
  `maybe_dotted` and `absolute_asset_spec`.  Could also make sense to
  put in `config/assets.py`.
- Set `Configurator.asset_resolver` at init-time rather than instanciating
  `AssetResolver` on-demand when the method is invoked.
Considerations:
- Was not sure best place to put it.  There wasn't a relevent mixin, so
  I put it in the base class.  Could add potentially add `AssetMethodsMixin`.
@luhn luhn force-pushed the resolve-asset-api branch from 6e2ce3a to cb2ad39 Compare March 29, 2026 07:27
@luhn luhn requested a review from mmerickel March 29, 2026 07:27
Comment thread CHANGES.rst Outdated
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.

2 participants