Skip to content

Conversation

@hynek
Copy link
Member

@hynek hynek commented Dec 8, 2020

No description provided.

@hynek
Copy link
Member Author

hynek commented Dec 8, 2020

Do I really have to create an abc.pyi and re-export all the abcs/Protocols!?

@srittau
Copy link
Collaborator

srittau commented Dec 8, 2020

As far as I can see, the problem is simply that stdlib/3/importlib/abc.pyi doesn't yet have the Traversable protocol.

@hynek
Copy link
Member Author

hynek commented Dec 8, 2020

Hmm I got confused by the error that "found module, but no stubs". 🤔

@hauntsaninja
Copy link
Collaborator

Thanks, this looks good to me! You'll need to add import abc to importlib.abc (or possibly from abc import abstractmethod) and reformat with black

@hynek
Copy link
Member Author

hynek commented Dec 9, 2020

I'm somewhat confused by the remaining failures.

hauntsaninja added 2 commits December 8, 2020 22:33
abstractproperty has been deprecated for forever too
@hynek
Copy link
Member Author

hynek commented Dec 9, 2020

Thanks @hauntsaninja!

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks mostly good to me with one remark and a nit.

@abstractmethod
def read_bytes(self) -> bytes: ...
@abstractmethod
def read_text(self, encoding: Optional[str] = ...) -> str: ...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: The docstring in the implementation is wrong: It says Read contents of self as bytes.

@hynek
Copy link
Member Author

hynek commented Dec 9, 2020

lol wat 😅

free(): invalid pointer
/home/runner/work/_temp/c2a28e77-7168-488e-8f26-da1cbba538c8.sh: line 1:  2734 Aborted                 (core dumped) ./tests/pytype_test.py

I think it needs whitelisting too?

@srittau
Copy link
Collaborator

srittau commented Dec 9, 2020

:( @hynek Sorry for the hassle. Please just add it to the whitelist for now please. Cc @rchen152: It seems pytype crashes here.

Edit: tests/pytype_exclude_list.txt

Edit 2: I'm taking care of it.

@rchen152
Copy link
Collaborator

rchen152 commented Dec 9, 2020

O_o That failure mode I haven't seen before. Sorry for the trouble! I opened google/pytype#757.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants