Skip to content

Could not parse version constraint #7729

Closed

Description

@clintonroy
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

clintonr@rassilon:/tmp/tester$ poetry add super-state-machine
Using version ^2.0.2 for super-state-machine

Updating dependencies
Resolving dependencies... (0.0s)

Could not parse version constraint: < "3.4"

And the exception:

Loading configuration file /home/clintonr/.config/pypoetry/config.toml
Loading configuration file /home/clintonr/.config/pypoetry/auth.toml
Using virtualenv: /home/clintonr/.cache/pypoetry/virtualenvs/tester-HyYo8Z1h-py3.11
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
Source (PyPI): 5 packages found for super-state-machine *
Using version ^2.0.2 for super-state-machine

Updating dependencies
Resolving dependencies...
   1: fact: tester is 0.1.0
   1: derived: tester
   1: fact: tester depends on super-state-machine (^2.0.2)
   1: selecting tester (0.1.0)
   1: derived: super-state-machine (>=2.0.2,<3.0.0)
Source (PyPI): 1 packages found for super-state-machine >=2.0.2,<3.0.0
   1: Version solving took 0.005 seconds.
   1: Tried 1 solutions.

  Stack trace:

  24  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/application.py:327 in run
       325│ 
       326│             try:
     → 327│                 exit_code = self._run(io)
       328│             except BrokenPipeError:
       329│                 # If we are piped to another process, it may close early and send a

  23  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/console/application.py:190 in _run
       188│         self._load_plugins(io)
       189│ 
     → 190│         exit_code: int = super()._run(io)
       191│         return exit_code
       192│ 
 22  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/application.py:431 in _run
       429│             io.input.interactive(interactive)
       430│ 
     → 431│         exit_code = self._run_command(command, io)
       432│         self._running_command = None
       433│ 

  21  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/application.py:473 in _run_command
       471│ 
       472│         if error is not None:
     → 473│             raise error
       474│ 
       475│         return terminate_event.exit_code

  20  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/application.py:457 in _run_command
       455│ 
       456│             if command_event.command_should_run():
     → 457│                 exit_code = command.run(io)
       458│             else:
       459│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  19  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/commands/base_command.py:119 in run
       117│         io.input.validate()
       118│ 
     → 119│         status_code = self.execute(io)
       120│ 
       121│         if status_code is None:

  18  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/cleo/commands/command.py:62 in execute
        60│ 
        61│         try:
     →  62│             return self.handle()
        63│         except KeyboardInterrupt:
        64│             return 1

  17  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/console/commands/add.py:262 in handle
       260│         self.installer.whitelist([r["name"] for r in requirements])
       261│ 
     → 262│         status = self.installer.run()
       263│ 
       264│         if status == 0 and not self.option("dry-run"):
 16  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/installer.py:116 in run
       114│             self._execute_operations = False
       115│ 
     → 116│         return self._do_install()
       117│ 
       118│     def dry_run(self, dry_run: bool = True) -> Installer:

  15  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/installer.py:263 in _do_install
       261│                 source_root=self._env.path.joinpath("src")
       262│             ):
     → 263│                 ops = solver.solve(use_latest=self._whitelist).calculate_operations()
       264│         else:
       265│             self._io.write_line("Installing dependencies from lock file")

  14  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/puzzle/solver.py:74 in solve
        72│         with self._progress(), self._provider.use_latest_for(use_latest or []):
        73│             start = time.time()
     →  74│             packages, depths = self._solve()
        75│             end = time.time()
        76│ 

  13  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/puzzle/solver.py:157 in _solve
       155│ 
       156│         try:
     → 157│             result = resolve_version(self._package, self._provider)
       158│ 
       159│             packages = result.packages

  12  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/mixology/__init__.py:18 in resolve_version
        16│     solver = VersionSolver(root, provider)
        17│ 
     →  18│     return solver.solve()
        19│ 

  11  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/mixology/version_solver.py:112 in solve
       110│             while next is not None:
       111│                 self._propagate(next)
     → 112│                 next = self._choose_package_version()
       113│ 
       114│             return self._result()
10  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/mixology/version_solver.py:428 in _choose_package_version
       426│             package = locked
       427│ 
     → 428│         package = self._provider.complete_package(package)
       429│ 
       430│         conflict = False

   9  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/puzzle/provider.py:578 in complete_package
        576│                 dependency_package = DependencyPackage(
        577│                     dependency,
     →  578│                     self._pool.package(
        579│                         package.pretty_name,
        580│                         package.version,

   8  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/repositories/repository_pool.py:124 in package
       122│         for repo in self.repositories:
       123│             try:
     → 124│                 return repo.package(name, version, extras=extras)
       125│             except PackageNotFound:
       126│                 continue

   7  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/repositories/cached_repository.py:76 in package
        74│         extras: list[str] | None = None,
        75│     ) -> Package:
     →  76│         return self.get_release_info(canonicalize_name(name), version).to_package(
        77│             name=name, extras=extras
        78│         )

   6  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/inspection/info.py:198 in to_package
       196│             try:
       197│                 # Attempt to parse the PEP-508 requirement string
     → 198│                 dependency = Dependency.create_from_pep_508(req, relative_to=root_dir)
       199│             except InvalidMarker:
       200│                 # Invalid marker, We strip the markers hoping for the best

   5  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/packages/dependency.py:369 in create_from_pep_508
       367│                 name += " ;" + rest.split(" ;", 1)[1]
       368│ 
     → 369│         req = Requirement(name)
       370│ 
       371│         name = req.name

   4  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/version/requirements.py:83 in __init__
        81│         marker = next(parsed.find_data("marker_spec"), None)
        82│         if marker:
     →  83│             marker = _compact_markers(
        84│                 marker.children[0].children, tree_prefix="markers__"
        85│             )

   3  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/version/markers.py:789 in _compact_markers
       787│ 
       788│             value = value[1:-1]
     → 789│             sub_marker = SingleMarker(str(name), f"{op}{value}")
       790│             groups[-1].append(sub_marker)
       791│ 

   2  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/version/markers.py:259 in __init__
       257│                 constraint_string = glue.join(f"{op} {value}" for value in values)
       258│ 
     → 259│             self._constraint = self._parser(constraint_string)
       260│ 
       261│     @property

   1  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/constraints/generic/parser.py:36 in parse_constraint
        34│         if len(and_constraints) > 1:
        35│             for constraint in and_constraints:
     →  36│                 constraint_objects.append(parse_single_constraint(constraint))
        37│         else:
        38│             constraint_objects.append(parse_single_constraint(and_constraints[0]))

  ParseConstraintError

  Could not parse version constraint: < "3.4"

  at ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/core/constraints/generic/parser.py:67 in parse_single_constraint
       63│         version = m.group(2).strip()
       64│ 
       65│         return Constraint(version, op)
       66│ 
    →  67│     raise ParseConstraintError(f"Could not parse version constraint: {constraint}")
       68│ 

It used to just warn:

Using version ^2.0.2 for super-state-machine

Updating dependencies
Resolving dependencies... (0.0s)Invalid constraint (enum34; extra == ':python_version < "3.4"') found in super-state-machine-2.0.2 dependencies, skipping
Resolving dependencies... (0.1s)

Package operations: 2 installs, 0 updates, 0 removals

  • Installing six (1.16.0)
  • Installing super-state-machine (2.0.2)

Do we consider this a regression or not ?

This used to just be a warning under older versions:

Activity

  1. radoering commented on Mar 28, 2023

    @radoering
    Member

    I think we consider it a bugfix. Is this python-poetry/poetry-core#461 meaning this has already changed in 1.2.x?

  2. dimbleby commented on Mar 28, 2023

    @dimbleby
    Contributor

    maybe makes sense for the marker parsing to reraise this as InvalidMarker, which the code path shown in the call stack would then catch and warn on

  3. sfmqrb commented on Mar 30, 2023

    @sfmqrb

    The exact same issue happened to me.

    Installing dependencies from lock file
    
    Package operations: 1 install, 0 updates, 0 removals
    
      • Installing zigzag (0.3.2): Failed
    
      ParseConstraintError
    
      Could not parse version constraint: >=^0.29
    
      at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/core/constraints/version/parser.py:169 in parse_single_constraint
          165│         if op == "!=":
          166│             return VersionUnion(VersionRange(max=version), VersionRange(min=version))
          167│         return version
          168│ 
        → 169│     raise ParseConstraintError(f"Could not parse version constraint: {constraint}")
          170│ 
    
    The following error occurred when trying to handle this error:
    
    
      InvalidRequirement
    
      The requirement is invalid: invalid version constraint ">=^0.29"
    
      at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/core/version/requirements.py:75 in __init__
           71│ 
           72│         try:
           73│             self.constraint = parse_constraint(constraint)
           74│         except ParseConstraintError:
        →  75│             raise InvalidRequirement(
           76│                 f'The requirement is invalid: invalid version constraint "{constraint}"'
           77│             )
           78│ 
           79│         self.pretty_constraint = constraint
    
    sajad@SFM-D:~/gstargets$ poetry --version
    Poetry (version 1.4.1)
    
    

    using version 1.1.13 there is no error and poetry install would be executed flawlessly.

    some information about my system env using poetry debug info

    Version: 1.4.1
    Python:  3.10.6
    
    Virtualenv
    Python:         3.10.6
    Implementation: CPython
    Valid:          True
    
    System
    Platform:   linux
    OS:         posix
    Python:     3.10.6
    Path:       /usr
    Executable: /usr/bin/python3.10
    
    
  4. trim21 commented on Apr 10, 2023

    @trim21
    Contributor

    I have the same error with Could not parse version constraint:

    looks like constraint here is empty string.

    And I can't find a way to know which package this is.

    Also I can't re-produce it in my computer, it only failed in windows ci...

    https://github.com/trim21/install-poetry-project/actions/runs/4659844430/jobs/8247224583

  5. dimbleby commented on Apr 10, 2023

    @dimbleby
    Contributor

    this is already fixed in poetry-core, this issue can be closed

  6. trim21 commented on Apr 10, 2023

    @trim21
    Contributor

    No it's not. I just try poetry@main with poetry-core@main it still fail.

    2023-04-10T19:13:05.1348138Z dep name pbr
    2023-04-10T19:13:05.1349414Z marker_env {'implementation_name': 'cpython', 'implementation_version': '3.8.10', 'os_name': 'nt', 'platform_machine': '', 'platform_release': '10', 'platform_system': 'Windows', 'platform_version': '10.0.20348', 'python_full_version': '3.8.10', 'platform_python_implementation': 'CPython', 'python_version': '3.8', 'sys_platform': 'win32', 'version_info': [3, 8, 10, 'final', 0], 'interpreter_name': 'cp', 'interpreter_version': '38'}
    2023-04-10T19:13:05.1350450Z dep.mark 
    2023-04-10T19:13:05.1370410Z dep name typing-extensions
    2023-04-10T19:13:05.1371625Z marker_env {'implementation_name': 'cpython', 'implementation_version': '3.8.10', 'os_name': 'nt', 'platform_machine': '', 'platform_release': '10', 'platform_system': 'Windows', 'platform_version': '10.0.20348', 'python_full_version': '3.8.10', 'platform_python_implementation': 'CPython', 'python_version': '3.8', 'sys_platform': 'win32', 'version_info': [3, 8, 10, 'final', 0], 'interpreter_name': 'cp', 'interpreter_version': '38'}
    2023-04-10T19:13:05.1372369Z dep.mark 
    2023-04-10T19:13:05.1428714Z dep name greenlet
    2023-04-10T19:13:05.1429973Z marker_env {'implementation_name': 'cpython', 'implementation_version': '3.8.10', 'os_name': 'nt', 'platform_machine': '', 'platform_release': '10', 'platform_system': 'Windows', 'platform_version': '10.0.20348', 'python_full_version': '3.8.10', 'platform_python_implementation': 'CPython', 'python_version': '3.8', 'sys_platform': 'win32', 'version_info': [3, 8, 10, 'final', 0], 'interpreter_name': 'cp', 'interpreter_version': '38'}
    2023-04-10T19:13:05.1431043Z dep.mark platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32"
    2023-04-10T19:13:06.1842853Z 
    2023-04-10T19:13:06.1855471Z   Stack trace:
    2023-04-10T19:13:06.1856077Z 
    2023-04-10T19:13:06.1858460Z   18  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\application.py:327 in run
    2023-04-10T19:13:06.2184180Z        325│ 
    2023-04-10T19:13:06.2185395Z        326│             try:
    2023-04-10T19:13:06.2186352Z      → 327│                 exit_code = self._run(io)
    2023-04-10T19:13:06.2186847Z        328│             except BrokenPipeError:
    2023-04-10T19:13:06.2187452Z        329│                 # If we are piped to another process, it may close early and send a
    2023-04-10T19:13:06.2187767Z 
    2023-04-10T19:13:06.2188399Z   17  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\console\application.py:190 in _run
    2023-04-10T19:13:06.2189075Z        188│         self._load_plugins(io)
    2023-04-10T19:13:06.2189490Z        189│ 
    2023-04-10T19:13:06.2189917Z      → 190│         exit_code: int = super()._run(io)
    2023-04-10T19:13:06.2190395Z        191│         return exit_code
    2023-04-10T19:13:06.2190773Z        192│ 
    2023-04-10T19:13:06.2190997Z 
    2023-04-10T19:13:06.2191457Z   16  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\application.py:431 in _run
    2023-04-10T19:13:06.2192076Z        429│             io.input.interactive(interactive)
    2023-04-10T19:13:06.2192604Z        430│ 
    2023-04-10T19:13:06.2193090Z      → 431│         exit_code = self._run_command(command, io)
    2023-04-10T19:13:06.2193624Z        432│         self._running_command = None
    2023-04-10T19:13:06.2193983Z        433│ 
    2023-04-10T19:13:06.2194198Z 
    2023-04-10T19:13:06.2194689Z   15  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\application.py:473 in _run_command
    2023-04-10T19:13:06.2195227Z        471│ 
    2023-04-10T19:13:06.2195967Z        472│         if error is not None:
    2023-04-10T19:13:06.2196375Z      → 473│             raise error
    2023-04-10T19:13:06.2196765Z        474│ 
    2023-04-10T19:13:06.2197227Z        475│         return terminate_event.exit_code
    2023-04-10T19:13:06.2197508Z 
    2023-04-10T19:13:06.2197997Z   14  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\application.py:457 in _run_command
    2023-04-10T19:13:06.2198499Z        455│ 
    2023-04-10T19:13:06.2198983Z        456│             if command_event.command_should_run():
    2023-04-10T19:13:06.2199503Z      → 457│                 exit_code = command.run(io)
    2023-04-10T19:13:06.2199914Z        458│             else:
    2023-04-10T19:13:06.2200673Z        459│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED
    2023-04-10T19:13:06.2201004Z 
    2023-04-10T19:13:06.2201487Z   13  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\commands\base_command.py:119 in run
    2023-04-10T19:13:06.2202073Z        117│         io.input.validate()
    2023-04-10T19:13:06.2202478Z        118│ 
    2023-04-10T19:13:06.2202897Z      → 119│         status_code = self.execute(io)
    2023-04-10T19:13:06.2203292Z        120│ 
    2023-04-10T19:13:06.2203703Z        121│         if status_code is None:
    2023-04-10T19:13:06.2203949Z 
    2023-04-10T19:13:06.2204383Z   12  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\cleo\commands\command.py:62 in execute
    2023-04-10T19:13:06.2204914Z         60│ 
    2023-04-10T19:13:06.2205294Z         61│         try:
    2023-04-10T19:13:06.2205743Z      →  62│             return self.handle()
    2023-04-10T19:13:06.2206189Z         63│         except KeyboardInterrupt:
    2023-04-10T19:13:06.2206674Z         64│             return 1
    2023-04-10T19:13:06.2206911Z 
    2023-04-10T19:13:06.2207426Z   11  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\console\commands\install.py:167 in handle
    2023-04-10T19:13:06.2208118Z        165│         self.installer.verbose(self.io.is_verbose())
    2023-04-10T19:13:06.2208539Z        166│ 
    2023-04-10T19:13:06.2208998Z      → 167│         return_code = self.installer.run()
    2023-04-10T19:13:06.2209406Z        168│ 
    2023-04-10T19:13:06.2209810Z        169│         if return_code != 0:
    2023-04-10T19:13:06.2210062Z 
    2023-04-10T19:13:06.2210525Z   10  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\installation\installer.py:117 in run
    2023-04-10T19:13:06.2211170Z        115│             self._execute_operations = False
    2023-04-10T19:13:06.2211576Z        116│ 
    2023-04-10T19:13:06.2212015Z      → 117│         return self._do_install()
    2023-04-10T19:13:06.2212387Z        118│ 
    2023-04-10T19:13:06.2212877Z        119│     def dry_run(self, dry_run: bool = True) -> Installer:
    2023-04-10T19:13:06.2213189Z 
    2023-04-10T19:13:06.2213720Z    9  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\installation\installer.py:340 in _do_install
    2023-04-10T19:13:06.2214271Z        338│ 
    2023-04-10T19:13:06.2214709Z        339│         with solver.use_environment(self._env):
    2023-04-10T19:13:06.2215267Z      → 340│             ops = solver.solve(use_latest=self._whitelist).calculate_operations(
    2023-04-10T19:13:06.2215829Z        341│                 with_uninstalls=self._requires_synchronization,
    2023-04-10T19:13:06.2216384Z        342│                 synchronize=self._requires_synchronization,
    2023-04-10T19:13:06.2216686Z 
    2023-04-10T19:13:06.2217108Z    8  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\puzzle\solver.py:74 in solve
    2023-04-10T19:13:06.2217820Z         72│         with self._progress(), self._provider.use_latest_for(use_latest or []):
    2023-04-10T19:13:06.2218373Z         73│             start = time.time()
    2023-04-10T19:13:06.2218873Z      →  74│             packages, depths = self._solve()
    2023-04-10T19:13:06.2219312Z         75│             end = time.time()
    2023-04-10T19:13:06.2219705Z         76│ 
    2023-04-10T19:13:06.2219928Z 
    2023-04-10T19:13:06.2220570Z    7  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\puzzle\solver.py:157 in _solve
    2023-04-10T19:13:06.2221117Z        155│ 
    2023-04-10T19:13:06.2221461Z        156│         try:
    2023-04-10T19:13:06.2221993Z      → 157│             result = resolve_version(self._package, self._provider)
    2023-04-10T19:13:06.2222453Z        158│ 
    2023-04-10T19:13:06.2222909Z        159│             packages = result.packages
    2023-04-10T19:13:06.2223173Z 
    2023-04-10T19:13:06.2223794Z    6  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\mixology\__init__.py:18 in resolve_version
    2023-04-10T19:13:06.2224391Z         16│     solver = VersionSolver(root, provider)
    2023-04-10T19:13:06.2224941Z         17│ 
    2023-04-10T19:13:06.2225316Z      →  18│     return solver.solve()
    2023-04-10T19:13:06.2225664Z         19│ 
    2023-04-10T19:13:06.2225879Z 
    2023-04-10T19:13:06.2226382Z    5  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\mixology\version_solver.py:112 in solve
    2023-04-10T19:13:06.2227028Z        110│             while next is not None:
    2023-04-10T19:13:06.2227498Z        111│                 self._propagate(next)
    2023-04-10T19:13:06.2228020Z      → 112│                 next = self._choose_package_version()
    2023-04-10T19:13:06.2228438Z        113│ 
    2023-04-10T19:13:06.2228844Z        114│             return self._result()
    2023-04-10T19:13:06.2229074Z 
    2023-04-10T19:13:06.2229602Z    4  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\mixology\version_solver.py:430 in _choose_package_version
    2023-04-10T19:13:06.2230160Z        428│             package = locked
    2023-04-10T19:13:06.2230512Z        429│ 
    2023-04-10T19:13:06.2231020Z      → 430│         package = self._provider.complete_package(package)
    2023-04-10T19:13:06.2231476Z        431│ 
    2023-04-10T19:13:06.2231841Z        432│         conflict = False
    2023-04-10T19:13:06.2232089Z 
    2023-04-10T19:13:06.2232613Z    3  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\puzzle\provider.py:636 in complete_package
    2023-04-10T19:13:06.2233307Z         634│             print("marker_env", self._env.marker_env)
    2023-04-10T19:13:06.2233803Z         635│             print("dep.mark", dep.marker)
    2023-04-10T19:13:06.2234329Z      →  636│             if self._env and not dep.marker.validate(self._env.marker_env):
    2023-04-10T19:13:06.2234792Z         637│                 continue
    2023-04-10T19:13:06.2235142Z         638│ 
    2023-04-10T19:13:06.2235364Z 
    2023-04-10T19:13:06.2235871Z    2  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\core\version\markers.py:243 in validate
    2023-04-10T19:13:06.2236619Z         241│         # both are BaseConstraint or both are VersionConstraint.  But it's hard for mypy
    2023-04-10T19:13:06.2237075Z         242│         # to know that.
    2023-04-10T19:13:06.2237493Z      →  243│         constraint = self._parser(environment[self._name])
    2023-04-10T19:13:06.2238026Z         244│         return self._constraint.allows(constraint)  # type: ignore[arg-type]
    2023-04-10T19:13:06.2238390Z         245│ 
    2023-04-10T19:13:06.2238573Z 
    2023-04-10T19:13:06.2239027Z    1  c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\core\constraints\generic\parser.py:38 in parse_constraint
    2023-04-10T19:13:06.2239644Z         36│                 constraint_objects.append(parse_single_constraint(constraint))
    2023-04-10T19:13:06.2240064Z         37│         else:
    2023-04-10T19:13:06.2240526Z      →  38│             constraint_objects.append(parse_single_constraint(and_constraints[0]))
    2023-04-10T19:13:06.2240945Z         39│ 
    2023-04-10T19:13:06.2241353Z         40│         if len(constraint_objects) == 1:
    2023-04-10T19:13:06.2241615Z 
    2023-04-10T19:13:06.2241790Z   ParseConstraintError
    2023-04-10T19:13:06.2242016Z 
    2023-04-10T19:13:06.2242171Z   Could not parse version constraint: 
    2023-04-10T19:13:06.2242410Z 
    2023-04-10T19:13:06.2244124Z   at c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\poetry\core\constraints\generic\parser.py:67 in parse_single_constraint
    2023-04-10T19:13:06.2244784Z        63│         version = m.group(2).strip()
    2023-04-10T19:13:06.2245148Z        64│ 
    2023-04-10T19:13:06.2245516Z        65│         return Constraint(version, op)
    2023-04-10T19:13:06.2245844Z        66│ 
    2023-04-10T19:13:06.2246325Z     →  67│     raise ParseConstraintError(f"Could not parse version constraint: {constraint}")
    2023-04-10T19:13:06.2246755Z        68│ 
    
  7. dimbleby commented on Apr 10, 2023

    @dimbleby
    Contributor

    that stack is quite different from the one reported in this issue, please raise new problems in new issues

    (this issue can still be closed!)

  8. github-actions commented on Feb 29, 2024

    @github-actions

    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.

  9. locked as resolved and limited conversation to collaborators on Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions