Comments (4)
I trend to agree: validating version numbers is a PITA and unless this is utterly needed, should be avoided IMHO.
from puppet-python.
if this idea makes sense to you, I can work on a PR.
from puppet-python.
This regexp is barely readable π. PRs are always welcome, however, workaround for a problematic case should be avoided (e.g. setting strict_version_checking=false
because otherwise compilation fail).
In any case, the regexp looks wrong: ((19|20)[0-9][0-9]-(0[1-9]|1[1-2])-([0-2][1-9]|3[0-1]))
seems to be matching a date⦠unless it's in october or the 10th or the 20th of the month⦠and as far as I can see, this is not the problem you see. But maybe it is not supposed to match a date, but it have not been modified for a long time.
Maybe we can find a way which which avoid completely this regexp, a quick look at the source makes me think we want to distinguish things like present
or absent
from an explicit version, so maybe we can replace this piece of code with a selector?
$grep_regex = $_ensure ? {
'present' => '...',
'absent' => '...',
'whatever' => '...',
default => '...',
}
Opening a PR that add a unit test that demonstrate the problem is a very good first step!
from puppet-python.
I'm trying to get the story because I'm not clear yet.
If a version number is wrong and it can't be installed, the package manager will error.
If the package manager accepts that version, why do we need to bother?
And why do we need to implement the same logic which is already present in the package manager (I assume this module wont' do better than PIP).
I'd make it really simpler, and let the package manager decide whether to throw an error or not.
You could send a warning if a regex is not matched, but do we really need to chase this regex for the purpose of warning the user?
What do you think? If in your opinion, it's a non-sense you can just say it π
from puppet-python.
Related Issues (20)
- do not use resource defaults in modules
- do not fail on unsupported OSes
- `python::pip`'s 'latest' not compatible with latest 'pip' (version 20.3) due to changed output HOT 7
- Set SELinux options on the File (Folder) generated by pyvenv HOT 1
- Pip uninstall does not support pkgname variable
- Release v6.0.2
- Requirements not updated for pyvenv -- requires forceupdate HOT 5
- keep backwards compatible support for python-virtualenv
- Could not evaluate: Working directory <virualenv> does not exist!
- Package with provider pip3 tries installing every run. HOT 2
- `python::pip` doesn't reinstall if `extras` is updated (with no change in `ensure`)
- pyvenv cannot install until $facts['python3_version'] exists (or is overidden) on RedHat style OSes HOT 2
- puppet tries to install latest version of a pip package on every run
- Only supports CentOS, no other derivatives
- Add support for Amazon Linux 2023
- Rework package management to allow composition of dependencies
- Support puppet-epel 5.0.0 dependency
- python::umask has no effect on exec ressources
- Not possible to use multiple python versions for virtualenvs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-python.