Skip to content

Use non-deprecated pyparsing methods#3362

Merged
edmondchuc merged 11 commits intoRDFLib:7.xfrom
rafguns:issue3361
Feb 13, 2026
Merged

Use non-deprecated pyparsing methods#3362
edmondchuc merged 11 commits intoRDFLib:7.xfrom
rafguns:issue3361

Conversation

@rafguns
Copy link
Copy Markdown

@rafguns rafguns commented Jan 7, 2026

Summary of changes

This PR fixes #3361 by changing the deprecated methods from pyparsing to the PEP8-compliant, non-deprecated ones.

These methods are available since pyparsing 3.0.0. Since rdflib requires pyparsing >=3.2.0,<4, this change is backwards compatible.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
    7612 passed, 591 skipped, 330 xfailed, 36 xpassed, 36000 warnings in 121.93s (0:02:01)
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@edmondchuc edmondchuc changed the base branch from main to 7.x February 13, 2026 01:22
@edmondchuc
Copy link
Copy Markdown
Contributor

I've updated the PR to preserve handling of empty solutions in 70fe2f7.

@edmondchuc
Copy link
Copy Markdown
Contributor

I've rebased the commits onto 7.x and updated the target branch, assuming the change would be non-breaking.

However, I’m not sure the compatibility claim holds:

These methods are available since pyparsing 3.0.0. Since rdflib requires pyparsing >=3.2.0,<4, this change is backwards compatible.

The failing CI check ensures all tests pass on the minimum supported Python runtime and dependency versions, which resolves pyparsing to version 2.1.0. With that version, we're seeing multiple test failures due to import errors.

This suggests the change is not backwards compatible and may require either:

  • Bumping the minimum supported version of pyparsing
  • Adding guarded imports for different major versions of pyparsing

@edmondchuc edmondchuc mentioned this pull request Feb 13, 2026
15 tasks
@edmondchuc
Copy link
Copy Markdown
Contributor

I've added a pyparsing v2 and v3 import compat layer in 59f585c.

@edmondchuc edmondchuc merged commit 2be67dc into RDFLib:7.x Feb 13, 2026
29 checks passed
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.

DeprecationWarnings for SPARQL parser, since pyparsing 3.3.*

2 participants