Conchylicultor

Conchylicultor

Research Engineer

Member Since 7 years ago

Google, Berlin

Experience Points
564
follower
Lessons Completed
14
follow
Lessons Completed
35
stars
Best Reply Awards
40
repos

453 contributions in the last year

Pinned
⚡ My tensorflow implementation of "A neural conversational model", a Deep learning based chatbot
⚡ Enumerate diverse machine learning training tricks.
⚡ 3d without friction (TF, Jax, Numpy)
⚡ Experiment diverse Deep learning models for music generation with TensorFlow
⚡ Collection of eclectic utils for python.
Activity
May
18
1 day ago
Activity icon
published release v1.1.0
createdAt 1 day ago
May
16
3 days ago
Activity icon
issue

Conchylicultor issue comment pypa/flit

Conchylicultor
Conchylicultor

Obscure error message "Invalid value for provides"

Flit fail when trying to upload a minimal package:

[project]
name = "epot-test"
description = "aaa"
readme = "README.md"
requires-python = ">=3.7"
authors = [{name = "Conchylicultor", email="[email protected]"}]
dynamic = ["version"]

[build-system]
requires = ["flit_core >=3.5,<4"]
build-backend = "flit_core.buildapi"

Commands:

flit build
flit publish

flit publish fails with:

epot-macbookpro2:epot-test epot$ flit publish
Found 8 files tracked in git                                                                                   I-flit.sdist
Built sdist: dist/epot-test-1.1.0.tar.gz                                                                  I-flit_core.sdist
Copying package file(s) from /var/folders/67/mbgvk_q96wd9hmdgm8z9ts4r00fsh4/T/tmpgkxoru5_/epot-test-1.1.0/epot-test  I-flit_core.wheel
Writing metadata files                                                                                    I-flit_core.wheel
Writing the record of files                                                                               I-flit_core.wheel
Built wheel: dist/epot_test-1.1.0-py3-none-any.whl                                                        I-flit_core.wheel
Using repository at https://upload.pypi.org/legacy/                                                           I-flit.upload
Uploading dist/epot_test-1.1.0-py3-none-any.whl...                                                            I-flit.upload
Traceback (most recent call last):
  File "/Users/epot/.pyenv/versions/3.10.0/bin/flit", line 8, in <module>
    sys.exit(main())
  File "/Users/epot/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flit/__init__.py", line 185, in main
    main(args.ini_file, repository, args.pypirc, formats=set(args.format or []),
  File "/Users/epot/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flit/upload.py", line 268, in main
    do_upload(built.wheel.file, built.wheel.builder.metadata, pypirc_path, repo_name)
  File "/Users/epot/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flit/upload.py", line 246, in do_upload
    upload_file(file, metadata, repo)
  File "/Users/epot/.pyenv/versions/3.10.0/lib/python3.10/site-packages/flit/upload.py", line 239, in upload_file
    resp.raise_for_status()
  File "/Users/epot/.pyenv/versions/3.10.0/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Invalid value for provides. Error: Use a valid Python identifier. for url: https://upload.pypi.org/legacy/

flit --version is Flit 3.7.1

It's very non obvious from the error message what is the issue with my toml file. It would be nice to have more explicit error messages.

Conchylicultor
Conchylicultor

Renaming "epot-test" -> "epot_test" fixed the issue, but it's very non-obvious to guess from the error message. It would be nice if flit was checking this (maybe during flit build rather than this error in flit publish).

Activity icon
published release v1
createdAt 3 days ago
Activity icon
published release v1.0.1
createdAt 3 days ago
Activity icon
published release v1.0.0
createdAt 3 days ago
Previous