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

Cannot publish packages using poetry publish in interactive mode #5610

Closed
3 tasks done
MadJlzz opened this issue May 14, 2022 · 3 comments
Closed
3 tasks done

Cannot publish packages using poetry publish in interactive mode #5610

MadJlzz opened this issue May 14, 2022 · 3 comments
Labels
area/cli Related to the command line area/publishing Related to PyPI/PEP 503 publishing kind/bug Something isn't working as expected

Comments

@MadJlzz
Copy link

MadJlzz commented May 14, 2022

  • I am on the latest Poetry version.

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

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Linux MadDows 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

  • Poetry version: Poetry (version 1.2.0b1)

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/MadJlzz/a8305c6df426928abff1e913c0aa8f50

Issue

While working on a plugin for poetry, I was about to publish it when I encountered an error:

(.venv) madjlzz@MadDows:~/oss/poetry-artifactregistry-plugin$ poetry publish --build
Building poetry-artifactregistry-plugin (0.1.0)
  - Building sdist
  - Built poetry-artifactregistry-plugin-0.1.0.tar.gz
  - Building wheel
  - Built poetry_artifactregistry_plugin-0.1.0-py3-none-any.whl


  AttributeError

  'IO' object has no attribute 'ask'

  at .venv/lib/python3.9/site-packages/poetry/publishing/publisher.py:80 in publish
       76│         )
       77│         # Requesting missing credentials but only if there is not a client cert defined.
       78│         if not resolved_client_cert:
       79│             if username is None:
    →  80│                 username = self._io.ask("Username:")
       81│ 
       82│             # skip password input if no username is provided, assume unauthenticated
       83│             if username and password is None:
       84│                 password = self._io.ask_hidden("Password:")

cleo version is 1.0.0a4 and looking at the repository, I indeed could not find any ask() nor ask_hidden() method. It also seems that ConsoleIO does not exist anymore. It seems that the commit responsible of this is python-poetry/cleo@de55578

See here:

if not resolved_client_cert and hasattr(self._io, "ask"):
if username is None:
username = self._io.ask("Username:")
# skip password input if no username is provided, assume unauthenticated
if username and password is None:
password = self._io.ask_hidden("Password:")

@MadJlzz MadJlzz added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 14, 2022
@MadJlzz
Copy link
Author

MadJlzz commented May 14, 2022

Created also an issue in cleo as it breaks as well just after: python-poetry/cleo#134

@abn abn added area/cli Related to the command line area/publishing Related to PyPI/PEP 503 publishing and removed status/triage This issue needs to be triaged labels May 15, 2022
@branchvincent
Copy link
Member

Thanks for filing, this is a duplicate #4790 which should be fixed with #5085

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/cli Related to the command line area/publishing Related to PyPI/PEP 503 publishing kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants