dask / dask/distributed

namespace packages take priority over setuptools PEP 660 editables in lenient mode

Open
#7,782 6 comments 0 reactions 0 assignees View on GitHub
bug packaging
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

I have an editable version of `distributed` installed locally with `pip install -e .` from the root of the repo. When I drop into `ipython` I see

```python
In [1]: import distributed
distr
In [2]: distributed.__file__
Out[2]: '/Users/james/projects/dask/distributed/distributed/__init__.py'

In [3]: distributed.__version__
Out[3]: '2023.4.0+1.g5c0a412c'
```

This looks like I expect it to. When I then navigate to another directory, for example, over to the root of `dask/dask` on my laptop, I no longer see the same `distributed.__version__` and `distributed.__file__`:

```python
In [1]: import distributed

In [2]: distributed.__file__

In [3]: distributed.__version__
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [3], in ()
----> 1 distributed.__version__

AttributeError: module 'distributed' has no attribute '__version__'
```

I've not run `git bisect`, but my guess is https://github.com/dask/distributed/pull/7629 is related

cc @graingert for visibility

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.