Skip to content

Releases: luk036/py2cpp

Combine py::enumerate and py::const_enumerate

28 Nov 06:53

Choose a tag to compare

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! 💻❤️

1.5

17 Sep 02:23

Choose a tag to compare

1.5

Full Changelog: 1.4.11...1.5

Release Notes: py2cpp v1.5

Overview

This release introduces several enhancements to the py2cpp library, a header-only C++ library designed to bring Python-like features to modern C++. Key improvements include expanded unit test coverage, code optimizations, and updates to build configurations.

🚀 New Features & Improvements

1. Enhanced Unit Test Coverage

  • Added comprehensive unit tests for Boost Graph adaptors (test_nx2bg1.cpp):
    • GrAdaptor for graph operations
    • VertexView and EdgeView for graph traversal
    • AtlasView for neighbor iteration
  • Added tests for Python-like data structures:
    • py::dict methods including contains, get, items, copy, and len
    • py::enumerate and py::const_enumerate for iterable indexing
  • Extended tests for Fraction class in fractions.hpp:
    • Arithmetic operations (+, -, *, /)
    • Comparison operators (<, <=, >, >=, ==, !=)
    • In-place operations (+=, -=, *=, /=)

2. Code Optimizations

  • Performed code optimizations via Gemini CLI
  • Applied fix-format to ensure consistent code style

3. Build System Updates

  • Upgraded C++ standard from C++14 to C++17
  • Added Boost support in XMake configuration:
    • Included boost package dependency
    • Added Boost-specific test files to the build
  • Improved compiler flag handling for Linux and Windows platforms

🛠️ Development Workflow Improvements

  • Updated CMakeLists.txt to use C++17 standard
  • Enhanced XMake configuration for better cross-platform compatibility
  • Added [[maybe_unused]] attribute to silence compiler warnings in range-based loops

✅ Testing

  • All new tests pass successfully using the doctest framework
  • CI pipeline now includes Boost-based tests via XMake

📦 Dependencies

  • Added explicit dependency on Boost library for graph-related features
  • Maintained compatibility with fmt and doctest

🔧 Known Issues

  • None reported in this release

📄 Documentation

  • Documentation can still be generated via Doxygen using the provided CMake targets

Contributors

  • luk036 (all commits)

Full Commit Summary

  • b81445c: feat: Add more unit tests for boost
  • 5c26186: add more unit tests
  • dfbf36f: fix xmake compilation issue
  • ffb69b9: perform code optimization by Gemini CLI; apply fix-format

1.4.11

29 Mar 12:14

Choose a tag to compare

Release Notes: py2cpp v1.4.11

Overview

This release focuses on cleanup and maintenance, removing deprecated features and updating the project version.

Changes

  • Version Update: Bumped project version from 1.4.10 to 1.4.11 in CMakeLists.txt.
  • Removed Standalone Workflow: Renamed .github/workflows/standalone.yml to .github/workflows/standalone.bak, indicating deprecation.
  • Removed Greeter Module: Deleted the greeter feature, including:
    • include/py2cpp/greeter.h
    • source/greeter.cpp
    • test/source/greeter.old
  • CI Badge Cleanup: Removed the outdated "Style" workflow badge from README.md.
  • Build System Tweaks: Commented out standalone directory inclusion in all/CMakeLists.txt.

Contributors

  • luk036: Authored all commits in this release.

Full Details

For a complete diff, see the GitHub comparison.


Note: This release reduces codebase complexity by removing unused components.

new documentation build

01 Dec 05:52

Choose a tag to compare

1.4.10

new documentation

Update the third part libraries

27 Mar 05:42

Choose a tag to compare

1.4.9

set version 1.4.9

code cleanup for documentation

04 Aug 08:37

Choose a tag to compare

use latest ModernCppStarter as template

04 Aug 08:24

Choose a tag to compare

add at() and make it work

24 Jun 11:46

Choose a tag to compare

1.4.6

add at() method

add at() for compatability with standard

23 Jun 11:36

Choose a tag to compare

1.4.5

add at() for compatability

add Lict (Dict-like data structure by std::vector)

15 Jun 07:39

Choose a tag to compare