Skip to content

Spyre tree uses 3.12-only tempfile keywords while setup.py supports 3.10 #115

Description

@fabianlim

setup.py sets MIN_PYTHON = (3, 10), but ten sites in the Spyre tree pass tempfile keywords that only exist in 3.12+. Each is a TypeError at the call on 3.10/3.11. The dev box runs 3.12, so none of it shows today.

TemporaryDirectory(delete=...) — backend code, breaks an installed wheel:

  • third_party/spyre/backend/compiler.py:687

NamedTemporaryFile(delete_on_close=...) — test/script code, breaks a 3.10 test run only:

  • third_party/spyre/test/conftest.py:453, :694
  • third_party/spyre/test/python/backend-options-test.py:121, :153, :198, :376
  • third_party/spyre/scripts/dump_round_trip.py:306, :338
  • third_party/spyre/test/test_non_pow2.py:62

The first becomes mkdtemp + try/finally. The rest need delete=False plus an explicit unlink — not a blind keyword swap, since delete_on_close=False still removes the file at context exit and delete=False does not.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions