vmware / vmware/pyvmomi

Name collision with pyvim on case-insensitive filesystems

Open
#999 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When working on a filesystem that does not support case-sensitivity and that also has the pyvim pip package installed, pip ends up dumping the files from the pyVim portion of pyvmomi into the same folder as the files for pyvim. This makes it so you are unable to correctly import from pyVim.

Reproduction steps

Testing was performed on Windows 10, using NTFS, with Python 3.9.13:

  1. Install pyvim: pip install pyvim
  2. Install pyvmomi: pip install pyvmomi
  3. Launch Python: python
  4. Attempt to import from pyVim module: from pyVim.connect import SmartConnectNoSSL, Disconnect
  5. You receive the error: ModuleNotFoundError: No module named 'pyVim'
  6. Attempt to import from pyvim module: from pyvim.connect import SmartConnectNoSSL, Disconnect
  7. This works, but if you inspect the files in your site-packages directory, it is clear that the contents of pyvim and pyVim have been merged together by pip.
Expected behavior

I would expect that the components of pyvmomi have been named or distributed in such a way as to prevent name collisions with other publicly-available python packages.

Additional context

Perhaps this is a pip issue, however the overlap between the pyVim component of pyvmomi package and the pyvim package itself is unfortunate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the collision on Windows 10 with NTFS by installing pyvim and pyvmomi, then inspect the merged pyvim and pyVim contents in site-packages. Determine a distribution or naming change that preserves the documented pyVim imports without colliding with pyvim; done when both packages install and their imports work independently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.