Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Pull in type hints for pynacl #478 #11644

Closed
DMRobertson opened this issue Dec 24, 2021 · 0 comments · Fixed by #11714
Closed

Pull in type hints for pynacl #478 #11644

DMRobertson opened this issue Dec 24, 2021 · 0 comments · Fixed by #11714
Assignees
Labels
P4 (OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@DMRobertson
Copy link
Contributor

In my spare time (i.e. not paid Element time) I've been working to add type annotations to pynacl, see pyca/pynacl#660. This is almost done, and the maintainer is keen to include them in a new minor release, "in the next few days/weeks".

Once there's a release, we should remove pynacl from the list of imports we ignore in Sydent's mypy config. Then we should fixup any complaints. The same also holds true for signedjson and sydent (see matrix-org/sydent#478).

@DMRobertson DMRobertson added this to the Revisit: Next Month milestone Dec 24, 2021
@DMRobertson DMRobertson added T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. P4 (OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches labels Dec 24, 2021
DMRobertson pushed a commit that referenced this issue Jan 10, 2022
Fixes #11644.

I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.

(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.)
DMRobertson pushed a commit that referenced this issue Jan 10, 2022
* Deal with mypy errors w/ type-hinted pynacl 1.5.0

Fixes #11644.

I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.

(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.) C.f. matrix-org/python-signedjson#16
@DMRobertson DMRobertson removed this from the Revisit: Next Month milestone Jan 10, 2022
reivilibre pushed a commit that referenced this issue Jan 12, 2022
* Deal with mypy errors w/ type-hinted pynacl 1.5.0

Fixes #11644.

I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.

(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.) C.f. matrix-org/python-signedjson#16
babolivier pushed a commit that referenced this issue Jan 26, 2022
* Deal with mypy errors w/ type-hinted pynacl 1.5.0

Fixes #11644.

I really don't like that we're monkey patching pynacl SignedKey
instances with alg and version objects. But I'm too scared to make the
changes necessary right now.

(Ideally I would replace `signedjson.types.SingingKey` with a runtime class which
wraps or inherits from `nacl.signing.SigningKey`.) C.f. matrix-org/python-signedjson#16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4 (OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant