Skip to content

Combine py::enumerate and py::const_enumerate

Latest

Choose a tag to compare

@luk036 luk036 released this 28 Nov 06:53
· 2 commits to master since this release

Full Changelog: 1.5...1.5.1

py2cpp v1.5.1 Release Notes πŸŽ‰πŸš€

Released on November 28, 2025

We're excited to ship py2cpp 1.5.1 – a feature-packed release focused on Python fidelity, modern C++ compatibility, and smoother development experience!

New Features & Enhancements ✨

  • Full support for enumerate() on const containers
    You can now safely write for i, v in py::const_enumerate(container) – perfect for range-based for loops without copying!
    Also added py::enumerate() wrapper for non-const cases.

  • New const_enumerate() utility (with detailed docs)
    Clean, safe, and zero-overhead enumeration over const iterables and ranges.

  • Improved dict and list methods

    • dict::contains(key) now properly noexcept and const-correct
    • Added modern items() β†’ returns view of (key, value) pairs
    • len() now works naturally on py2cpp containers
  • Better range support
    Full C++20-compatible range semantics with proper begin()/end() and const iterators.

  • Added GEMINI CLI command 🌟
    New py2cpp gemini subcommand for AI-assisted code conversion (experimental but awesome!)

Bug Fixes & Build Improvements πŸ› οΈ

  • Fixed macOS build by adding -DCMAKE_POLICY_VERSION_MINIMUM=3.5 (Who-dev)
  • Fixed sign-conversion warnings on Oct 1 β†’ cleaner builds on modern compilers
  • Updated CMake workflows to latest standards
  • Bumped project version to 1.5.1 and updated CMakeLists.txt accordingly

Under the Hood πŸ”§

  • Merged enumerate() and const_enumerate() implementations for consistency
  • Lots of noexcept additions and const-correctness fixes across containers
  • Improved template deduction guides
  • Better iterator traits and SFINAE handling

CI/CD

  • Added proper doctest and boost.ut test packages
  • Modernized xmake.lua config
  • Cleaner GitHub Actions workflows

Big thanks to @luk036 for driving this release at warp speed! ⚑

Upgrade now and enjoy more Pythonic C++ than ever before! 🐍➑️ C++

β†’ https://github.com/luk036/py2cpp/releases/tag/1.5.1

Happy coding! πŸ’»β€οΈ