Commit Graph

9 Commits

Author SHA1 Message Date
Michael Lee
efb67946f8 Use variable annotations everywhere (#2909) 2019-04-13 10:40:52 +02:00
Sebastian Rittau
95eff73ab2 Drop Python 3.3 support from several stubs (#2265)
* Drop Python 3.3 support from several stubs

* Revert wrong socketserver changes
2018-06-20 16:49:47 -07:00
Henri Bai
44f7869c80 Fix blake2 binding (#1663)
* Fix blake2 binding

Currently calling `hashlib.blake2b` results in the following type errors:

Cannot instantiate abstract class '_BlakeHash' with abstract attributes 'copy', 'digest', 'hexdigest' and 'update'
Missing positional arguments "data", "key", "salt", "person", "fanout", "depth", "leaf_size", "node_offset", "node_depth", "inner_size", "last_node" in call to "_BlakeHash"

* Additional changes to reflect the hashlib implementation

Modifies the type signatures of:
 * blake2b
 * blake2s
 * sha3_224
 * sha3_256
 * sha3_384
 * sha3_512
 * shake_128
 * shake_256
To reflect the types that are implemented in the standard library.
These should be exposed as `type`s instead of `builtin_function_or_method`s.
e.g.
In [40]: type(hashlib.blake2b)
Out[40]: type

In [41]: type(hashlib.md5)
Out[41]: builtin_function_or_method
2017-11-08 19:39:55 -08:00
James Elford
2d4cd76765 Add new hashes introduced in Python 3.6 (#1268)
* sha3 family of hash functions
* shake variable length hashes that were introduced alongside sha3
* blake2 family of hash functions
* Mark VarLenHash as a private class, since it's not actually exported by hashlib
* Fix typos in my last, and mark hashlib.Hash as a private class since it isn't in the real hashlib
2017-05-22 07:57:31 -07:00
Nathan Henrie
b8a3f9359f Update pbkdf2_hmac argument names for 3.4+ (#1241)
* Update pbkdf2_hmac for Python 3.5

- Use `iterations` instead of `rounds` if running on 3.5
- Change `dklen` to `Optional`

* Use `iterations` instead of `rounds` in 3.4+
2017-05-04 21:09:07 -07:00
David Euresti
db84eb7844 Fix hashlib to accept multiple data types (#918) 2017-02-06 17:24:48 -08:00
Jakub Stasiak
f5bfee6f35 Finish Python 3 hashlib stub (#179) 2016-05-04 08:29:16 -07:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00