Skip to content

azure-eventhub/azure/eventhub/extensions/__init__.py is incompatible with packaging namespaces #13187

@pjachowi

Description

@pjachowi
  • Package Name:
    azure-eventhub

  • Package Version:
    5.1.0

  • Operating System:
    Linux

  • Python Version:
    3.8.2

Describe the bug
Existence of emptiness of the file https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/azure/eventhub/extensions/__init__.py is incompatible with packaging namespaces. It causes problem using this package in Bazel, see dillon-giacoppo/rules_python_external#56

To Reproduce
Steps to reproduce the behavior:

  1. Go into temporary directory cd /tmp
  2. Install azure_eventhub under dir1 pip install --target=$(pwd)/dir1 azure_eventhub
  3. Install azure-eventhub-checkpointstoreblob under dir2 pip install --target=$(pwd)/dir2 azure-eventhub-checkpointstoreblob
  4. Create virtual environment virtualenv venv
  5. Activate virtual environment source venv/bin/activate
  6. Create main.py
cat > main.py
import sys
sys.path.extend(['/tmp/dir1', '/tmp/dir2'])
from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore
  1. Execute main.py python ./main.py
  2. Result is an error:
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    from azure.eventhub.extensions.checkpointstoreblob import BlobCheckpointStore
ModuleNotFoundError: No module named 'azure.eventhub.extensions.checkpointstoreblob'

Expected behavior
main.py should execute without errors.

Screenshots
N/A

Additional context
The problem emerges because Bazel installs dependencies in separate directories. Current layout, incompatible with packaging namespaces makes it impossible to use in applications build by Bazel, see dillon-giacoppo/rules_python_external#56

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Event Hubscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions