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

Publish to PyPI #3

Closed
tueda opened this issue Mar 3, 2021 · 7 comments
Closed

Publish to PyPI #3

tueda opened this issue Mar 3, 2021 · 7 comments

Comments

@tueda
Copy link
Owner

tueda commented Mar 3, 2021

As a single module (formset.py), after some refactoring #2, with some documentation and examples in README.

@tueda
Copy link
Owner Author

tueda commented Mar 5, 2021

This repository uses type annotations, but PEP 561 doesn't support module-only distributions. The package layout may be changed to

─── formset
    ├── __init__.py
    ├── __main__.py
    ├── formset.py
    └── py.typed

in such a way that still formset.py can be picked up as a standalone script.

tueda added a commit that referenced this issue Mar 25, 2021
Put the module into the "formset" directory. "py.typed" is also added
(see PEP 561).

NOTE: formset/formset.py can still be run as a standalone script.
@tueda
Copy link
Owner Author

tueda commented Apr 3, 2021

It turned out that supporting ancient Python versions in modern developer tools is highly nontrivial, for example:

We may drop official supports for 2.6, 3.2, 3.3 (and maybe 3.4) in the package information, though we could keep the old code for 2.6, which may work when used as a standalone script.

@magv
Copy link
Contributor

magv commented May 8, 2021

As a data point: pySecDec supports Python 2.7 now, but in the next release (where formset.py will be included) we plan to only support Python 3.6+.

@tueda
Copy link
Owner Author

tueda commented May 20, 2021

It turned out that the package name formset is not allowed by PyPI, though currently there is no formset:

Publishing formset (1.0.0rc1) to PyPI
 - Uploading formset-1.0.0rc1-py2.py3-none-any.whl 100%

  UploadError

  HTTP Error 400: The name 'formset' isn't allowed. See https://pypi.org/help/#project-name for more information.

  at /home/linuxbrew/.linuxbrew/Cellar/poetry/1.1.5/libexec/lib/python3.9/site-packages/poetry/publishing/uploader.py:216 in _upload
      212│                     self._register(session, url)
      213│                 except HTTPError as e:
      214│                     raise UploadError(e)
      215│
    → 216│             raise UploadError(e)
      217│
      218│     def _do_upload(
      219│         self, session, url, dry_run=False
      220│     ):  # type: (requests.Session, str, Optional[bool]) -> None

@magv
Copy link
Contributor

magv commented May 22, 2021

It was registered by what seems to be a package name squatter. I think if you'll contact the PyPI support, they'll transfer it to you.

@tueda
Copy link
Owner Author

tueda commented May 23, 2021

FYI: some related discussions:

Meanwhile, I have started to think about putting some prefix or namespace (related to How to create a namespace package/project on pypi?), maybe formtools-formset or formtools.formset, because in future I would possibly put more FORM utilities on PyPI, e.g., formprof. I guess no one would take formtools-formset or formtools-formprof.

@tueda
Copy link
Owner Author

tueda commented Jul 10, 2021

The current version is registered as https://pypi.org/project/formtools-formset/1.0.0rc1.

@tueda tueda closed this as completed Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants