Skip to content

Loading file in library fails in downstream packages #298

@edgarrmondragon

Description

@edgarrmondragon

Hey 👋

Starting with release 6.2.0, downstream packages dependent on a library that uses the equivalent of

import importlib_resources
import yaml

path = importlib_resources.files("my_lib").joinpath("default_logging.yml")

with path.open() as f:
    return yaml.safe_load(f)

fail with FileNotFoundError: Can't open orphan path.

This seems to only happen in Python 3.8 and 3.9.

For reference, meltano/sdk#2310 is a PR where I'm trying to fix things on my end in case I was using your APIs incorrectly, but still a breaking change might have been inadvertently introduced.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions