[RTFACT-20646] Support case insensitive include and exclude patterns for PyPi repositories Created: 18/Nov/19  Updated: 18/Nov/19

Status: Open
Project: Artifactory Binary Repository
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Normal
Reporter: Adi Vizgan (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None


As mentioned in the KB article https://jfrog.com/knowledge-base/how-do-i-use-include-and-exclude-patterns-on-a-pypi-repository/, since using the regular Include and Exclude patterns of names of artifacts will not work on PyPi repositories, in order to configure Include and Exclude patterns that will work on PyPi repositories you will need to use the Include and Exclude patterns to Include/Exclude the packages metadata (not its name).

In an opposite use case, if a customer wants to exclude all artifacts except for a few that he wants to include, it becomes harder to configure, since Artifactory uses the include and exclude patterns as case sensitive. If you have a package that you would like to include, for example - "Cython", since its name starts with an upper case letter in the remote repository, you will need to create 2 different include patterns for it:

  1. "*/cython" (this pattern will allow to include the metadata file for this package which is always saved with lower case letters no matter the package name).
  2. "*/Cython" (this pattern will allow to include the package itself since it is saved with an upper case).

Except for those two patterns you will need to make for each package you want to include, you will also need to create the pattern - "**/simple.html" to allow the index file for the repository to be pulled (if this is not present, no packages will be able to be pulled).

In the Python PEPS documentation (specifically PEP-426: https://www.python.org/dev/peps/pep-0426/#name) it says:

"All comparisons of distribution names MUST be case insensitive, and MUST consider hyphens and underscores to be equivalent."


In order to be aligned with the Python PEPS requirements, we need to make the include and exclude patterns (for PyPi repositories only) case insensitive.

Generated at Wed Apr 08 10:21:26 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.