Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@soapy1
Copy link
Contributor

@soapy1 soapy1 commented May 6, 2025

Description

This PR cleans up a small line in cli/install.py. The DepsModifier class does not have an attribute UPTATE_SPECS, it is defined as:

class DepsModifier(Enum):
    """Flags to enable alternate handling of dependencies."""

    NOT_SET = "not_set"  # default
    NO_DEPS = "no_deps"
    ONLY_DEPS = "only_deps"

    def __str__(self):
        return self.value

ref: https://github.com/conda/conda/blob/main/conda/base/constants.py#L201

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to πŸ†• New in πŸ”Ž Review May 6, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 6, 2025
@soapy1 soapy1 force-pushed the deps-modifier-update-specs branch from 2d9e398 to 268e672 Compare May 6, 2025 18:19
@soapy1 soapy1 force-pushed the deps-modifier-update-specs branch from 268e672 to 5d6e067 Compare May 6, 2025 18:19
@soapy1 soapy1 marked this pull request as ready for review May 6, 2025 18:19
@soapy1 soapy1 requested a review from a team as a code owner May 6, 2025 18:19
@dholth
Copy link
Contributor

dholth commented May 6, 2025

Is this just a case that is rarely or never triggered? It looks like this reference has been there for a while?

@github-project-automation github-project-automation bot moved this from πŸ†• New to βœ… Approved in πŸ”Ž Review May 6, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 6, 2025

CodSpeed Performance Report

Merging #14807 will not alter performance

Comparing soapy1:deps-modifier-update-specs (5d6e067) with main (0627ff5)

Summary

βœ… 21 untouched benchmarks

@soapy1
Copy link
Contributor Author

soapy1 commented May 6, 2025

Is this just a case that is rarely or never triggered? It looks like this reference has been there for a while?

I think the DepsModifier.UPDATE_SPECS is never hit because context.deps_modifier is never None. So like, if I update the diff to be

if isupdate:
        deps_modifier = DepsModifier.UPDATE_SPECS

and then run a conda update you get the error:

      File "/home/sophia/projects/conda/conda/cli/install.py", line 425, in install
        deps_modifier = DepsModifier.UPDATE_SPECS
      File "/home/sophia/projects/conda/devenv/Linux/x86_64/envs/devenv-3.10-c/lib/python3.10/enum.py", line 437, in __getattr__
        raise AttributeError(name) from None
    AttributeError: UPDATE_SPECS

@kenodegard kenodegard merged commit d4f93bd into conda:main May 6, 2025
74 checks passed
@github-project-automation github-project-automation bot moved this from βœ… Approved to 🏁 Done in πŸ”Ž Review May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants