<h3 dir="auto">Describe the bug</h3>
<p dir="auto">I have tried to update my dependencies with <code class="notranslate">poetry update</code>, getting <code class="notranslate">'EmptyConstraint' object has no attribute 'allows'</code> issue.</p>
<p dir="auto">Pinning down the version of sqlalchemy to 1.4,22 fixes the issue.</p>
<p dir="auto">I think recent changes in setup.cfg might cause the issue, more specifically the below line:</p>
<p dir="auto"><code class="notranslate"> greenlet != 0.4.17;python_version&gt;="3" and platform_machine in 'x86_64 X86_64 aarch64 AARCH64 ppc64le PPC64LE amd64 AMD64 win32 WIN32'</code></p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="`poetry update`  # from an environment with e.g. version 1.4.22"><pre class="notranslate"><span class="pl-s"><span class="pl-pds">`</span>poetry update<span class="pl-pds">`</span></span>  <span class="pl-c"><span class="pl-c">#</span> from an environment with e.g. version 1.4.22</span></pre></div>
<h3 dir="auto">Error</h3>
<p dir="auto"><code class="notranslate">'EmptyConstraint' object has no attribute 'allows'</code></p>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS: Windows 11</li>
<li>Python: 3.9.6</li>
<li>SQLAlchemy: 1.4.23</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Describe the bug</h3>
<p dir="auto">Poetry cannot install sqlalchemy 1.4.23. Using <code class="notranslate">poetry update</code> on an existing project with sqlalchemy pinned to 1.4.* fails with a stack trace in poetry. Pinning sqlalchemy to 1.4.22 works.</p>
<p dir="auto">Perhaps this may be classed as a poetry bug but it did work with all previous versions of sqlalchemy.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">In an empty directory and a suitable virtual environment use poetry to create a new project then install packages:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ poetry init --no-interaction --name dummy --dependency sqlalchemy==&quot;1.4.*&quot;

This command will guide you through creating your pyproject.toml config.


You can specify a package in the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)



$ poetry install
Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

  AttributeError

  'EmptyConstraint' object has no attribute 'allows'

  at ~/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:291 in validate
      287│ 
      288│         if self._name not in environment:
      289│             return True
      290│ 
    → 291│         return self._constraint.allows(self._parser(environment[self._name]))
      292│ 
      293│     def without_extras(self):  # type: () -&gt; MarkerTypes
      294│         return self.exclude(&quot;extra&quot;)
      295│ 
"><pre class="notranslate">$ poetry init --no-interaction --name dummy --dependency sqlalchemy==<span class="pl-s"><span class="pl-pds">"</span>1.4.*<span class="pl-pds">"</span></span>

This <span class="pl-c1">command</span> will guide you through creating your pyproject.toml config.


You can specify a package <span class="pl-k">in</span> the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)



$ poetry install
Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

  AttributeError

  <span class="pl-s"><span class="pl-pds">'</span>EmptyConstraint<span class="pl-pds">'</span></span> object has no attribute <span class="pl-s"><span class="pl-pds">'</span>allows<span class="pl-pds">'</span></span>

  at <span class="pl-k">~</span>/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:291 <span class="pl-k">in</span> validate
      287│ 
      288│         <span class="pl-k">if</span> self._name not <span class="pl-k">in</span> environment:
      289│             <span class="pl-k">return</span> True
      290│ 
    → 291│         <span class="pl-k">return</span> self._constraint.allows(self._parser(environment[self._name]))
      292│ 
      293│     def without_extras(self):  <span class="pl-c"><span class="pl-c">#</span> type: () -&gt; MarkerTypes</span>
      294│         <span class="pl-k">return</span> self.exclude(<span class="pl-s"><span class="pl-pds">"</span>extra<span class="pl-pds">"</span></span>)
      295│ 
</pre></div>
<p dir="auto">The same sequence works with sqlalchemy 1.4.22:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rm poetry.lock pyproject.toml
$ poetry init --no-interaction --name dummy --dependency sqlalchemy==&quot;1.4.22&quot;

This command will guide you through creating your pyproject.toml config.


You can specify a package in the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)



$ poetry install
Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 2 installs, 0 updates, 0 removals

  • Installing greenlet (1.1.1)
  • Installing sqlalchemy (1.4.22)"><pre class="notranslate"><code class="notranslate">$ rm poetry.lock pyproject.toml
$ poetry init --no-interaction --name dummy --dependency sqlalchemy=="1.4.22"

This command will guide you through creating your pyproject.toml config.


You can specify a package in the following forms:
  - A single name (requests)
  - A name and a constraint (requests@^2.23.0)
  - A git url (git+https://github.com/python-poetry/poetry.git)
  - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
  - A file path (../my-package/my-package.whl)
  - A directory (../my-package/)
  - A url (https://example.com/packages/my-package-0.1.0.tar.gz)



$ poetry install
Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 2 installs, 0 updates, 0 removals

  • Installing greenlet (1.1.1)
  • Installing sqlalchemy (1.4.22)
</code></pre></div>
<h3 dir="auto">Error</h3>
<p dir="auto">Complete stack trace running <code class="notranslate">poetry install -v</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  Stack trace:

  14  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/console_application.py:131 in run
      status_code = command.handle(parsed_args, io)

  13  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/api/command/command.py:120 in handle
      status_code = self._do_handle(args, io)

  12  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/api/command/command.py:171 in _do_handle
      return getattr(handler, handler_method)(args, io, self)

  11  ~/.poetry/lib/poetry/_vendor/py3.9/cleo/commands/command.py:92 in wrap_handle
      return self.handle()

  10  ~/.poetry/lib/poetry/console/commands/install.py:71 in handle
      return_code = self._installer.run()

   9  ~/.poetry/lib/poetry/installation/installer.py:103 in run
      return self._do_install(local_repo)

   8  ~/.poetry/lib/poetry/installation/installer.py:305 in _do_install
      ops = solver.solve(use_latest=self._whitelist)

   7  ~/.poetry/lib/poetry/puzzle/solver.py:65 in solve
      packages, depths = self._solve(use_latest=use_latest)

   6  ~/.poetry/lib/poetry/puzzle/solver.py:233 in _solve
      result = resolve_version(

   5  ~/.poetry/lib/poetry/mixology/__init__.py:7 in resolve_version
      return solver.solve()

   4  ~/.poetry/lib/poetry/mixology/version_solver.py:84 in solve
      next = self._choose_package_version()

   3  ~/.poetry/lib/poetry/mixology/version_solver.py:400 in _choose_package_version
      version = self._provider.complete_package(version)

   2  ~/.poetry/lib/poetry/puzzle/provider.py:479 in complete_package
      if self._env and not dep.marker.validate(self._env.marker_env):

   1  ~/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:456 in validate
      if not m.validate(environment):

  AttributeError

  'EmptyConstraint' object has no attribute 'allows'

  at ~/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:291 in validate
      287│ 
      288│         if self._name not in environment:
      289│             return True
      290│ 
    → 291│         return self._constraint.allows(self._parser(environment[self._name]))
      292│ 
      293│     def without_extras(self):  # type: () -&gt; MarkerTypes
      294│         return self.exclude(&quot;extra&quot;)
      295│ 
"><pre class="notranslate"><code class="notranslate">  Stack trace:

  14  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/console_application.py:131 in run
      status_code = command.handle(parsed_args, io)

  13  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/api/command/command.py:120 in handle
      status_code = self._do_handle(args, io)

  12  ~/.poetry/lib/poetry/_vendor/py3.9/clikit/api/command/command.py:171 in _do_handle
      return getattr(handler, handler_method)(args, io, self)

  11  ~/.poetry/lib/poetry/_vendor/py3.9/cleo/commands/command.py:92 in wrap_handle
      return self.handle()

  10  ~/.poetry/lib/poetry/console/commands/install.py:71 in handle
      return_code = self._installer.run()

   9  ~/.poetry/lib/poetry/installation/installer.py:103 in run
      return self._do_install(local_repo)

   8  ~/.poetry/lib/poetry/installation/installer.py:305 in _do_install
      ops = solver.solve(use_latest=self._whitelist)

   7  ~/.poetry/lib/poetry/puzzle/solver.py:65 in solve
      packages, depths = self._solve(use_latest=use_latest)

   6  ~/.poetry/lib/poetry/puzzle/solver.py:233 in _solve
      result = resolve_version(

   5  ~/.poetry/lib/poetry/mixology/__init__.py:7 in resolve_version
      return solver.solve()

   4  ~/.poetry/lib/poetry/mixology/version_solver.py:84 in solve
      next = self._choose_package_version()

   3  ~/.poetry/lib/poetry/mixology/version_solver.py:400 in _choose_package_version
      version = self._provider.complete_package(version)

   2  ~/.poetry/lib/poetry/puzzle/provider.py:479 in complete_package
      if self._env and not dep.marker.validate(self._env.marker_env):

   1  ~/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:456 in validate
      if not m.validate(environment):

  AttributeError

  'EmptyConstraint' object has no attribute 'allows'

  at ~/.poetry/lib/poetry/_vendor/py3.9/poetry/core/version/markers.py:291 in validate
      287│ 
      288│         if self._name not in environment:
      289│             return True
      290│ 
    → 291│         return self._constraint.allows(self._parser(environment[self._name]))
      292│ 
      293│     def without_extras(self):  # type: () -&gt; MarkerTypes
      294│         return self.exclude("extra")
      295│ 

</code></pre></div>
<h3 dir="auto">Versions</h3>
<ul dir="auto">
<li>OS: MacOS 10.14.6 (also CircleCI docker image based on Ubuntu 18.04.5 LTS)</li>
<li>Python: 3.9.5</li>
<li>Poetry 1.1.7</li>
<li>SQLAlchemy: 1.4.23</li>
<li>Database: N/A</li>
<li>DBAPI: N/A</li>
</ul>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>