Skip to content

pixi upgrade writes dependencies from dependency groups into pypi dependency array #6239

Closed

Description

@dlugoschvincent

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

pixi upgrade

pixi.toml/pyproject.toml file that reproduces my issue:

[project]
name = "zalfmas-fbp"
version = "0.2.33"
description = "lib and tooling for Cap'n Proto-based FBP flows"
readme = "README.md"
requires-python = ">=3.12,<3.14"
authors = [{ name = "Michael Berg-Mohnicke", email = "[email protected]" }]
dependencies = [
  "tomli-w>=1.2.0,<2",
  "netcdf4>=1.7.4,<2",
  "spotpy>=1.6.7,<2",
  "matplotlib>=3.10.9,<4",
  "pycapnp>=2.2.2,<3",
  "zalfmas-common>=0.1.45,<0.2",
  "zalfmas-capnp-schemas>=0.1.66,<0.2",
  "zalfmas-services>=0.1.16,<0.2",
  "pymep>=1.0.7,<2",
  "pydantic>=2.13.4,<3",
  "geojson-pydantic>=2.1.1,<3",
  "rasterio>=1.5.0,<2",
  "geopandas>=1.1.3,<2",
  "pyarrow>=24.0.0,<25",
  "duckdb>=1.5.3,<2",
  "owslib>=0.35.0,<0.36",
  "boto3>=1.43.17,<2",
]

[dependency-groups]
dev = [
  "pytest>=9.0.3,<10",
  "ruff>=0.15.14,<0.16",
  "ty>=0.0.39,<0.0.40",
  "types-boto3[all,s3]>=1.43.15,<2",
  "basedpyright>=1.39.6,<2",
]

[tool.pixi.dependencies]
libsodium = ">=1.0.22,<2"

[tool.pixi.feature.dev.dependencies]
pixi-pycharm = ">=0.0.11,<0.0.12"
pixi = ">=0.69.0,<0.70"

[tool.pixi.environments]
dev = ["dev"]

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]

# Now after running `pixi upgrade` I get this pyproject.toml not the new lines under dependencies this breaks the functionality of having dependency groups as now the default environment contains all dependencies. Note the version contraints in the dependency group are not updated. 

dependencies = [
  "tomli-w>=1.2.0,<2",
  "netcdf4>=1.7.4,<2",
  "spotpy>=1.6.7,<2",
  "matplotlib>=3.10.9,<4",
  "pycapnp>=2.2.2,<3",
  "zalfmas-common>=0.1.45,<0.2",
  "zalfmas-capnp-schemas>=0.1.66,<0.2",
  "zalfmas-services>=0.1.16,<0.2",
  "pymep>=1.0.7,<2",
  "pydantic>=2.13.4,<3",
  "geojson-pydantic>=2.1.1,<3",
  "rasterio>=1.5.0,<2",
  "geopandas>=1.1.3,<2",
  "pyarrow>=24.0.0,<25",
  "duckdb>=1.5.3,<2",
  "owslib>=0.35.0,<0.36",
  "boto3>=1.43.17,<2",
  "pytest>=9.0.3,<10",
  "ruff>=0.15.15,<0.16",
  "ty>=0.0.40,<0.0.41",
  "types-boto3[all,s3]>=1.43.17,<2",
  "basedpyright>=1.39.6,<2",
]

[dependency-groups]
dev = [
  "pytest>=9.0.3,<10",
  "ruff>=0.15.14,<0.16",
  "ty>=0.0.39,<0.0.40",
  "types-boto3[all,s3]>=1.43.15,<2",
  "basedpyright>=1.39.6,<2",
]

[tool.pixi.dependencies]
libsodium = ">=1.0.22,<2"

[tool.pixi.feature.dev.dependencies]
pixi-pycharm = ">=0.0.11,<0.0.12"
pixi = ">=0.69.0,<0.70"

[tool.pixi.environments]
dev = ["dev"]

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]

pixi info output:

[I] vdlugosch@z16 ➜ mas_python_fbp git:(main) ✗ pixi info                                                                                                                  (zalfmas-fbp:dev)
System
------------
       Pixi version: 0.69.0
        TLS backend: rustls
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=7.0.10=0
                   : __glibc=2.42=0
                   : __archspec=1=zen3
          Cache dir: /home/vdlugosch/.cache/rattler/cache
       Auth storage: /home/vdlugosch/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/vdlugosch/.pixi/bin
    Environment dir: /home/vdlugosch/.pixi/envs
       Manifest dir: /home/vdlugosch/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: zalfmas-fbp
            Version: 0.2.33
      Manifest file: /home/vdlugosch/Zalf/dakis/helm-charts/sources/mas_python_fbp/pyproject.toml
       Last updated: 29-05-2026 11:20:52

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 2
       Dependencies: libsodium, python
  PyPI Dependencies: tomli-w, netcdf4, spotpy, matplotlib, pycapnp, zalfmas-common, zalfmas-capnp-schemas, zalfmas-services, pymep, pydantic, geojson-pydantic, rasterio, geopandas, pyarrow, duckdb, owslib, boto3
   Target platforms: linux-64
    Prefix location: /home/vdlugosch/Zalf/dakis/helm-charts/sources/mas_python_fbp/.pixi/envs/default

        Environment: dev
           Features: dev, default
           Channels: conda-forge
   Dependency count: 4
       Dependencies: pixi-pycharm, pixi, libsodium, python
  PyPI Dependencies: pytest, ruff, ty, types-boto3, basedpyright, tomli-w, netcdf4, spotpy, matplotlib, pycapnp, zalfmas-common, zalfmas-capnp-schemas, zalfmas-services, pymep, pydantic, geojson-pydantic, rasterio, geopandas, pyarrow, duckdb, owslib, boto3
   Target platforms: linux-64
    Prefix location: /home/vdlugosch/Zalf/dakis/helm-charts/sources/mas_python_fbp/.pixi/envs/dev

Other files (e.g. script files, source files, etc.):

Issue description

After calling pixi upgrade We end up with a broken pyproject.toml file because the dependencies are moved from the group to the dependencies array and only the dependency arrays versions are upgrade we have a version contrain missmatch and get this error when trying to to install something.

[I] vdlugosch@z16 ➜ mas_python_fbp git:(main) ✗ pixi add jupyter                                                                                                           (zalfmas-fbp:dev)
  ⠁ default:linux-64     [00:00:00] resolving tomli-w==1.2.0                                                                                                                                 Error:   × failed to solve the pypi requirements of environment 'dev' for platform 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because you require ty>=0.0.39,<0.0.40 and ty>=0.0.40,<0.0.41, we can conclude that your requirements are unsatisfiable.

Expected behavior

Expected would be that pixi upgrade upgrades the version constraints in the dependency groups as well without writing the dependencies into the default groups/ standard dependency list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions