Skip to content

Instantly share code, notes, and snippets.

@jwheeler31
Last active November 6, 2020 14:37
Show Gist options
  • Save jwheeler31/aa5318f7e9953820f4597fd492035097 to your computer and use it in GitHub Desktop.
Save jwheeler31/aa5318f7e9953820f4597fd492035097 to your computer and use it in GitHub Desktop.
Issue With Poetry 1.1.4 When Performing an Add
Using virtualenv: /Users/jwheeler/Library/Caches/pypoetry/virtualenvs/poetry-demo-esfPYa1_-py3.8
PyPI: No release information found for mypy-0.500, skipping
PyPI: 77 packages found for mypy *
Using version ^0.790 for mypy
Updating dependencies
Resolving dependencies...
1: fact: poetry-demo is 0.1.0
1: derived: poetry-demo
1: fact: poetry-demo depends on pendulum (^2.1.2)
1: fact: poetry-demo depends on pytest (^5.2)
1: fact: poetry-demo depends on flake8 (^3.8.4)
1: fact: poetry-demo depends on mypy (^0.790)
1: fact: poetry-demo depends on pytest (^5.2)
1: fact: poetry-demo depends on flake8 (^3.8.4)
1: fact: poetry-demo depends on mypy (^0.790)
1: selecting poetry-demo (0.1.0)
1: derived: mypy (^0.790)
1: derived: flake8 (^3.8.4)
1: derived: pytest (^5.2)
1: derived: pendulum (^2.1.2)
PyPI: No release information found for mypy-0.500, skipping
PyPI: 1 packages found for mypy >=0.790,<0.791
1: fact: mypy (0.790) depends on typed-ast (>=1.4.0,<1.5.0)
1: fact: mypy (0.790) depends on typing-extensions (>=3.7.4)
1: fact: mypy (0.790) depends on mypy-extensions (>=0.4.3,<0.5.0)
1: selecting mypy (0.790)
1: derived: mypy-extensions (>=0.4.3,<0.5.0)
1: derived: typing-extensions (>=3.7.4)
1: derived: typed-ast (>=1.4.0,<1.5.0)
PyPI: 1 packages found for mypy-extensions >=0.4.3,<0.5.0
PyPI: 4 packages found for typing-extensions >=3.7.4
PyPI: 2 packages found for typed-ast >=1.4.0,<1.5.0
1: fact: flake8 (3.8.4) depends on pyflakes (>=2.2.0,<2.3.0)
1: fact: flake8 (3.8.4) depends on pycodestyle (>=2.6.0a1,<2.7.0)
1: fact: flake8 (3.8.4) depends on mccabe (>=0.6.0,<0.7.0)
1: selecting flake8 (3.8.4)
1: derived: mccabe (>=0.6.0,<0.7.0)
1: derived: pycodestyle (>=2.6.0a1,<2.7.0)
1: derived: pyflakes (>=2.2.0,<2.3.0)
1: fact: pytest (5.4.3) depends on py (>=1.5.0)
1: fact: pytest (5.4.3) depends on packaging (*)
1: fact: pytest (5.4.3) depends on attrs (>=17.4.0)
1: fact: pytest (5.4.3) depends on more-itertools (>=4.0.0)
1: fact: pytest (5.4.3) depends on pluggy (>=0.12,<1.0)
1: fact: pytest (5.4.3) depends on wcwidth (*)
1: fact: pytest (5.4.3) depends on atomicwrites (>=1.0)
1: fact: pytest (5.4.3) depends on colorama (*)
1: selecting pytest (5.4.3)
1: derived: colorama (*)
1: derived: atomicwrites (>=1.0)
1: derived: wcwidth (*)
1: derived: pluggy (>=0.12,<1.0)
1: derived: more-itertools (>=4.0.0)
1: derived: attrs (>=17.4.0)
1: derived: packaging (*)
1: derived: py (>=1.5.0)
1: fact: pendulum (2.1.2) depends on python-dateutil (>=2.6,<3.0)
1: fact: pendulum (2.1.2) depends on pytzdata (>=2020.1)
1: selecting pendulum (2.1.2)
1: derived: pytzdata (>=2020.1)
1: derived: python-dateutil (>=2.6,<3.0)
1: selecting mypy-extensions (0.4.3)
1: selecting mccabe (0.6.1)
1: selecting pycodestyle (2.6.0)
1: selecting pyflakes (2.2.0)
1: selecting colorama (0.4.4)
1: selecting atomicwrites (1.4.0)
1: selecting wcwidth (0.2.5)
1: selecting pluggy (0.13.1)
1: selecting more-itertools (8.6.0)
1: selecting attrs (20.3.0)
1: fact: packaging (20.4) depends on pyparsing (>=2.0.2)
1: fact: packaging (20.4) depends on six (*)
1: selecting packaging (20.4)
1: derived: six (*)
1: derived: pyparsing (>=2.0.2)
1: selecting py (1.9.0)
1: selecting pytzdata (2020.1)
1: fact: python-dateutil (2.8.1) depends on six (>=1.5)
1: selecting python-dateutil (2.8.1)
1: derived: six (>=1.5)
1: selecting six (1.15.0)
1: selecting pyparsing (2.4.7)
PyPI: Getting info for typed-ast (1.4.1) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: typed_ast-1.4.1.tar.gz
1: Version solving took 0.175 seconds.
1: Tried 1 solutions.
Stack trace:
26 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/console_application.py:131 in run
129│ parsed_args = resolved_command.args
130│
→ 131│ status_code = command.handle(parsed_args, io)
132│ except KeyboardInterrupt:
133│ status_code = 1
25 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py:120 in handle
118│ def handle(self, args, io): # type: (Args, IO) -> int
119│ try:
→ 120│ status_code = self._do_handle(args, io)
121│ except KeyboardInterrupt:
122│ if io.is_debug():
24 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py:171 in _do_handle
169│ handler_method = self._config.handler_method
170│
→ 171│ return getattr(handler, handler_method)(args, io, self)
172│
173│ def __repr__(self): # type: () -> str
23 ~/.poetry/lib/poetry/_vendor/py3.8/cleo/commands/command.py:92 in wrap_handle
90│ self._command = command
91│
→ 92│ return self.handle()
93│
94│ def handle(self): # type: () -> Optional[int]
22 ~/.poetry/lib/poetry/console/commands/add.py:174 in handle
172│
173│ try:
→ 174│ status = self._installer.run()
175│ except Exception:
176│ self.poetry.file.write(original_content)
21 ~/.poetry/lib/poetry/installation/installer.py:103 in run
101│ local_repo = Repository()
102│
→ 103│ return self._do_install(local_repo)
104│
105│ def dry_run(self, dry_run=True): # type: (bool) -> Installer
20 ~/.poetry/lib/poetry/installation/installer.py:235 in _do_install
233│ )
234│
→ 235│ ops = solver.solve(use_latest=self._whitelist)
236│ else:
237│ self._io.write_line("Installing dependencies from lock file")
19 ~/.poetry/lib/poetry/puzzle/solver.py:65 in solve
63│ with self._provider.progress():
64│ start = time.time()
→ 65│ packages, depths = self._solve(use_latest=use_latest)
66│ end = time.time()
67│
18 ~/.poetry/lib/poetry/puzzle/solver.py:233 in _solve
231│
232│ try:
→ 233│ result = resolve_version(
234│ self._package, self._provider, locked=locked, use_latest=use_latest
235│ )
17 ~/.poetry/lib/poetry/mixology/__init__.py:7 in resolve_version
5│ solver = VersionSolver(root, provider, locked=locked, use_latest=use_latest)
6│
→ 7│ return solver.solve()
8│
16 ~/.poetry/lib/poetry/mixology/version_solver.py:84 in solve
82│ while next is not None:
83│ self._propagate(next)
→ 84│ next = self._choose_package_version()
85│
86│ return self._result()
15 ~/.poetry/lib/poetry/mixology/version_solver.py:397 in _choose_package_version
395│ version = locked
396│
→ 397│ version = self._provider.complete_package(version)
398│
399│ conflict = False
14 ~/.poetry/lib/poetry/puzzle/provider.py:433 in complete_package
431│ package = DependencyPackage(
432│ package.dependency,
→ 433│ self._pool.package(
434│ package.name,
435│ package.version.text,
13 ~/.poetry/lib/poetry/repositories/pool.py:135 in package
133│ for idx, repo in enumerate(self._repositories):
134│ try:
→ 135│ package = repo.package(name, version, extras=extras)
136│ except PackageNotFound:
137│ continue
12 ~/.poetry/lib/poetry/repositories/pypi_repository.py:158 in package
156│ extras=None, # type: (Union[list, None])
157│ ): # type: (...) -> Package
→ 158│ return self.get_release_info(name, version).to_package(name=name, extras=extras)
159│
160│ def search(self, query):
11 ~/.poetry/lib/poetry/repositories/pypi_repository.py:223 in get_release_info
221│ return PackageInfo.load(self._get_release_info(name, version))
222│
→ 223│ cached = self._cache.remember_forever(
224│ "{}:{}".format(name, version), lambda: self._get_release_info(name, version)
225│ )
10 ~/.poetry/lib/poetry/_vendor/py3.8/cachy/repository.py:174 in remember_forever
172│ return val
173│
→ 174│ val = value(callback)
175│
176│ self.forever(key, val)
9 ~/.poetry/lib/poetry/_vendor/py3.8/cachy/helpers.py:6 in value
4│ def value(val):
5│ if callable(val):
→ 6│ return val()
7│
8│ return val
8 ~/.poetry/lib/poetry/repositories/pypi_repository.py:224 in <lambda>
222│
223│ cached = self._cache.remember_forever(
→ 224│ "{}:{}".format(name, version), lambda: self._get_release_info(name, version)
225│ )
226│
7 ~/.poetry/lib/poetry/repositories/pypi_repository.py:304 in _get_release_info
302│ return data.asdict()
303│
→ 304│ info = self._get_info_from_urls(urls)
305│
306│ data.requires_dist = info.requires_dist
6 ~/.poetry/lib/poetry/repositories/pypi_repository.py:419 in _get_info_from_urls
417│ return self._get_info_from_wheel(platform_specific_wheels[0])
418│
→ 419│ return self._get_info_from_sdist(urls["sdist"][0])
420│
421│ def _get_info_from_wheel(self, url): # type: (str) -> PackageInfo
5 ~/.poetry/lib/poetry/repositories/pypi_repository.py:447 in _get_info_from_sdist
445│ self._download(url, str(filepath))
446│
→ 447│ return PackageInfo.from_sdist(filepath)
448│
449│ def _download(self, url, dest): # type: (str, str) -> None
4 ~/.poetry/lib/poetry/inspection/info.py:561 in from_sdist
559│ """
560│ if path.is_file():
→ 561│ return cls._from_sdist_file(path=path)
562│
563│ # if we get here then it is neither an sdist instance nor a file
3 ~/.poetry/lib/poetry/inspection/info.py:291 in _from_sdist_file
289│
290│ # now this is an unpacked directory we know how to deal with
→ 291│ new_info = cls.from_directory(path=sdist_dir)
292│
293│ if not info:
2 ~/.poetry/lib/poetry/inspection/info.py:541 in from_directory
539│ info = cls.from_setup_files(path)
540│ else:
→ 541│ info = cls._pep517_metadata(path)
542│ except PackageInfoError:
543│ if not info:
1 ~/.poetry/lib/poetry/inspection/info.py:506 in _pep517_metadata
504│ )
505│ finally:
→ 506│ os.chdir(cwd.as_posix())
507│
508│ if info:
RuntimeError
generator didn't stop after throw()
at ~/.pyenv/versions/3.8.2/lib/python3.8/contextlib.py:162 in __exit__
158│ # by 'except BaseException'.
159│ if sys.exc_info()[1] is value:
160│ return False
161│ raise
→ 162│ raise RuntimeError("generator didn't stop after throw()")
163│
164│
165│ class _AsyncGeneratorContextManager(_GeneratorContextManagerBase,
166│ AbstractAsyncContextManager):
[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
description = ""
authors = ["jwheeler31 <email>"]
[tool.poetry.dependencies]
python = "^3.8"
pendulum = "^2.1.2"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
flake8 = "^3.8.4"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment