Search code examples
pythonpalantir-foundryfoundry-code-repositories

Why am I getting 'Different version pinnings of the same package' error when pinning python version in Foundry Code Repository?


I'm facing an error when trying to require a minimum python version for my shared library in the meta.yml file (by pinning python >= 3.6) in order to use it in various repositories supporting different python version (3.6, 3.8 for instance).

When pinning Python>= 3.6 the checks are not passing and I got the error in the screenshot below. How would I go about debugging this?

enter image description here


Solution

  • In essence, we can not do ranges for the python version. However, there are two intended methods that you can use.

    1. Either you maintain separate branches and have different major version for each variant of your library. I.e a branch per python major/minor version combination. So a branch where the meta.yaml would be python 3.8.*, another for python 3.7. and so on.
    2. Create multiple sub-projects within the repository to use your package, but this one is more tricky.