Skip to content

RFC: Rearrange OSError logic so it makes sense #19636

Closed

Description

@pllim

This is a follow-up of #19631 . We need to audit the logic path in astropy/config/configuration.py so things like OSError check still make sense, or if not, move it to a place that does. xref #19631 (comment)

Activity

  1. neutrinoceros commented on May 3, 2026

    @neutrinoceros
    Contributor

    Starting to inquire.
    First note: the except OSError branch is never reached even on 7.2.x and with HOME unset, in the sense that the test suite doesn't cover it. This means we cannot just remove this try/except block and let CI validate the approach.

  2. neutrinoceros commented on May 3, 2026

    @neutrinoceros
    Contributor

    Our next clue: this except OSError was last updated in #10877, and introduced in #8402.

  3. neutrinoceros commented on May 3, 2026

    @neutrinoceros
    Contributor

    There are however 4 tests currently failing on main if HOME is unset (all in astropy/config). It's probably worth looking this up first.

  4. neutrinoceros commented on May 3, 2026

    @neutrinoceros
    Contributor

    it's actually 20 if I update ignore_config_paths_global_state so it only mocks HOME if already set

  5. neutrinoceros commented on May 3, 2026

    @neutrinoceros
    Contributor

    I think I found a bigger, more concrete problem from here. It gets its own ticket at #19648

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions