Skip to content

Commit

Permalink
Merge branch 'mamba-org:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dangjinghao authored May 7, 2024
2 parents 22d608b + 9006fb9 commit 91e7d3e
Show file tree
Hide file tree
Showing 18 changed files with 261 additions and 59 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/unix_impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ jobs:
export TEST_MAMBA_EXE=$(pwd)/build/micromamba/mamba
export MAMBA_ROOT_PREFIX="${HOME}/micromamba"
unset CONDARC # Interferes with tests
# FIXME this is apparently a bug to be fixed (pip specs are not installed from env yml file)
python -m pip install securesystemslib --no-input --no-deps
cd micromamba/test-server
./generate_gpg_keys.sh
./testserver_pkg_signing.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ __cache__/
installed.json
tmp/
test_7.json.state
_skbuild/
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
2024.05.04
==========

Releases: libmamba 2.0.0beta1, libmambapy 2.0.0beta1, micromamba 2.0.0beta1

Enhancements:

- [libmambapy, libmamba] Bind text_style and graphic params by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3266
- [libmambapy] Bind VersionPredicate by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3255
- [all] Update pre-commit hooks" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3252
- [micromamba, libmamba] Refactor os utilities by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3248
- [libmamba] Implemented OCI mirrors by @JohanMabille in https://github.com/mamba-org/mamba/pull/3246
- [libmamba] Passed url_path to request_generators by @JohanMabille in https://github.com/mamba-org/mamba/pull/3245
- [libmambapy, libmamba] Handle regex in build string by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3239
- [micromamba, libmamba] [mamba-content-trust] Add integration test by @Hind-M in https://github.com/mamba-org/mamba/pull/3234
- [libmamba] Release libsolv memory before installation by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3238
- [all] Custom resolve complex MatchSpec in Solver by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3233
- [libmambapy, libmamba] Add MatchSpec::contains_except_channel" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3231
- [all] [mamba content trust] Enable verifying packages signatures by @Hind-M in https://github.com/mamba-org/mamba/pull/3192
- [libmambapy, libmamba] Refactor MatchSpec::str by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3215
- [all] Subdir renaming by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3214
- [libmambapy, libmamba] Fully bind MatchSpec by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3213
- [libmamba] Add more MatchSpec tests by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3211
- [micromamba, libmamba] Expected in specs parse API by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3207

Bug fixes:

- [libmamba] Hotfix to allow Ctrl+C in python scipts by @Klaim in https://github.com/mamba-org/mamba/pull/3285
- [libmamba] Fix typos in comments by @ryandesign in https://github.com/mamba-org/mamba/pull/3272
- [all] Fix VersionSpec equal and glob by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3269
- [libmamba] Fix pin repr in solver error messages by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3268
- [libmambapy] Add missing pybind header by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3256
- [libmambapy, libmamba] Don't add duplicate .conda and .tar.bz2 packages by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3253
- [all] Use conda-forge feedstock for static builds by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3249
- [micromamba, libmamba] Mamba 2.0 name fixes by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3225
- [all] Make Taskfile.dist.yml Windows-compatible by @carschandler in https://github.com/mamba-org/mamba/pull/3219
- [libmamba] fix(micromamba): anaconda private channels not working by @s22chan in https://github.com/mamba-org/mamba/pull/3220

CI fixes and doc:

- [micromamba] Test with xtensor-python instead of unmaintained xframe by @JohanMabille in https://github.com/mamba-org/mamba/pull/3286
- [all] Small changelog additions by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3254
- [all] Fixed a spelling mistake in micromamba-installation.rst by @codeblech in https://github.com/mamba-org/mamba/pull/3236
- [all] Typos in dev_environment.rst by @jd-foster in https://github.com/mamba-org/mamba/pull/3235
- [all] Add MatchSpec doc and fix errors by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3224

2024.04.04
==========

Expand Down
3 changes: 1 addition & 2 deletions dev/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ dependencies:
- conda-content-trust
- conda-package-handling
- cryptography<40.0 # Or breaks conda-content-trust
- pip:
- securesystemslib
- securesystemslib
# libmambapy build dependencies
- scikit-build
- build
Expand Down
39 changes: 39 additions & 0 deletions libmamba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
libmamba 2.0.0beta1 (May 04, 2024)
==================================

Enhancements:

- Bind text_style and graphic params by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3266
- Update pre-commit hooks" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3252
- Refactor os utilities by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3248
- Implemented OCI mirrors by @JohanMabille in https://github.com/mamba-org/mamba/pull/3246
- Passed url_path to request_generators by @JohanMabille in https://github.com/mamba-org/mamba/pull/3245
- Handle regex in build string by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3239
- Release libsolv memory before installation by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3238
- Custom resolve complex MatchSpec in Solver by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3233
- Add MatchSpec::contains_except_channel" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3231
- Refactor MatchSpec::str by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3215
- Subdir renaming by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3214
- Fully bind MatchSpec by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3213
- Add more MatchSpec tests by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3211
- Expected in specs parse API by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3207

Bug fixes:

- Hotfix to allow Ctrl+C in python scipts by @Klaim in https://github.com/mamba-org/mamba/pull/3285
- Fix typos in comments by @ryandesign in https://github.com/mamba-org/mamba/pull/3272
- Fix VersionSpec equal and glob by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3269
- Fix pin repr in solver error messages by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3268
- Don't add duplicate .conda and .tar.bz2 packages by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3253
- Use conda-forge feedstock for static builds by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3249
- Mamba 2.0 name fixes by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3225
- Make Taskfile.dist.yml Windows-compatible by @carschandler in https://github.com/mamba-org/mamba/pull/3219
- fix(micromamba): anaconda private channels not working by @s22chan in https://github.com/mamba-org/mamba/pull/3220

CI fixes and doc:

- Small changelog additions by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3254
- Fixed a spelling mistake in micromamba-installation.rst by @codeblech in https://github.com/mamba-org/mamba/pull/3236
- Typos in dev_environment.rst by @jd-foster in https://github.com/mamba-org/mamba/pull/3235
- Add MatchSpec doc and fix errors by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3224

libmamba 2.0.0beta0 (April 04, 2024)
====================================

Expand Down
1 change: 1 addition & 0 deletions libmamba/include/mamba/core/thread_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace mamba
#endif

void set_default_signal_handler();
void restore_system_signal_handler();
bool is_sig_interrupted() noexcept;
void set_sig_interrupted() noexcept;

Expand Down
8 changes: 8 additions & 0 deletions libmamba/src/core/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ namespace mamba
void Context::use_default_signal_handler(bool val)
{
use_default_signal_handler_val = val;
if (use_default_signal_handler_val)
{
set_default_signal_handler();
}
else
{
restore_system_signal_handler();
}
}

void Context::enable_logging_and_signal_handling(Context& context)
Expand Down
4 changes: 4 additions & 0 deletions libmamba/src/core/thread_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ namespace mamba
std::signal(SIGINT, [](int /*signum*/) { set_sig_interrupted(); });
}
#endif
void restore_system_signal_handler()
{
std::signal(SIGINT, SIG_DFL);
}

bool is_sig_interrupted() noexcept
{
Expand Down
30 changes: 30 additions & 0 deletions libmambapy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
libmambapy 2.0.0beta1 (May 04, 2024)
====================================

Enhancements:

- Bind text_style and graphic params by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3266
- Bind VersionPredicate by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3255
- Update pre-commit hooks" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3252
- Handle regex in build string by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3239
- Custom resolve complex MatchSpec in Solver by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3233
- Add MatchSpec::contains_except_channel" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3231
- Refactor MatchSpec::str by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3215
- Subdir renaming by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3214
- Fully bind MatchSpec by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3213

Bug fixes:

- Fix VersionSpec equal and glob by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3269
- Add missing pybind header by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3256
- Don't add duplicate .conda and .tar.bz2 packages by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3253
- Use conda-forge feedstock for static builds by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3249
- Make Taskfile.dist.yml Windows-compatible by @carschandler in https://github.com/mamba-org/mamba/pull/3219

CI fixes and doc:

- Small changelog additions by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3254
- Fixed a spelling mistake in micromamba-installation.rst by @codeblech in https://github.com/mamba-org/mamba/pull/3236
- Typos in dev_environment.rst by @jd-foster in https://github.com/mamba-org/mamba/pull/3235
- Add MatchSpec doc and fix errors by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3224

libmambapy 2.0.0beta0 (April 04, 2024)
======================================

Expand Down
27 changes: 27 additions & 0 deletions micromamba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
micromamba 2.0.0beta1 (May 04, 2024)
====================================

Enhancements:

- Update pre-commit hooks" by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3252
- Refactor os utilities by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3248
- Add integration test by @Hind-M in https://github.com/mamba-org/mamba/pull/3234
- Custom resolve complex MatchSpec in Solver by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3233
- Subdir renaming by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3214
- Expected in specs parse API by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3207

Bug fixes:

- Fix VersionSpec equal and glob by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3269
- Use conda-forge feedstock for static builds by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3249
- Mamba 2.0 name fixes by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3225
- Make Taskfile.dist.yml Windows-compatible by @carschandler in https://github.com/mamba-org/mamba/pull/3219

CI fixes and doc:

- Test with xtensor-python instead of unmaintained xframe by @JohanMabille in https://github.com/mamba-org/mamba/pull/3286
- Small changelog additions by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3254
- Fixed a spelling mistake in micromamba-installation.rst by @codeblech in https://github.com/mamba-org/mamba/pull/3236
- Typos in dev_environment.rst by @jd-foster in https://github.com/mamba-org/mamba/pull/3235
- Add MatchSpec doc and fix errors by @AntoinePrv in https://github.com/mamba-org/mamba/pull/3224

micromamba 2.0.0beta0 (April 04, 2024)
======================================

Expand Down
44 changes: 22 additions & 22 deletions micromamba/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_specs(tmp_home, tmp_root_prefix, tmp_path, source, file_type, create_cm
specs = []

if source in ("cli_only", "both"):
specs = ["xframe", "xtl"]
specs = ["xtensor-python", "xtl"]
cmd += specs

if source in ("spec_file_only", "both"):
Expand Down Expand Up @@ -112,18 +112,19 @@ def test_lockfile(tmp_home, tmp_root_prefix, tmp_path):
assert any(package["name"] == "zlib" and package["version"] == "1.2.11" for package in packages)


@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
def test_lockfile_online(tmp_home, tmp_root_prefix, tmp_path):
env_prefix = tmp_path / "myenv"
spec_file = (
"https://raw.githubusercontent.com/mamba-org/mamba/main/micromamba/tests/test_env-lock.yaml"
)

res = helpers.create("-p", env_prefix, "-f", spec_file, "--json")
assert res["success"]

packages = helpers.umamba_list("-p", env_prefix, "--json")
assert any(package["name"] == "zlib" and package["version"] == "1.2.11" for package in packages)
# TODO: uncomment when https://github.com/mamba-org/mamba/pull/3286 is merged
# @pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
# def test_lockfile_online(tmp_home, tmp_root_prefix, tmp_path):
# env_prefix = tmp_path / "myenv"
# spec_file = (
# "https://raw.githubusercontent.com/mamba-org/mamba/main/micromamba/tests/test_env-lock.yaml"
# )
#
# res = helpers.create("-p", env_prefix, "-f", spec_file, "--json")
# assert res["success"]
#
# packages = helpers.umamba_list("-p", env_prefix, "--json")
# assert any(package["name"] == "zlib" and package["version"] == "1.2.11" for package in packages)


@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
Expand Down Expand Up @@ -736,7 +737,7 @@ def test_channel_nodefaults(tmp_home, tmp_root_prefix, tmp_path):
" - yaml",
" - nodefaults",
"dependencies:",
" - xframe",
" - xtensor-python",
]
with open(spec_file, "w") as f:
f.write("\n".join(contents))
Expand All @@ -758,7 +759,7 @@ def test_channel_nodefaults(tmp_home, tmp_root_prefix, tmp_path):
@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
def test_pin_applicable(tmp_home, tmp_root_prefix, tmp_path):
pin_name = "xtensor"
pin_max_version = "0.20"
pin_max_version = "0.24"
# We add the channel to test a fragile behavior of ``Database``
spec_name = "conda-forge::xtensor"
rc_file = tmp_path / "rc.yaml"
Expand All @@ -774,7 +775,7 @@ def test_pin_applicable(tmp_home, tmp_root_prefix, tmp_path):
install_pkg = p

# Should do proper version comparison
assert install_pkg["version"] == "0.20.0"
assert install_pkg["version"] == "0.24.0"


@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
Expand Down Expand Up @@ -826,7 +827,6 @@ def test_set_platform(tmp_home, tmp_root_prefix):
@pytest.mark.parametrize(
"version,build,cache_tag",
[
["2.7", "*", ""],
["3.10", "*_cpython", "cpython-310"],
# FIXME: https://github.com/mamba-org/mamba/issues/1432
# [ "3.7", "*_pypy","pypy37"],
Expand Down Expand Up @@ -1025,15 +1025,15 @@ def add_glibc_virtual_package():
@pytest.fixture
def copy_channels_osx():
for channel in ["a", "b"]:
if not (__this_dir__ / f"channel_{channel}/osx-64").exists():
if not (__this_dir__ / f"channel_{channel}/osx-arm64").exists():
shutil.copytree(
__this_dir__ / f"channel_{channel}/linux-64",
__this_dir__ / f"channel_{channel}/osx-64",
__this_dir__ / f"channel_{channel}/osx-arm64",
)
with open(__this_dir__ / f"channel_{channel}/osx-64/repodata.json") as f:
with open(__this_dir__ / f"channel_{channel}/osx-arm64/repodata.json") as f:
repodata = f.read()
with open(__this_dir__ / f"channel_{channel}/osx-64/repodata.json", "w") as f:
repodata = repodata.replace("linux", "osx")
with open(__this_dir__ / f"channel_{channel}/osx-arm64/repodata.json", "w") as f:
repodata = repodata.replace("linux-64", "osx-arm64")
f.write(repodata)


Expand Down
24 changes: 24 additions & 0 deletions micromamba/tests/test_env-lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ metadata:
- linux-64
- osx-64
- win-64
- osx-arm64
sources:
- environment.yml
package:
Expand Down Expand Up @@ -124,6 +125,29 @@ package:
platform: osx-64
url: https://conda.anaconda.org/conda-forge/osx-64/zlib-1.2.11-h9173be1_1013.tar.bz2
version: 1.2.11
- category: main
dependencies: {}
hash:
md5: fe3c74ef0fe456a4011468f860b0c3dc
sha256: 008465adb9815441f03437393d4274e0154edc55e278bdf1acdf87224d1107e6
manager: conda
name: libzlib
optional: false
platform: osx-arm64
url: https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.2.11-hee7b306_1013.tar.bz2
version: 1.2.11
- category: main
dependencies:
libzlib: 1.2.11 hee7b306_1013
hash:
md5: 0b65c3db409dd06257dd879605eddb45
sha256: 04cbcc43aaf9b1ba31eddb0a93adb1a025156542fd4ba2b7b66b4ba4f4126d50
manager: conda
name: zlib
optional: false
platform: osx-arm64
url: https://conda.anaconda.org/conda-forge/osx-arm64/zlib-1.2.11-hee7b306_1013.tar.bz2
version: 1.2.11
- category: main
dependencies: {}
hash:
Expand Down
12 changes: 6 additions & 6 deletions micromamba/tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ def test_env_remove(tmp_home, tmp_root_prefix):
def test_env_update(tmp_home, tmp_root_prefix, tmp_path, prune):
env_name = "env-create-update"

# Create env with python=3.6.15 and xtensor=0.20.0
helpers.create("python=3.6.15", "xtensor=0.20.0", "-n", env_name, "--json", no_dry_run=True)
# Create env with python=3.11.0 and xtensor=0.25.0
helpers.create("python=3.11.0", "xtensor=0.25.0", "-n", env_name, "--json", no_dry_run=True)
packages = helpers.umamba_list("-n", env_name, "--json")
assert any(
package["name"] == "python" and package["version"] == "3.6.15" for package in packages
package["name"] == "python" and package["version"] == "3.11.0" for package in packages
)
assert any(
package["name"] == "xtensor" and package["version"] == "0.20.0" for package in packages
package["name"] == "xtensor" and package["version"] == "0.25.0" for package in packages
)
assert any(package["name"] == "xtl" for package in packages)

Expand All @@ -161,7 +161,7 @@ def test_env_update(tmp_home, tmp_root_prefix, tmp_path, prune):
helpers.run_env(*cmd)
packages = helpers.umamba_list("-n", env_name, "--json")
assert any(
package["name"] == "python" and Version(package["version"]) > Version("3.6.15")
package["name"] == "python" and Version(package["version"]) > Version("3.11.0")
for package in packages
)
if prune:
Expand All @@ -170,7 +170,7 @@ def test_env_update(tmp_home, tmp_root_prefix, tmp_path, prune):
assert not any(package["name"] == "xtl" for package in packages)
else:
assert any(
package["name"] == "xtensor" and package["version"] == "0.20.0" for package in packages
package["name"] == "xtensor" and package["version"] == "0.25.0" for package in packages
)
assert any(package["name"] == "xtl" for package in packages)

Expand Down
Loading

0 comments on commit 91e7d3e

Please sign in to comment.