question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Package Name Case Sensitivity

See original GitHub issue
  • 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: macOS 14.6

  • Poetry version: 1.0.0b1

Issue

I’m trying to specify a development version of Logbook:

logbook = {rev = "185b9ed959f2a41b605bbd93bdbd83ed9efbc5bd",git = "https://github.com/getlogbook/logbook.git"}

Poetry is complaining:

$ poetry update
Updating dependencies
Resolving dependencies... (1.9s)

[RuntimeError]
The dependency name for logbook does not match the actual package's name: Logbook

Traceback (most recent call last):
  File "/Users/iwolosch/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py", line 132, in run
    status_code = command.handle(parsed_args, io)
  File "/Users/iwolosch/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 119, in handle
    status_code = self._do_handle(args, io)
  File "/Users/iwolosch/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 167, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/Users/iwolosch/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/Users/iwolosch/.poetry/lib/poetry/console/commands/update.py", line 49, in handle
    return installer.run()
  File "/Users/iwolosch/.poetry/lib/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/Users/iwolosch/.poetry/lib/poetry/installation/installer.py", line 161, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/solver.py", line 38, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/solver.py", line 173, in _solve
    self._package, self._provider, locked=locked, use_latest=use_latest
  File "/Users/iwolosch/.poetry/lib/poetry/mixology/__init__.py", line 7, in resolve_version
    return solver.solve()
  File "/Users/iwolosch/.poetry/lib/poetry/mixology/version_solver.py", line 79, in solve
    next = self._choose_package_version()
  File "/Users/iwolosch/.poetry/lib/poetry/mixology/version_solver.py", line 354, in _choose_package_version
    packages = self._provider.search_for(dependency)
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/provider.py", line 130, in search_for
    packages = self.search_for_vcs(dependency)
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/provider.py", line 171, in search_for_vcs
    name=dependency.name,
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/provider.py", line 207, in get_package_from_vcs
    package = cls.get_package_from_directory(tmp_dir, name=name)
  File "/Users/iwolosch/.poetry/lib/poetry/puzzle/provider.py", line 411, in get_package_from_directory
    name, package_name

If you look at Logbook, the package name is “Logbook” with an uppercase ‘L’: https://github.com/getlogbook/logbook/blob/develop/setup.py#L188

I believe that Python Package names are supposed to be case insensitive, so I believe this is a bug in Poetry. This appears to be fixed by simply making the if statement on Line 411 ignore case, but I’m not sure if this is more complex than that or not.

I do not see this same problem when trying to install a stable Logbook release from PyPI, I suspect this only affects installing from Path/VCS.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brycedrennancommented, Aug 16, 2019

Reopening till we answer your question.

0reactions
kastephcommented, Sep 24, 2019

#1305 fixes this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why should java package name be lowercase? - Stack Overflow
Package names are written in all lower case to avoid conflict with the names of classes or interfaces. Share.
Read more >
PyPi Package Registry is case sensitive (#244412) - GitLab
Packages housed within the Gitlab PyPi Registry are case-sensitive when retrieved. Using the latest stable pip ( 20.2.2 ), this makes packages ...
Read more >
11.5. Package Case-Sensitivity - CLISP - SourceForge
A case-sensitive package is one whose DEFPACKAGE declaration (or MAKE-PACKAGE creation form) has the option ( :CASE-SENSITIVE T ) . In a case-sensitive...
Read more >
[RTFACT-26092] Case sensitivity in package name - Jira - JFrog
Since Artifactory is case-sensitive, "PackageName" and "packagename" will not be considered as the same artifact by Artifactory.
Read more >
package name case-sensitive resolving. · Issue #7066 - GitHub
I think it's a bug. What is the current behavior? My project has two dependent packages: Validator and validator. But yarn only install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found