Skip to content

Simplify pyparsing dependency by requiring version >2.0.0#24

Merged
csett86 merged 6 commits into
mainfrom
copilot/reduce-external-dependencies
Jan 17, 2026
Merged

Simplify pyparsing dependency by requiring version >2.0.0#24
csett86 merged 6 commits into
mainfrom
copilot/reduce-external-dependencies

Conversation

Copilot AI commented Jan 17, 2026

Copy link
Copy Markdown

Reduces external dependencies from 8 to 7 and simplifies pyparsing version handling by requiring pyparsing >2.0.0.

Changes

  • Remove packaging: Eliminated the need for the packaging dependency by requiring pyparsing >2.0.0 directly
  • Update pyparsing requirement: Changed from pyparsing>=1.5.7 to pyparsing>2.0.0 in pyproject.toml
  • Remove version check: Removed version comparison logic and conditional syntax, now uses pyparsing 2.0+ syntax directly
  • Keep tzlocal: Maintains the existing tzlocal dependency for timezone detection

Implementation

Simplified grammar initialization (graphite_render/render/grammar.py):

# Direct use of pyparsing 2.0+ syntax - no version check needed
expression <<= Group(template | call | pathExpression)('expression')
grammar <<= expression

The version check and _compare_version() function have been completely removed since all installations are now guaranteed to have pyparsing >2.0.0.

Benefits

  • One fewer external dependency (packaging removed)
  • Cleaner, simpler code without version compatibility checks
  • Guaranteed consistent behavior across all installations
  • Reduced maintenance burden

All 486 tests pass. No security alerts.

Original prompt

Try to reduce external dependencies


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 17, 2026 14:31
Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>
…comparison edge cases

Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>
Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>
Copilot AI changed the title [WIP] Reduce external dependencies in the project Remove tzlocal and packaging dependencies Jan 17, 2026
Copilot AI requested a review from csett86 January 17, 2026 14:37
@csett86

csett86 commented Jan 17, 2026

Copy link
Copy Markdown
Owner

Keep tzlocal

@csett86

csett86 commented Jan 17, 2026

Copy link
Copy Markdown
Owner

@copilot Keep tzlocal and revert back the changes associated

Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>

Copilot AI commented Jan 17, 2026

Copy link
Copy Markdown
Author

@copilot Keep tzlocal and revert back the changes associated

Reverted tzlocal changes in commit ca6215f. The tzlocal dependency is now kept and used for timezone detection as before. The packaging dependency removal is maintained.

Copilot AI changed the title Remove tzlocal and packaging dependencies Remove packaging dependency Jan 17, 2026
@csett86

csett86 commented Jan 17, 2026

Copy link
Copy Markdown
Owner

@copilot Update pyparsing to >2.0.0 and remove the version check in the code

Co-authored-by: csett86 <1392875+csett86@users.noreply.github.com>

Copilot AI commented Jan 17, 2026

Copy link
Copy Markdown
Author

@copilot Update pyparsing to >2.0.0 and remove the version check in the code

Updated pyparsing requirement to >2.0.0 and removed the version check in commit e4a2490. The _compare_version() function has been removed, and the grammar now uses the pyparsing 2.0+ syntax directly.

Copilot AI changed the title Remove packaging dependency Simplify pyparsing dependency by requiring version >2.0.0 Jan 17, 2026
@csett86 csett86 marked this pull request as ready for review January 17, 2026 15:16
@csett86 csett86 merged commit 1914f83 into main Jan 17, 2026
11 checks passed
@csett86 csett86 deleted the copilot/reduce-external-dependencies branch January 17, 2026 15:16
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