Skip to content

Commit 9b5e9be

Browse files
committed
micropython: Ensure all objects have __hash__.
This updates the micropython submodule with a fix to ensure all objects implement __hash__. Fixes: pybricks/support#876
1 parent b384752 commit 9b5e9be

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
## [Unreleased]
66

7+
### Fixed
8+
- Fixed some objects do not implement `__hash__` ([support#876]).
9+
10+
[support#876]: https://github.com/pybricks/support/issues/876
11+
712
## [3.2.1] - 2022-12-26
813

914
### Fixed

micropython

tests/virtualhub/motor/basic.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from pybricks.pupdevices import Motor
2+
from pybricks.parameters import Port
3+
4+
m = Motor(Port.A)
5+
6+
# All objects should be hashable.
7+
# Regression test for https://github.com/pybricks/support/issues/876.
8+
print(type(hash(m)) is int)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
True

0 commit comments

Comments
 (0)