Skip to content

improve ABNF pattern integration: add autogeneration via Makefile#1065

Closed
bernhardreiter wants to merge 2 commits intoCERTCC:mainfrom
csaf-auxiliary:automate-abnf-to-python
Closed

improve ABNF pattern integration: add autogeneration via Makefile#1065
bernhardreiter wants to merge 2 commits intoCERTCC:mainfrom
csaf-auxiliary:automate-abnf-to-python

Conversation

@bernhardreiter
Copy link
Copy Markdown
Contributor

  • add abnf-to-regexp as requirement
  • split namespace_patterns.py out from patterns.py as file that can be generated fully
  • add Makefile rule
  • add autogeneration warning to namespace_patterns.py

resolve #899

 * add abnf-to-regexp as requirement
 * split namespace_patterns.py out from patterns.py as file that can
   be generated fully
 * add Makefile rule
 * add autogeneration warning to namespace_patterns.py

resolve CERTCC#899
@bernhardreiter
Copy link
Copy Markdown
Contributor Author

/!\ only merge either #1067 or this request.

@ahouseholder
Copy link
Copy Markdown
Contributor

Intend to merge #1067

@ahouseholder ahouseholder reopened this Mar 27, 2026
ahouseholder added a commit that referenced this pull request Mar 27, 2026
… namespace_patterns.py

- Move abnf-to-regexp from runtime to dev dependency group in pyproject.toml
- Replace dynamic ABNF parsing in patterns.py with static import from
  namespace_patterns.py (no runtime dependency on abnf-to-regexp)
- Add namespace_patterns.py with pre-generated static regex patterns
- Add Makefile rule to regenerate namespace_patterns.py from ABNF source
- Add --no-dev to 'uv sync --frozen' in Dockerfile dependencies stage so
  abnf-to-regexp (and its sdist-only regex==2021.4.4 dep) are not installed
  in production images
- Add gcc+libc-dev to test stage for compiling regex when running dev sync

Fixes docker-compose --project-directory docker build --no-cache

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ahouseholder
Copy link
Copy Markdown
Contributor

Captured this branch into #1101

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.

Automate ABNF to python namespace patterns

2 participants