Skip to content

Releases: pocketpy/pocketpy

v2.0.2

21 Nov 02:57
b5a443e
Compare
Choose a tag to compare

This version fixes some bugs and improves code quality.

Changes

  1. Fix a bug of random module which uses a wrong initial seed.
  2. Fix #315 about py_switchvm.
  3. Improve PK_ENABLE_OS and add PK_BUILD_WITH_IPO to cmake options.
  4. Add conio module which provides _kbhit and _getch functions for desktop platforms.
  5. Fix True not False bug of parser.
  6. Fix ** associativity bug. 2**2**3 now evaluates to 256 instead of 64.
  7. Add __float__ and __int__ and __round__.
  8. Add py_bindstaticmethod.
  9. Fix str.split. It behaves the same as cpython now.
  10. Fix a bug of closure for generator functions.
  11. Support vec* unpack, e.g. x, y = vec2i(1, 2).

Full Changelog: v2.0.1...v2.0.2

v2.0.1

30 Oct 07:47
Compare
Choose a tag to compare

This is the first stable release of pocketpy.

Changes

  1. __import__ now supports loading dynamic library. The library should have a exported C function py_module_initialize
  2. Fix a bug about clock_gettime by @AstroAir
  3. Add builtin function input() and tuple.__lt__
  4. yield from now can return value and yield implicit yield None
  5. next now can take default
  6. Support PEP695
  7. Fix a multi-line function definition bug
  8. Add bytes.__len__ and improve ord()
  9. Support finally syntax

v2.0.0

17 Sep 11:09
Compare
Choose a tag to compare

The first beta release of v2.x. We have completed the move to C11.

v1.4.6

25 Jun 06:59
37c2265
Compare
Choose a tag to compare

pybind11 support was added in this version.

See https://pocketpy.dev/pybind11/ for details.

After this version, v1.x series is entering its Long-term support period.
We will provide bug fixes for two years.

v1.4.5

19 Apr 04:59
Compare
Choose a tag to compare

Improvements

  • add bytes addition and slice support
  • improve FileIO and add more methods such as seek() and tell(). See https://pocketpy.dev/modules/io/
  • add __missing__ for dict and refactor defaultdict
  • add bit_length method to int #233
  • improve performance of for loop
  • adoping a more efficient division algorithm for bigint #232
  • make float always 64-bit; optimize for empty function
  • add vec.__getitem__; add pkpy_set_main_argv to set sys.argv
  • add reduce and partial for functools module
  • refactor random module to use builtin mt19937 implementation

New Features

Bug fixes

  • check the size of fillchar passed to str methods (ljust, rjust) #236
  • perform boundary check before searching to prevent security vulnerabilities #237

Full Changelog: v1.4.3...v1.4.5

v1.4.3

27 Mar 08:10
142e4fd
Compare
Choose a tag to compare

Fix some bugs and improve performance.

What's Changed

New Contributors

Full Changelog: v1.4.2...v1.4.3

v1.4.2

04 Mar 11:17
Compare
Choose a tag to compare

Changes

  1. add random.choices
  2. remove python3 deps (now you can compile pkpy without python3 installed)
  3. list.index supports __start; str.index and str.find supports __start
  4. fix a bug of line_profiler
  5. fix #217 #220 #223 #214 #212 #211
  6. raise an error if a literal int overflows
  7. support scientific notation #213

Break changes

pkpy now uses a RTTI-based py_cast<> implementation. You may need to add -frtti flags to compile it.

New Contributors

Full Changelog: v1.4.1...v1.4.2

v1.4.1

13 Feb 14:30
Compare
Choose a tag to compare

Changes

  1. move strip methods into cpp
  2. fix a bug of hex related methods
  3. add PK_NO_EXPORT_C_API macro
  4. add array2d module
  5. add line_profiler module
  6. make vm->_ceval_on_step always available
  7. mark stdout_write and stderr_write as virtual
  8. add some new methods for linalg module
  9. allows tuple as function default parameter

Break changes

  1. str was changed to be null-terminated; Str::c_str_dup was removed

v1.4.0

30 Jan 03:19
Compare
Choose a tag to compare

Changes

  1. remove #include <emscripten.h> for compatibility reason
  2. remove os.system
  3. rename some linalg methods
  4. reduce output binary size
  5. set PK_ENABLE_OS to 0 by default
  6. fix #194

New Features

  1. full slice support
  2. recursive repr detection, i.e. [1, [...]]
  3. add typed error message, e.g. TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
  4. add m__setattr__, m__getattr__ and m__delattr__ hooks in cpp

Internal Changes

  1. obj_type_name was rename to _type_name
  2. remove OBJ_NAME macro
  3. Tuple's constructor was changed
  4. remove timeit module

v1.3.9

15 Jan 07:07
Compare
Choose a tag to compare

Changes

  • add inplace methods set_trs, __imatmul__ and invert_ into linalg.mat3x3 (were renamed in v1.4.0, don't use them)
  • add inplace method .assign() to vec2, vec3, vec4 and mat3x3 (were renamed in v1.4.0, don't use them)
  • remove bind_builtin_func and all string-based bind overloads
  • add bind type parameter to vm->bind_func<>
  • some cleanup to improve code quality
  • add .hex() and .fromhex() to c.struct
  • make all PY_STRUCT_LIKE objects picklable
  • fix #187 the behavior of with <expr> [as <@id>]

Full Changelog: v1.3.8...v1.3.9