You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Replace OrderedDict with plain dict()
<https://docs.python.org/3/library/collections.html#ordereddict-objects>:
> Ordered dictionaries are just like regular dictionaries but have some
> extra capabilities relating to ordering operations. They have become
> less important now that the built-in dict class gained the ability to
> remember insertion order (this new behavior became guaranteed in
> Python 3.7).
Signed-off-by: Philipp Hahn <[email protected]>
* construct/lib/container: Remove unneeded methods
`collections.abc.MutableMapping` already implements `keys()`,
`update()`, `__eq__()`, `__ne__()` and `__contains__()` – most
importantly correctly, e.g. `update()` has many variants which the
current implementation does not handle.
Signed-off-by: Philipp Hahn <[email protected]>
* construct: Remove Python 2 compatibility layer
Remove the compatibility layer `py3compat`.
PS: There is #548 to migrate
from the interned version of `construct` back to "Construct 2.10+" now
that it is maintained again. When that happens, this change will become
moot. Until then restore some sanity back into our copy as handling
Python type annotations for both Python 2 and 3 is a major pain.
Signed-off-by: Philipp Hahn <[email protected]>
* Drop remaining Python 2 compatibility code
Signed-off-by: Philipp Hahn <[email protected]>
* Drop from __future__ import print_function
The project is Python 3 only, so remove the legacy Python 2
compatibility.
Signed-off-by: Philipp Hahn <[email protected]>
* Replace `bytelist2string` with `bytes`
The function was used in only one place. Just use the much more
efficient `bytes(list[int])` to convert from `list[int]` to `bytes`.
Signed-off-by: Philipp Hahn <[email protected]>
---------
Signed-off-by: Philipp Hahn <[email protected]>
0 commit comments