Skip to content

Commit f7d6d8e

Browse files
authored
fix: Adapt bindings for UnresolvedChannel's readonly properties (#4224)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
1 parent f38446f commit f7d6d8e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Bug fixes:
4242
- [micromamba, libmamba] Graceful handling of download cancel/interruption by @Klaim in <https://github.com/mamba-org/mamba/pull/4146>
4343
- [micromamba, libmamba] fix: Do not show activation message for dry runs by @jjerphan in <https://github.com/mamba-org/mamba/pull/4140>
4444
- [libmamba] fix: Only call `get_all_running_processes_info` when needed by @mihaitodor in <https://github.com/mamba-org/mamba/pull/4135>
45-
- [libmamba] Add #include <functional> for std::ref by @opoplawski in <https://github.com/mamba-org/mamba/pull/4132>
45+
- [libmamba] Add `#include <functional>` for std::ref by @opoplawski in <https://github.com/mamba-org/mamba/pull/4132>
4646

4747
CI fixes and doc:
4848

libmamba/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Bug fixes:
3838
- Graceful handling of download cancel/interruption by @Klaim in <https://github.com/mamba-org/mamba/pull/4146>
3939
- fix: Do not show activation message for dry runs by @jjerphan in <https://github.com/mamba-org/mamba/pull/4140>
4040
- fix: Only call `get_all_running_processes_info` when needed by @mihaitodor in <https://github.com/mamba-org/mamba/pull/4135>
41-
- Add #include <functional> for std::ref by @opoplawski in <https://github.com/mamba-org/mamba/pull/4132>
41+
- Add `#include <functional>` for std::ref by @opoplawski in <https://github.com/mamba-org/mamba/pull/4132>
4242

4343
CI fixes and doc:
4444

libmambapy/bindings/specs.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,15 @@ namespace mambapy
345345
.def("__copy__", &copy<UnresolvedChannel>)
346346
.def("__deepcopy__", &deepcopy<UnresolvedChannel>, py::arg("memo"))
347347
.def_property_readonly("type", &UnresolvedChannel::type)
348-
.def_property_readonly("location", &UnresolvedChannel::location)
349-
.def_property_readonly("platform_filters", &UnresolvedChannel::platform_filters);
348+
.def_property_readonly(
349+
"location",
350+
[](const UnresolvedChannel& self) -> std::string { return self.location(); }
351+
)
352+
.def_property_readonly(
353+
"platform_filters",
354+
[](const UnresolvedChannel& self) -> const UnresolvedChannel::platform_set&
355+
{ return self.platform_filters(); }
356+
);
350357

351358
py::class_<BasicHTTPAuthentication>(m, "BasicHTTPAuthentication")
352359
.def(

0 commit comments

Comments
 (0)