Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't expect monkeypatched nacl.signing.SigningKey instances #16

Open
DMRobertson opened this issue Jan 10, 2022 · 0 comments
Open

Don't expect monkeypatched nacl.signing.SigningKey instances #16

DMRobertson opened this issue Jan 10, 2022 · 0 comments

Comments

@DMRobertson
Copy link
Contributor

A nicer way to fix matrix-org/synapse#11714 (imo)

  • Define a new type which holds the data (key: nacl.signing.SigningKey, alg: str, version: str). Either inherit from nacl.signing.SigningKey or introduce a new wrapper.
  • Change functions that take a signedjson.types.SigningKey to accept this new data type.
  • Major version bump.
DMRobertson pushed a commit to matrix-org/synapse 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
reivilibre pushed a commit to matrix-org/synapse 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 to matrix-org/synapse-dinsic 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
babolivier pushed a commit to matrix-org/synapse-dinsic 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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants