Commit Graph

2686 Commits

Author SHA1 Message Date
Stefan Seefeld 5f83519770 Test multiple Python versions. 2026-07-05 15:10:43 -04:00
O01eg c86ea207d1 Fix and add tests for module state 2026-06-26 21:52:16 -04:00
O01eg afd27c63d5 Provide 'state' accessor in module definition 2026-06-26 21:52:16 -04:00
O01eg d018bb17d4 Add POD state for multi-phase modules 2026-06-26 21:52:16 -04:00
O01eg 97a623d3ed Add tests 2026-06-21 16:09:15 -04:00
O01eg b34c8953a6 Rename module to mod 2026-06-21 16:09:15 -04:00
O01eg b8b00933c6 Add mod_gil_not_used option to BOOST_PYTHON_MODULE_MULTI_PHASE_INIT 2026-06-21 16:09:15 -04:00
O01eg 0796140961 Fix indent and add more remarks to make it more manageable 2026-06-21 16:09:15 -04:00
O01eg 9e2f5191e5 Add support for multi-phase module initialization 2026-06-21 16:09:15 -04:00
Eisuke Kawashima 14f1bbe6b8 refactor: use PyUnicode_AsUTF8 with Python 3.14+
_PyUnicode_AsString is deprecated since Python 3.14

https://docs.python.org/3.14/deprecations/index.html#id2

fix #512
2026-06-21 15:20:55 -04:00
Stefan Seefeld 521a86817d Windows build cleanup. 2026-06-21 14:13:22 -04:00
Stephen G Tuggy a017f08770 test-windows.yml: Forgot to include /x64-windows/include in --with-boost-include= faber parameters 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 7f1f7a8c9e test-windows.yml: Set VCPKG_INSTALLED_DIR env var, and use its value in --with-boost-include= faber parameters 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 83d828d53d test-windows.yml: Try again to set the correct with-boost-include directory 2026-06-21 13:52:37 -04:00
Stephen G Tuggy b0bac91a81 vcpkg.json: Go back to latest vcpkg release for builtin-baseline 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 112ec2ab01 test-windows.yml: Update microsoft/setup-msbuild to latest version, v3.0.0 2026-06-21 13:52:37 -04:00
Stephen G Tuggy c7ce567e17 test-windows.yml: Search the entire github.workspace directory and subdirectories for config.hpp 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 52ac3bdcaf test-windows.yml: Make workflow much more like my other, working projects that use vcpkg 2026-06-21 13:52:37 -04:00
Stephen G Tuggy d5ab28a8cc test-windows.yml: Set VCPKG_ROOT environment variable, etc. 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 874b21a680 vcpkg.json: Go back to the same commit for builtin-baseline as was used for vcpkgGitCommitId prior to this PR 2026-06-21 13:52:37 -04:00
Stephen G Tuggy 8b3a45d79b List vcpkg directory contents, looking for config.hpp 2026-06-21 13:52:37 -04:00
Stephen G Tuggy d68c52f3c3 Update test-windows.yml: Fix the --with-boost-include directory passed to the faber commands 2026-06-21 13:52:37 -04:00
Stephen G Tuggy a5b21ee931 Update test-windows.yml 2026-06-21 13:52:37 -04:00
Stephen G Tuggy b774e5948f Create vcpkg.json 2026-06-21 13:52:37 -04:00
Peter Dimov d42ade8771 Merge pull request #517 from sdarwin/docs4
Docs: adjust template to support Sphinx 9
2026-06-05 18:04:05 +03:00
Peter Dimov 105d64e889 Merge pull request #509 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-04-25 23:05:24 +03:00
sdarwin e6917d9c58 Docs: adjust template to support Sphinx 9 2026-03-13 07:01:23 +01:00
Andrey Semashev 9c887a1331 Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 22:59:58 +03:00
Stefan Seefeld 32da86df26 Improve test coverage. 2025-12-02 08:53:09 -05:00
Neil Schemenauer e89f86b74f Update Linux CI scripts, more Python versions.
Update scripts to use actions/setup-python to install different Python
versions.  Add run-faber.sh and get-py-env.py scripts.  Add
test-ubuntu-py-ver.yml CI script to test with different Python versions.
2025-12-02 08:19:45 -05:00
Neil Schemenauer 5013564316 Add "nogil" option for BOOST_PYTHON_MODULE_INIT.
Implement optional arguments for BOOST_PYTHON_MODULE_INIT and allow the
boost::python::mod_gil_not_used() option.  This sets the
Py_MOD_GIL_NOT_USED flag for the extension module.

To define a module that supports free-threaded Python, define it
like this:

    BOOST_PYTHON_MODULE(my_module, boost::python::mod_gil_not_used())
    {
        ...
    }
2025-12-02 08:19:45 -05:00
Neil Schemenauer fc68878e02 Set the Py_MOD_GIL_NOT_USED flag on modules.
This indicates that the free-threaded build of Python can keep the
GIL disabled when the module is loaded.  Without this module flag,
importing the module will cause the GIL to be re-enabled.  A warning
is emitted if this happens.
2025-11-06 19:46:37 -08:00
Neil Schemenauer cfbefe893c Use re-entrant mutex to protect global state.
Add pymutex.hpp which implements a re-entrant mutex on top of Python's
PyMutex.  Add BOOST_PYTHON_LOCK_STATE() macro that uses RAII to lock
mutable global state as required.
2025-11-06 19:43:33 -08:00
Neil Schemenauer 6f5f3b6607 Add work-around to crash in ~object_base().
For the free-threaded build (and possibly the debug build), it is not
safe to call Py_DECREF() if there is no valid Python thread-state.
2025-11-06 19:42:41 -08:00
Neil Schemenauer cabb466057 Use strong reference APIs.
For the free-threaded build, it is not safe use borrowed references.
Another thread could deallocate the object and cause the reference to
become invalid.  Replace API calls that borrow references with strong
reference APIs.
2025-11-06 19:41:00 -08:00
Abhay Kumar 97402f7925 🐛 Fix broken link to Jamroot in example docs boost-1.91.0.beta1 boost-1.91.0 boost-1.90.0.beta1 boost-1.90.0 2025-11-03 10:14:34 -05:00
Anton Gladky 668bc7c106 Include missing header boost/type_traits/is_unsigned.hpp
During the Debian Packaging of new version it was found that
this header is missing during the rebuild with GCC-15.
2025-11-03 10:13:40 -05:00
Eisuke Kawashima 5f5f38fa8a fix: fix quotation 2025-11-03 09:30:32 -05:00
Stefan Seefeld cc873d9682 Fix documentation build error. 2025-11-03 08:40:38 -05:00
Stefan Seefeld 20de46cd0c Update faber 2025-11-03 08:40:38 -05:00
Stefan Seefeld 5d7b9a0648 Stop testing c++98 support 2025-11-03 08:40:38 -05:00
Tom Kent 608ec27c4d Updated to recent compilers/boost 2025-11-03 08:40:38 -05:00
Stefan Seefeld 7fd39323ac Don't rely on Py_REFCNT to test upcast. 2025-11-03 08:40:38 -05:00
Eisuke Kawashima 2b6f667e98 chore: remove meaningless comparison 2025-10-25 15:23:44 -04:00
Eisuke Kawashima aa458d2ca9 fix(test.properties): use doctest.ELLIPSIS for traceback
Since python 3.11 (PEP 657) traceback info is changed
fix #460
2025-10-25 15:22:21 -04:00
Eisuke Kawashima 16627261f1 fix(test.pickle): fix for change in the return value of object.__reduce__()
https://docs.python.org/3.11/library/pickle.html#object.__reduce__

fix #461
2025-10-25 14:14:07 -04:00
Stefan Seefeld 303299e677 log commands 2025-10-25 13:25:52 -04:00
Stefan Seefeld cb95b611bb Downgrade run-vcpkg dependency to avoid regression. 2025-10-25 13:25:52 -04:00
Eisuke Kawashima b4fb28e99a ci: update GitHub Actions 2025-10-23 22:14:55 -04:00
Stefan Seefeld 867f0dddfe Fix windows header path. 2025-10-23 22:08:00 -04:00