Skip to content

Commit

Permalink
Merge branch 'globals' of github.com:nschloe/nanobind into globals
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Oct 5, 2023
2 parents ccad7d5 + 171c993 commit 217c5a5
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-2022', 'macos-latest']
python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc.3', 'pypy3.9', 'pypy3.10']
python: ['3.8', '3.9', '3.10', '3.11', '3.12.0', 'pypy3.9', 'pypy3.10']

name: "Python ${{ matrix.python }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand All @@ -48,7 +48,7 @@ jobs:
python -m pip install pytest pytest-github-actions-annotate-failures
- name: Install NumPy
if: matrix.python != 'pypy3.9' && matrix.python != 'pypy3.10' && matrix.python != '3.12.0-rc.3'
if: matrix.python != 'pypy3.9' && matrix.python != 'pypy3.10' && matrix.python != '3.12.0'
run: |
python -m pip install numpy scipy
Expand Down
5 changes: 5 additions & 0 deletions docs/api_extra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,11 @@ functions:

Overwrite this reference with a pointer to another object

.. cpp:function:: void reset()

Clear the reference and reduces the reference count of the object (if not
``nullptr``)

.. cpp:function:: bool operator==(const ref &r) const

Compare this reference with another reference (pointer equality)
Expand Down
14 changes: 10 additions & 4 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,31 @@ case, both modules must use the same nanobind ABI version, or they will be
isolated from each other. Releases that don't explicitly mention an ABI version
below inherit that of the preceding release.

Version 1.6.2 (TBA)
Version 1.6.3 (TBA)
-------------------

* Added :cpp:func:`nb::globals() <globals>`. (PR `#311
<https://github.com/wjakob/nanobind/pull/311>`__).

Version 1.6.2 (Oct 3, 2023)
-------------------

* Added a missing include file used by the new intrusive reference counting
sample implementation from v1.6.0. (commit `31d115
<https://github.com/wjakob/nanobind/commit/31d115fce310475fed0f539b9446cc41ba9ff4d4>`__).

Version 1.6.1 (Oct 2, 2023)
-------------------

* Added missing namespace declaration to the :cpp:class:`ref` intrusive
reference counting RAII helper class added in version 1.6.0. (commit `3ba352
<https://github.com/wjakob/nanobind/commit/3ba3522e99c8f1f4bcc7c172abd2006eeaa8eaf8>`__).


Version 1.6.0 (Oct 2, 2023)
-------------------

* Several :cpp:class:`nb::ndarray\<..\> <ndarray>` improvements:
* Several :cpp:class:`nb::ndarray\<..\> <ndarray>` improvements:

1. CPU loops involving nanobind ndarrays weren't getting properly vectorized.
This release of nanobind adds *views*, which provide an efficient
Expand Down Expand Up @@ -216,7 +222,7 @@ Version 1.3.2 (June 2, 2023)
Version 1.3.1 (May 31, 2023)
----------------------------

* CMake build system improvements for stable ABI wheel generation.
* CMake build system improvements for stable ABI wheel generation.
(PR `#222 <https://github.com/wjakob/nanobind/pull/222>`__).

Version 1.3.0 (May 31, 2023)
Expand Down
6 changes: 6 additions & 0 deletions include/nanobind/intrusive/ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ template <typename T> class ref {
return *this;
}

/// Clear the currently stored reference
void reset() {
dec_ref(m_ptr);
m_ptr = nullptr;
}

/// Compare this reference with another reference
bool operator==(const ref &r) const { return m_ptr == r.m_ptr; }

Expand Down
2 changes: 1 addition & 1 deletion include/nanobind/nanobind.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define NB_VERSION_MAJOR 1
#define NB_VERSION_MINOR 6
#define NB_VERSION_PATCH 1
#define NB_VERSION_PATCH 2

// Core C++ headers that nanobind depends on
#include <cstdint>
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
'include/nanobind/stl/detail/*.h',
'include/nanobind/eigen/*.h',
'include/nanobind/intrusive/*.h',
'include/nanobind/intrusive/*.inl',
'ext/robin_map/include/tsl/robin_map.h',
'ext/robin_map/include/tsl/robin_hash.h',
'ext/robin_map/include/tsl/robin_growth_policy.h',
Expand Down
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def cmake_dir() -> str:
"Return the path to the nanobind CMake module directory."
return os.path.join(os.path.abspath(os.path.dirname(__file__)), "cmake")

__version__ = "1.6.1"
__version__ = "1.6.2"

__all__ = (
"__version__",
Expand Down

0 comments on commit 217c5a5

Please sign in to comment.