Skip to content

Publish prints "publishing to PyPI", even in case of private repository #2872

@ariebovenberg

Description

@ariebovenberg
  • 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).

Other details:

  • Poetry version: 1.1.0b2

Issue

When publishing to a private repository, poetry still outputs publishing <file> to PyPI.

I traced it to this code, which puzzles me a bit. It seems it will always output PyPI

self._io.write_line(
"Publishing <c1>{}</c1> (<c2>{}</c2>) "
"to <info>{}</info>".format(
self._package.pretty_name,
self._package.pretty_version,
{"pypi": "PyPI"}.get(repository_name, "PyPI"),
)
)

Is there something I'm missing here? Should it just be {"pypi": "PyPI"}.get(repository_name, repository_name) instead? If so, I'd be happy to make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions