Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zip_safe support #928

Closed
2 tasks done
AstraLuma opened this issue Mar 2, 2019 · 4 comments
Closed
2 tasks done

Add zip_safe support #928

AstraLuma opened this issue Mar 2, 2019 · 4 comments
Labels
kind/feature Feature requests/implementations

Comments

@AstraLuma
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

I don't see any mention of zip_safe.

Although this option was created for the now-defunct egg format, it's still useful for PEP 441 zipapps.

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@AstraLuma
Copy link
Author

afaik, this has not yet been implemented.

@stale stale bot removed the stale label Nov 15, 2019
@finswimmer finswimmer added the kind/feature Feature requests/implementations label Feb 8, 2020
@dimbleby
Copy link
Contributor

zip_safe is officially obsolete, I very much doubt anyone should be adding support for it anywhere.

@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2022
susodapop added a commit to databricks/dbt-databricks that referenced this issue Aug 24, 2023
It's obsolete:
https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html and not
required by poetry
python-poetry/poetry#928 (comment)

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
susodapop added a commit to databricks/dbt-databricks that referenced this issue Aug 24, 2023
It's obsolete:
https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html and not
required by poetry
python-poetry/poetry#928 (comment)

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
benc-db pushed a commit to databricks/dbt-databricks that referenced this issue Sep 14, 2023
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(2/x) Move package description from setup.py

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(3/x) Move package author from setup.py to pyproject.toml

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(4/x) Move classifiers from setup.py to pyproject.toml

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

squash with 56005dc

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(5/x) Move long description from setup.py to pyproject.toml

Poetry will take the configured readme and set the long_description to
its contents and the long_description_content_type to "text/markdown"
automatically.

Ref: python-poetry/poetry#1979

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(6/x) Move python dependency spec from setup.py to pyproject.toml

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(7/x) Move package version from setup.py to pyproject.toml

We now specify the package version in a single place: pyproject.toml so
it's not necessary to dynamically figure it out in setup.py.

Copped the new contents of __version__.py from the Poetry github issue
tracker here:

python-poetry/poetry#144 (comment)

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(8/x) Move namespace package inclusion from setup.py to pyproject.toml

Note that per poetry docs [^1]

> Poetry is clever enough to detect Python subpackages.
>
> Thus, you only have to specify the directory where your root package
  resides.

[1]: https://python-poetry.org/docs/pyproject/

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(9/x) Move homepage from setup.py to pyproject.toml

Also add the repository metadata which appears in the Pypi sidebar

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(10/x) Entirely remove zip_safe config

It's obsolete:
https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html and not
required by poetry
python-poetry/poetry#928 (comment)

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(11/x) Move project dependencies from setup.py and requirements.txt
(where they were duplicated) into pyproject.toml

This adds the locked dependencies in poetry.lock

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(12/x) Entirely remove setup.py

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(13/x) Move dev dependencies from dev-requirements.txt

Re-lock the dependencies

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(14/x) Completely remove MANIFEST.in

It's not needed by poetry

Ref:
https: //stackoverflow.com/questions/64654860/replacing-manifest-in-with-pyproject-toml
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

(15/x) Entirely remove /scripts

This script is to be replaced with `poetry build`

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

I compared a build from `poetry build` to the output from `python
setup.py sdist bdist_wheel` and then ran a diff against the generated
files. Here's what I found. I added line numbers that I can reference
below.

```
1 Only in dbt-databricks-1.6.1-pypi: MANIFEST.in
2 Files dbt-databricks-1.6.1-pypi/PKG-INFO and dbt_databricks-1.6.1-poetry/PKG-INFO differ
3 Files dbt-databricks-1.6.1-pypi/dbt/adapters/databricks/__version__.py and dbt_databricks-1.6.1-poetry/dbt/adapters/databricks/__version__.py differ
4 Only in dbt-databricks-1.6.1-pypi: dbt_databricks.egg-info
5 Only in dbt_databricks-1.6.1-poetry: pyproject.toml
6 Only in dbt-databricks-1.6.1-pypi: setup.cfg
7 Only in dbt-databricks-1.6.1-pypi: setup.py
```

1: OK see e55e261

2: OK differences are because poetry writes an extra classifier and
includes the new homepage

3: OK difference is because we now automatically fetch the package version set by pyproject.toml

4: OK we're not uploading eggs anymore. They're about to be deprecated
by pypi anyway
https://blog.pypi.org/posts/2023-06-26-deprecate-egg-uploads/

5: OK to add pyproject.toml to the output distribution. This is standard for poetry.

6: OK this is egg-related. See diff 4.

7: OK since we don't use setup.py anymore

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

moving linting to nox (and eventually everything from tox)

unit tests to nox

migrating integration tests

typo

use cluster http path

Replace build_dist.sh to perform build checks

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>

Preliminary GitHub Action to publish to test-pypi with poetry

Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

3 participants