Skip to content

except ImportError: not working as expected since python 3.3 #407

@tyleracorn

Description

@tyleracorn

I am running into some issues with prometheus_client trying import the resource package since I'm on a Windows machine. It looks like there was a previous fix #28 . However, that fix no longer works properly for some of us. I looks like Since Python 3.3+ you can import an empty folder and therefore when it try's to import the resource package it doesn't always raise an ImportError. It does however raise an AttributeError when it try's to get the page size.

I'll submit a pull request since it's a simple fix, but I figured I'd submit an issue for tracking first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions