Conversation
REASON: DOCKER IS BROKEN This reverts commit 289719b.
There was a problem hiding this comment.
Pull request overview
This PR updates SSVC’s namespace-pattern regex implementation to avoid runtime code generation and removes the abnf-to-regexp dependency, aiming to fix local/Docker builds by simplifying dependencies and pinning a docs-related package version.
Changes:
- Replaced runtime ABNF-to-regex generation with a statically inlined, generated regex component block for namespace parsing.
- Removed
abnf-to-regexpfrom project dependencies and corresponding imports. - Added an upper-bound pin for
mkdocstrings-pythonto avoid incompatibilities with newer releases.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/ssvc/utils/patterns.py |
Removes abnf-to-regexp usage and embeds the generated namespace regex code directly. |
pyproject.toml |
Drops abnf-to-regexp dependency and pins mkdocstrings-python with an upper bound. |
| "mkdocs-material-extensions>=1.3.1", | ||
| "mkdocstrings>=0.30.0", | ||
| "mkdocstrings-python>=1.17.0", | ||
| "mkdocstrings-python<=2.0.3", |
There was a problem hiding this comment.
mkdocstrings-python is now only constrained with an upper bound (<=2.0.3). Dropping the previous lower bound can allow dependency resolution to pick an older (potentially incompatible) mkdocstrings-python release, which can break docs builds. Consider restoring a lower bound (e.g., keep the prior >=1.17.0 while adding the new max) so the supported range is explicit.
| "mkdocstrings-python<=2.0.3", | |
| "mkdocstrings-python>=1.17.0,<=2.0.3", |
Fix local build and docker build
This pull request makes several dependency and codebase changes to remove the use of the
abnf-to-regexplibrary and instead directly include the generated regular expression code for parsing namespace patterns. This simplifies the codebase and reduces external dependencies.Dependency and import changes:
abnf-to-regexpdependency from both thepyproject.tomldependencies list and from imports insrc/ssvc/utils/patterns.py. ([[1]](https://github.com/CERTCC/SSVC/pull/1102/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L51),[[2]](https://github.com/CERTCC/SSVC/pull/1102/files#diff-b97f367a184861197f4c084fc982264a59150a04247f931c349524d9e26eeadcL24-L27))Pattern generation refactor:
abnf-to-regexpat runtime) with a static, directly-included Python section containing the generated regex code for namespace patterns insrc/ssvc/utils/patterns.py. ([src/ssvc/utils/patterns.pyL44-R73](https://github.com/CERTCC/SSVC/pull/1102/files#diff-b97f367a184861197f4c084fc982264a59150a04247f931c349524d9e26eeadcL44-R73))Dependency version pinning:
mkdocstrings-pythondependency to a maximum version of2.0.3inpyproject.tomlto avoid incompatibilities with newer versions. ([pyproject.tomlL36-R36](https://github.com/CERTCC/SSVC/pull/1102/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L36-R36))