Skip to content

(PUP-10015) Add support for arbitrary equality to pip provider#7713

Merged
joshcooper merged 1 commit intopuppetlabs:6.4.xfrom
joshcooper:pip_equality_10015
Sep 11, 2019
Merged

(PUP-10015) Add support for arbitrary equality to pip provider#7713
joshcooper merged 1 commit intopuppetlabs:6.4.xfrom
joshcooper:pip_equality_10015

Conversation

@joshcooper
Copy link
Contributor

Without this patch the pip provider doesn't correctly parse pip freeze
output specified with arbitrary equality.

https://www.python.org/dev/peps/pep-0440/#arbitrary-equality

This is manifest with triple === separating the package name from the
package version, e.g.

$ pip freeze | grep pytz
pytz===2012f

By not correctly parsing this output, puppet tries to continually
install this package on each run.

The patch updates the regex to handle arbitrary equality.

Without this patch the pip provider doesn't correctly parse pip freeze
output specified with arbitrary equality.

https://www.python.org/dev/peps/pep-0440/#arbitrary-equality

This is manifest with triple === separating the package name from the
package version, e.g.

$ pip freeze | grep pytz
pytz===2012f

By not correctly parsing this output, puppet tries to continually
install this package on each run.

The patch updates the regex to handle arbitrary equality.
@joshcooper
Copy link
Contributor Author

This was already approved in the PR targeting master.

@joshcooper joshcooper merged commit 57eda3d into puppetlabs:6.4.x Sep 11, 2019
@joshcooper joshcooper deleted the pip_equality_10015 branch September 11, 2019 22:42
@maltewhiite
Copy link

maltewhiite commented Oct 5, 2021

@joshcooper
I am having this issue.

$python_packages = ['argparse', 'regex', 'prometheus_client']
  package { $python_packages:
    ensure   => installed,
    provider => pip3,
}

causes this every time:

Notice: /Stage[main]/Monitoring/Package[argparse]/ensure: created
Notice: /Stage[main]/Monitoring/Package[prometheus_client]/ensure: created

Workaround

  package { 'regex':
    ensure   => installed,
    provider => pip3,
  }

  package { ['python-argparse', 'python2-prometheus_client']:
    ensure   => installed,
    provider => yum,
  }

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants