- Sep 06, 2017
-
-
Damien George authored
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
-
Damien George authored
-
- Sep 05, 2017
-
-
Paul Sokolovsky authored
Should raise TypeError, unless it's (in)equality comparison.
-
Damien George authored
-
- Sep 04, 2017
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
If __iop__ is not defined, call __op__ instead. This is desired behavior for immutable types, __iop__ needs to be defined only for mutable types.
-
Damien George authored
-
Tobias Badertscher authored
There are 2 changes: - remove early initialisation of LSE and replaced it by LSEDRIVE config (there is no reason to call HAL_RCC_OscConfig twice). - add initialisation of the variables PLLSAI1Source and PLLSAI1M as they are needed in Cube HAL 1.8.1.
-
Damien George authored
-
Robert HH authored
-
Damien George authored
IEEE floating point is specified such that a comparison of NaN with itself returns false, and Python respects these semantics. This patch makes uPy also have these semantics. The fix has a minor impact on the speed of the object-equality fast-path, but that seems to be unavoidable and it's much more important to have correct behaviour (especially in this case where the wrong answer for nan==nan is silently returned).
-
- Sep 02, 2017
-
-
Paul Sokolovsky authored
These are now returned as "operation not supported" instead of raising TypeError. In particular, this fixes equality for float vs incompatible types, which now properly results in False instead of exception. This also paves the road to support reverse operation (e.g. __radd__) with float objects. This is achieved by introducing mp_obj_get_float_maybe(), similar to existing mp_obj_get_int_maybe().
-
- Sep 01, 2017
-
-
Damien George authored
"b" on Thumb might not be long enough for the jump to nlr_push_tail so it must be done indirectly.
-
Damien George authored
They are not used by any component and take up valuable flash space.
-
Damien George authored
-
Damien George authored
-
Damien George authored
Prior to this patch, the size of the buffer given to pack_into() was checked for being too small by using the count of the arguments, not their actual size. For example, a format spec of '4I' would only check that there was 4 bytes available, not 16; and 'I' would check for 1 byte, not 4. The pack() function is ok because its buffer is created to be exactly the correct size. The fix in this patch calculates the total size of the format spec at the start of pack_into() and verifies that the buffer is large enough. This adds some computational overhead, to iterate through the whole format spec. The alternative is to check during the packing, but that requires extra code to handle alignment, and the check is anyway not needed for pack(). So to maintain minimal code size the check is done using struct_calcsize.
-
Damien George authored
Prior to this patch, the size of the buffer given to unpack/unpack_from was checked for being too small by using the count of the arguments, not their actual size. For example, a format spec of '4I' would only check that there was 4 bytes available, not 16; and 'I' would check for 1 byte, not 4. This bug is fixed in this patch by calculating the total size of the format spec at the start of the unpacking function. This function anyway needs to calculate the number of items at the start, so calculating the total size can be done at the same time.
-
Damien George authored
This patch makes a repeat counter behave the same as repeating the typecode, when there are not enough args. For example: struct.pack('2I', 1) now behave the same as struct.pack('II', 1).
-
- Aug 31, 2017
-
-
Paul Sokolovsky authored
Similar to the existing testcase, but test that returning both value of native type and instance of another user class from __new__ lead to __init__ not being called, for better coverage.
-
Damien George authored
-
Damien George authored
Maps are always allocated "statically" and (de)initialised via mp_map_init and mp_map_deinit.
-
Damien George authored
-
Damien George authored
-
- Aug 30, 2017
-
-
Paul Sokolovsky authored
Now traces more explicitly thru the lookup process.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Make messages more verbose and easier to follow and check that user class' __new__() is not called by object.__new__(user_class).
-
Paul Sokolovsky authored
-
Damien George authored
This comment style is no longer used because the docs are written by hand, not generated.
-
Damien George authored
This is to have consistency across the whole repository.
-
- Aug 29, 2017
-
-
Paul Sokolovsky authored
NotImplemented means "try other fallbacks (like calling __rop__ instead of __op__) and if nothing works, raise TypeError". As MicroPython doesn't implement any fallbacks, signal to raise TypeError right away.
-
Damien George authored
This upgrades the HAL to the versions: - F4 V1.16.0 - F7 V1.7.0 - L4 V1.8.1 The main changes were in the SD card driver. The vendor changed the SD read/write functions to accept block number intead of byte address, so there is no longer any need for a custom patch for this in stm32lib. The CardType values also changed, so pyb.SDCard().info() will return different values for the 3rd element of the tuple, but this function was never documented.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Linked to https://github.com/micropython/stm32lib
-
Damien George authored
The unary-op/binary-op enums are already defined, and there are no arithmetic tricks used with these types, so it makes sense to use the correct enum type for arguments that take these values. It also reduces code size quite a bit for nan-boxing builds.
-
Damien George authored
Using gcc -Wpedantic will warn that #define of defined() is non-portable and this patch fixes this.
-