Skip to content

Check typing instead of string matching - #58

Open
ljos wants to merge 1 commit into
scallop-lang:masterfrom
equinor:fix-typing
Open

Check typing instead of string matching#58
ljos wants to merge 1 commit into
scallop-lang:masterfrom
equinor:fix-typing

Conversation

@ljos

@ljos ljos commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Hi--I am trying to get this working on python3.14 and there has been some changes to the type system so the string checks that were there does not work anymore. I updated the code to look at the types instead.

This was preventing me from even importing the library.

(I am now getting a segfault when I try to create a relation, so you might see some more PRs from me).

@awdemos

awdemos commented Aug 15, 2026

Copy link
Copy Markdown

Thanks for working on Python 3.14 compatibility — this kind of modernization is welcome.

I reviewed the diff and have a few concerns before I can approve:

  • Backward compatibility: typing.TypeAlias and types.NoneType are not available in Python 3.8/3.9, which the project still claims to support (Python 3.7+). Could you guard these or use type(None) and a conditional import?
  • get_type_hints(..., include_extras=True) requires Python 3.9+. If the minimum supported version is still 3.7, this will break.
  • The PR mixes functional changes with a lot of formatting-only changes. Splitting the style cleanup into a separate PR would make review much easier.
  • Could you add a test or a CI matrix entry that exercises this on 3.14 (or at least on the lowest supported version) so we don’t regress?

I like the direction, but I’d like to see the compatibility story tightened before approving.

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