Skip to content

Importing solprop.backends.populations first fails with a circular import #606

Open

Description

@jtravs

`python -c "import solprop.backends.populations"` fails on a fresh interpreter:

```
ImportError: cannot import name 'axis_refusal' from partially initialized module 'solprop.backends.populations' (most likely due to a circular import)
```

`populations` imports from `numpy_ref`, and `numpy_ref` imports `axis_refusal`/`population_statistics` back from `populations`. It works whenever something else imports `numpy_ref` first, which is why nothing in the suite trips on it. Reproduced at 23c6b45 (main after #589).

Expected: the module imports on its own; move the shared pieces so the dependency runs one way.

Activity

  1. added
    bugSomething isn't working
    area: backendsAcross backends, and numba_cpu
    on Nov 9, 2026
  2. jtravs commented on Nov 15, 2026

    @jtravs
    ContributorAuthor

    Picked up by the issue-fixing session; a PR will follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendsAcross backends, and numba_cpubugSomething isn't workingpriority: lowWorth doing, no hurry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions