Skip to content

Add support for PEP 519 (file system path protocol) #101

@Anthchirp

Description

@Anthchirp

Gemmi currently cannot deal with python path protocol objects (PEP 519, PEP 428):

$ python -c "import gemmi,pathlib; gemmi.cif.read_file(pathlib.Path('z'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: read_file(): incompatible function arguments. The following argument types are supported:
    1. (filename: str) -> gemmi.cif.Document

Invoked with: PosixPath('z')

(Presumably this is the relevant section in the PEP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions