Skip to content

Commit

Permalink
Merge branch 'conda-incubator:main' into added-new-faqs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinak-Datta authored Jun 4, 2023
2 parents b0e55bf + fc21645 commit 2489a5b
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bin/update-news
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import pathlib
import re
from typing import Sequence, Any, Iterator

import ruamel_yaml as yaml
import ruamel.yaml as yaml


#: Directory where blog posts are located
Expand Down Expand Up @@ -100,7 +100,7 @@ def get_file_data(files: Sequence[str]) -> Iterator[dict[str, Any]]:
if len(parts) > 1:
yml_part = parts[1]
yml_part = yml_part.strip("\n")
yml_obj = yaml.load(yml_part, yaml.CLoader)
yml_obj = yaml.load(yml_part, yaml.Loader)
date = get_date_from_filename(file)

# We only want to have "image" present for the first listing
Expand Down
150 changes: 150 additions & 0 deletions blog/2023-05-31-may-releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: "May Releases for Conda, Conda-Build, and Conda-Libmamba-Solver"
slug: "2023-05-31-may-2023-releases"
description: |
Conda 23.5.0, conda-build 3.25.0, and conda-libmamba-solver 23.5.0 have been released! 🎉
authors: [beeankha]
tags: [announcement, conda, conda-build, conda-libmamba-solver]
image: img/blog/2023-05-31-may-releases/tada.jpg

---

May releases are here! 🎊 Conda 23.5.0, conda-build 3.25.0, and conda-libmamba-solver 23.5.0 are now available on both main and conda-forge:

## [Changes in Conda](https://github.com/conda/conda/releases/tag/23.5.0)

To update conda, run:
```bash
conda install -n base conda=23.5.0
```

### ✨ What's New? ✨

The long-awaited [`conda doctor` subcommand plugin](https://conda.org/blog/2023-05-11-conda-doctor/) has been implemented! The [related conda issue is over nine years old](https://github.com/conda/conda/issues/474) and has been a regularly requested feature. The `conda doctor` command enables conda users to detect any packages with files missing (i.e., corrupt packages) in their conda environment.

<!-- truncate -->

Additionally, the following features and changes can be found in conda 23.5.0:

* `conda list --reverse` is a new option for the `conda list` command which returns a reversed list of installed packages.
* Folks who have [signature verification](https://www.anaconda.com/blog/conda-signature-verification) enabled will get warnings instead of an `info`-level message about misconfiguration.
* More functional tests have been added around conda's content trust code.
* For our build system, we switched from `setup.py` to `pyproject.toml` and use [Hatchling](https://pypi.org/project/hatchling/).
* [Which Python modules get imported during `conda activate` calls are now optimized for speed.](https://github.com/conda/conda/pull/12550)
* The `conda_cli` pytest fixture has been added in order to replace `conda.testing.helpers.run_inprocess_conda_command` and `conda.testing.integration.run_command`.
* The `tmp_env` pytest fixture has been added in order to replace `conda.testing.integration.make_temp_env`.
* The `path_factory` pytest fixture has been added to replace custom prefix logic like `conda.testing.integration._get_temp_prefix` and `conda.testing.integration.make_temp_prefix`.
* All three of the above pytest fixtures have been documented in the article [Integration Tests](https://docs.conda.io/projects/conda/en/stable/dev-guide/writing-tests/integration-tests.html).
* The way that the `Activator` classes are defined in `conda/activate.py` has been refactored.
* The index cache metadata file `.state.json` was renamed to `.info.json` to track [draft Repodata Metadata `.info.json` CEP](https://github.com/conda-incubator/ceps/pull/48).
* Improved cache locking and logging when using `jlap`.
* The project's README example has changed from IPython Notebook and NumPy to PyTorch.
* Retry language in flexible solve and `repodata` logs are now more user friendly.
* Python 3.11 is now supported.


### 🔧 What Got Fixed? 🔧

The following bug fixes were implemented in the 23.5.0 version of conda:

* `conda clean` no longer fails if it was unable to get the file stats.
* If `conda.deprecations.DeprecationHandler` receives a bad version, a fallback version is provided.
* The default value for `defaults` includes `msys2` when `context.subdir` is `win-*` on non-Windows platforms.
* `TypeError`s are avoided when non-string types are written to the index cache metadata.
* `conda.core.package_cache_data.UrlsData.get_url` no longer fails when `package_path` has a `.conda` extension.
* No more pre-converting of paths to Unix style on Windows in `conda.sh`; this done to make them prefix-replaceable upon installation.


### 🌅 What's Marked for [Deprecation](https://github.com/conda-incubator/ceps/blob/main/cep-9.md)? 🌅

The following modules and functions were marked for deprecation:

* [`conda_env.pip_util.get_pip_version`](https://github.com/conda/conda/pull/12492)
* [`conda_env.pip_util.PipPackage`](https://github.com/conda/conda/pull/12492)
* [`conda_env.pip_util.installed`](https://github.com/conda/conda/pull/12492)
* [`conda_env.pip_util._canonicalize_name`](https://github.com/conda/conda/pull/12492)
* [`conda_env.pip_util.add_pip_installed`](https://github.com/conda/conda/pull/12492)
* [`conda_env.env.load_from_directory`](https://github.com/conda/conda/pull/12492)
* [`python -m conda_env.cli.main`](https://github.com/conda/conda/pull/12492) (use `conda env` instead)
* [`python -m conda_env`](https://github.com/conda/conda/pull/12492) (use `conda env` instead)
* [`conda.auxlib.packaging`](https://github.com/conda/conda/pull/12509)
* [`conda.testing.integration.get_conda_list_tuple`](https://github.com/conda/conda/pull/12676) (use `conda.core.prefix_data.PrefixData().get()` instead)
* [`conda.testing.encode_for_env_var`](https://github.com/conda/conda/pull/12677)
* [`conda.testing.integration.temp_chdir`](https://github.com/conda/conda/pull/12678) (use `monkeypatch.chdir` instead)

* * *

## [Changes in Conda-Build](https://github.com/conda/conda-build/releases/tag/3.25.0)

To update conda-build, run:
```bash
conda install -n base conda-build=3.25.0
```

### ✨ What's New? ✨

In the latest version of conda-build, noarch packages that use virtual packages can now be added to the hash contents of a package. This facilitates the building of noarch packages multiple times for different platforms with platform-specific dependencies. In conda-build 3.25.0, different variants can be built for `__linux`, `__osx`, or `__win` and get non-clashing package file names.

Additionally, the following features and changes can be found in conda-build 3.25.0:

* Support for [`svn` source credentials](https://docs.conda.io/projects/conda-build/en/3.25.x/resources/define-metadata.html#source-from-svn) (`svn_username` and `svn_password`).
* Standalone `conda-index` is now utilized instead of bundled indexing code.
* For our build system, we switched from `setup.py` to `pyproject.toml` and use [Hatchling](https://pypi.org/project/hatchling/).
* Minor code simplification for `conda_build.index.ChannelIndex._ensuredirs`.
* `xattr` test is enabled on MacOS.
* Python 3.11 is now supported.


### 🔧 What Got Fixed? 🔧

The following bug fixes were implemented in the 3.25.0 version of conda-build:

* `tests/commands` can also run in the presence of `run_test.*`.
* When rendering a recipe that uses the `load_file_data` Jinja2 function, the source is now required.
* Download packages during build into the correct `subdir` folder.
* A unique `subdir` variable name is used when rebuilding the index for multi-output builds, which fixes an error that occurs during true cross-compilation of `osx-arm64` packages from `osx-64`.


### 🌅 What's Marked for [Deprecation](https://github.com/conda-incubator/ceps/blob/main/cep-9.md)? 🌅

* [Inline `conda index` logic](https://github.com/conda/conda-build/pull/4828) (`conda-build` still provides `conda-index` a.k.a. `conda index` CLI, but uses standalone `conda-index` during builds).
* Prefer the [standalone conda-index package](https://conda.github.io/conda-index/), instead of `conda-build index` or `conda index`, to use faster indexing code.
* [`conda_build.metadata.ns_cfg`](https://github.com/conda/conda-build/pull/4837) (use `conda_build.get_selectors.get_selectors` instead). (#4837)
* [`conda_build.config.python2_fs_encode`](https://github.com/conda/conda-build/pull/4843)
* [`conda_build.config._ensure_dir`](https://github.com/conda/conda-build/pull/4843) (use `stdlib`'s `pathlib.Path.mkdir(exist_ok=True)` or `os.makedirs(exist_ok=True)` instead).

* * *

## [Changes in Conda-Libmamba-Solver](https://github.com/conda/conda-libmamba-solver/releases/tag/23.5.0)

To update conda-libmamba-solver, run:
```bash
conda install -n base conda-libmamba-solver=23.5.0
```

### ✨ What's New? ✨

Amongst other improvements and bug fixes, the latest version of the conda-libmamba-solver provides a `CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED` environment variable to prevent channels from being injected from installed packages, which is useful for air-gapped environments where external channel servers are not reachable.

Additionally, the following features and changes can be found in conda-libmamba-solver 23.5.0:

* Simplify `libmambapy.Context` initialization so that we only set the parts that we use.
* Use the new `RepoInterface` and remove the `SubdirData` subclass workarounds, which requires conda 23.5.0.
* Known solver behavior differences are now documented.
* Development docs have been updated to reflect changes in build system and other inaccuracies.
* Tests reproducing the known solver differences were added.
* Some tests on `libmamba` 1.4.2 are now skipped temporarily to workaround some test failures.


### 🔧 What Got Fixed? 🔧

The following bug fixes were implemented in the 23.5.0 version of conda-libmamba-solver:

* An issue where running `conda update <package>` would result in the package being downgraded if no newer versions were available has been fixed.
* conda-libmamba-solver 23.5.0 ensures that unauthenticated channels are not re-injected in the channel lists from installed packages if an authenticated equivalent is already present.
* `context.repodata_threads` are honored.


### 🌅 What's Marked for [Deprecation](https://github.com/conda-incubator/ceps/blob/main/cep-9.md)? 🌅

* Unnecessary user-agent tests were removed.
Original file line number Diff line number Diff line change
@@ -1,32 +1,55 @@
---
title: "conda doctor: Detecting conda environment inconsistencies easily"
slug: "2023-05-11-conda-doctor"
title: "Conda doctor: Detecting conda environment inconsistencies easily"
slug: "2023-06-01-conda-doctor"
description: |
The new `conda doctor` command allows users to detect packages with missing files in their conda environments.
authors: [forgottenprogramme]
tags: [conda, environments]
image: img/blog/2023-06-01-conda-doctor/stethoscope.jpg

---
The newest `conda doctor` command will be available with the latest conda 23.5.0, enabling conda users to quickly detect corrupted packages (packages with files missing) in their conda environment.

import Image from '@theme/IdealImage';
import condadoctor from '@site/static/img/blog/2023-06-01-conda-doctor/stethoscope.jpg';

<Image img={condadoctor} alt="Banner image for blog post; picture of a stethoscope"/>

<hr />

<p>
<i>
Photo by Roman Valiev on <a href="https://www.istockphoto.com/stock-photos">Getty Images/iStockphoto</a>
</i>
</p>

---

The newest `conda doctor` command will be available with conda version 23.5.0, enabling users to quickly detect corrupted packages (packages with files missing) in their conda environment.

One way packages in an environment may become corrupt is when one or more files in that package are accidentally deleted. Even a single missing file leads to a corrupted package.
Until now there was no way to learn of these missing files except manually checking for their existence. With `conda doctor`, users can learn about all such packages in their conda environment with a single short command.
Until now there was no way to learn of these missing files except manually checking for their existence. With `conda doctor`, users can learn about all such packages in their conda environment with a single short command.

<!-- truncate -->

## How Does It Work?

Every conda environment has a `conda-meta` directory associated with it, which keeps a log of all the packages (and all the files in them) ever installed into that environment.
`conda doctor` parses these metadata files, checks for the existence of each of the listed files, and reports the missing ones.
This is extremely helpful, as it is otherwise very difficult to know that a package has missing files and to detect these missing files in the package.

## The Plugin Mechanism

`conda doctor` is implemented using conda’s new [plugins mechanism](https://www.anaconda.com/blog/introducing-a-new-plugin-mechanism-for-conda/), utilizing the "subcommand plugin hook", and comes bundled with conda itself.

Often the issues that conda users run into are issues in their conda environment. The idea behind implementing a `conda doctor` command is to "diagnose" the inconsistencies in a conda environment and report to the user, therefore empowering the user to better understand the cause of the issues they are experiencing.

## A Nine Year Old Issue

What’s interesting is that [this feature was requested by Peter Wang](https://github.com/conda/conda/issues/474), the CEO of Anaconda, nine years ago in the early days of conda. A number of features requested via this `conda doctor` issue back then ended up being implemented elsewhere in conda over the years.
`conda doctor` was eventually boiled down to “a command that will diagnose the health of the environment and report inconsistencies to the user”.

## Health Checks

We designed the `conda doctor` functionality to have various “health checks” for the user’s environment. The first health check implemented and made available to users in this release is “detect missing files in packages”. More health checks will be made available in `conda doctor` in future releases.
Go check out the new `conda doctor` command and do let us know of any “health checks” you would like `conda doctor` to have that would improve your `conda` experience.
You can do so by opening a feature request on the [conda GitHub repository](https://github.com/conda/conda).

Go check out the new `conda doctor` command and let us know of any “health checks” you would like `conda doctor` to have that would improve your conda experience. You can do so by opening a feature request on the [conda GitHub repository](https://github.com/conda/conda).
5 changes: 5 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ baszalmstra:
title: "prefix.dev"
url: https://github.com/baszalmstra
image_url: https://avatars.githubusercontent.com/u/4995967?v=4
beeankha:
name: Bianca Henderson
title: Conda maintainer 🐍📦
url: https://github.com/beeankha
image_url: https://github.com/beeankha.png
dholth:
name: Daniel Holth
title: Conda maintainer
Expand Down
2 changes: 1 addition & 1 deletion blog/news.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"title": "How to use conda-build to build a Python package with C/C++ dependencies", "slug": "2023-05-18-how-to-use-conda-build.md", "authors": ["vasvi"], "tags": ["conda"], "image": "img/blog/2023-05-18-how-to-use-conda-build/conda-build.png", "description": "We have created a blog to help you create your own Python package with Conda-build", "date": "2023-05-18T00:00:00"}, {"title": "How we reduced conda's index fetch bandwidth by 99%", "slug": "2023-05-05-how-we-reduced-the-conda-index-fetch-bandwidth", "description": "The new conda 23.3.1 release from March, 2023 includes an --experimental=jlap\nflag or experimental: [\"jlap\"] .condarc setting that can reduce repdata.json\nfetch bandwidth by orders of magnitude. This is how we developed conda's new\nincremental repodata feature.\n", "authors": ["dholth"], "tags": ["conda", "python"], "image": null, "date": "2023-05-05T00:00:00"}, {"title": "Welcome to conda.org!", "slug": "2022-04-27-welcome-to-conda-dot-org", "tags": ["announcement"], "authors": ["travishathaway"], "description": "Welcome to our new website! In this article, we talk about why we built\nit and where we see it going as more content and features are added in\nthe future.\n", "image": null, "date": "2023-04-27T00:00:00"}, {"title": "Conda survey results", "slug": "2022-03-30-conda-survey", "tags": ["conda"], "authors": ["tnabtaf"], "description": "In late 2022, Anaconda surveyed the community. This post reviews what we\nlearned from that survey and how it is impacting the future directions of conda.\n", "image": null, "date": "2023-03-30T00:00:00"}, {"title": "Conda Community Chat is now on Element/Matrix", "slug": "2023-02-01-conda-now-on-matrix", "authors": ["tnabtaf"], "tags": ["conda"], "image": null, "description": "We are pleased to announce that the conda community has migrated our chat rooms to the Matrix/Element platform.", "date": "2023-02-01T00:00:00"}]
[{"title": "Conda doctor: Detecting conda environment inconsistencies easily", "slug": "2023-06-01-conda-doctor", "description": "The new `conda doctor` command allows users to detect packages with missing files in their conda environments.\n", "authors": ["forgottenprogramme"], "tags": ["conda", "environments"], "image": "img/blog/2023-06-01-conda-doctor/stethoscope.jpg", "date": "2023-06-01T00:00:00"}, {"title": "May Releases for Conda, Conda-Build, and Conda-Libmamba-Solver", "slug": "2023-05-31-may-2023-releases", "description": "Conda 23.5.0, conda-build 3.25.0, and conda-libmamba-solver 23.5.0 have been released! \ud83c\udf89\n", "authors": ["beeankha"], "tags": ["announcement", "conda", "conda-build", "conda-libmamba-solver"], "image": null, "date": "2023-05-31T00:00:00"}, {"title": "How to use conda-build to build a Python package with C/C++ dependencies", "slug": "2023-05-18-how-to-use-conda-build", "authors": ["vasvi"], "tags": ["conda"], "image": null, "description": "We have created a blog to help you create your own Python package with Conda-build", "date": "2023-05-18T00:00:00"}, {"title": "How we reduced conda's index fetch bandwidth by 99%", "slug": "2023-05-05-how-we-reduced-the-conda-index-fetch-bandwidth", "description": "The new conda 23.3.1 release from March, 2023 includes an --experimental=jlap\nflag or experimental: [\"jlap\"] .condarc setting that can reduce repdata.json\nfetch bandwidth by orders of magnitude. This is how we developed conda's new\nincremental repodata feature.\n", "authors": ["dholth"], "tags": ["conda", "python"], "image": null, "date": "2023-05-05T00:00:00"}, {"title": "Welcome to conda.org!", "slug": "2022-04-27-welcome-to-conda-dot-org", "tags": ["announcement"], "authors": ["travishathaway"], "description": "Welcome to our new website! In this article, we talk about why we built\nit and where we see it going as more content and features are added in\nthe future.\n", "image": null, "date": "2023-04-27T00:00:00"}]
Binary file added static/img/blog/2023-05-31-may-releases/tada.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2489a5b

Please sign in to comment.