Skip to content

poetry 1.1.2 with enable parallel fails to find package from pypi when custom private source is set. #3162

Closed as not planned

Description

@ninyawee
  • 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: Windows 10 2004 build 19041.508 (latest at the time)
  • Poetry version: 1.1.2 (latest at the time)
  • Python version: 3.9.0 (latest at the time)

Issue

here is my project toml file.

[tool.poetry]
name = "saku"
version = "2.0.0"
description = "an facebook chatbot"
authors = ["Nutchanon Ninyawee <me@nutchanon.org>"]

[[tool.poetry.source]]
url = "https://pypi.fury.io/sakuguru/"
name = "sakupull"

[tool.poetry.dependencies]
python = "^3.8"
fastapi = "^0.58.1"
uvicorn = "^0.11.5"
google-cloud-talent = "^0.6.1"
aiofiles = "^0.5.0"
python-decouple = "^3.3"
pymongo = "^3.10.1"
mongoengine = "^0.20.0"
orjson = { version = "^3.2.2", optional = true }
mixpanel = "^4.6.0"
pytalentsolution = "^0.2.0"
dnspython = "^2.0.0"
Pillow = "^7.2.0"
arrow = "^0.15.8"
jinja2 = "^2.11.2"
furl = "^2.1.0"
songmam = "^1.5.1"
loguru = "^0.5.1"
faker = "^4.1.2"
avajana = "^0.4"
python-multipart = "^0.0.5"
parse_with_dot_access = "^1.17.1"
moshimoshi = "^0.2"
futureboard = "^0.2.0"
motor = "^2.3.0"
python-dotenv = "^0.14.0"

[tool.poetry.dev-dependencies]
pytest = "^5.4.3"
pre-commit = "^2.7.1"

[tool.poetry.extras]
all = ["orjson"]

[tool.black]
exclued = '''
/(
    \.git
  | \.hg
  | \.mypy_cache
  | \.tox
  | \.venv
  | _build
  | buck-out
  | build
  | dist
  | alembic
)/
'''

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

after I upgraded poetry to 1.1.2, I thrilled to see how fast my installation will be. thus I removed and reinstalled pkgs with poetry update.

C:\Users\n2\WinDevs\sakuguru\saku>poetry update
Creating virtualenv saku in C:\Users\n2\WinDevs\sakuguru\saku\.venv
Updating dependencies
Resolving dependencies...

  RepositoryError

  403 Client Error: Forbidden for url: https://pypi.fury.io/sakuguru/pre-commit/

  at ~\.poetry\lib\poetry\repositories\legacy_repository.py:390 in _get
      386│             if response.status_code == 404:
      387│                 return
      388│             response.raise_for_status()
      389│         except requests.HTTPError as e:
    → 390│             raise RepositoryError(e)
      391│
      392│         if response.status_code in (401, 403):
      393│             self._log(
      394│                 "Authorization error accessing {url}".format(url=url), level="warn"

then I removed the custom source.

[[tool.poetry.source]]
url = "https://pypi.fury.io/sakuguru/"
name = "sakupull"

Things went smoothly**

C:\Users\n2\WinDevs\sakuguru\saku>poetry update
Updating dependencies
Resolving dependencies...

Writing lock file

Package operations: 82 installs, 0 updates, 0 removals

  • Installing hpack (3.0.0)
  • Installing hyperframe (5.2.0)
  • Installing pyasn1 (0.4.8)
  • Installing six (1.15.0)
  • Installing cachetools (4.1.1)
  • Installing certifi (2020.6.20)
  • Installing chardet (3.0.4)
  • Installing h2 (3.2.0)
  • Installing idna (2.10)
  • Installing colorama (0.4.3)
  • Installing h11 (0.9.0)
  • Installing protobuf (3.13.0)
  • Installing pyasn1-modules (0.2.8)
  • Installing urllib3 (1.25.10)
  • Installing sniffio (1.1.0)
  • Installing rsa (4.6)
  • Installing win32-setctime (1.0.3)
  • Installing appdirs (1.4.4)
  • Installing distlib (0.3.1)
  • Installing googleapis-common-protos (1.52.0)
  • Installing grpcio (1.32.0)
  • Installing httpcore (0.9.1)
  • Installing orderedmultidict (1.0.1)
  • Installing pydantic (1.6.1)
  • Installing pytz (2020.1)
  • Installing rfc3986 (1.4.0)
  • Installing parse-with-dot-access (1.17.1)
  • Installing filelock (3.0.12)
  • Installing google-auth (1.22.1)
  • Installing hstspreload (2020.10.6)
  • Installing requests (2.24.0)
  • Installing pyparsing (2.4.7)
  • Installing loguru (0.5.3)

  EnvCommandError

  Command C:\Users\n2\WinDevs\sakuguru\saku\.venv\Scripts\pip.exe install --no-deps C:\Users\n2\AppData\Local\pypoetry\Cache\artifacts\66\65\0d\8e07624a39ae6e7046e31161862247ec1dab0f862863b01450677115b8\grpcio-1.32.0.tar.gz errored with the following return code 1, and output:
  Processing c:\users\n2\appdata\local\pypoetry\cache\artifacts\66\65\0d\8e07624a39ae6e7046e31161862247ec1dab0f862863b01450677115b8\grpcio-1.32.0.tar.gz
  Building wheels for collected packages: grpcio
    Building wheel for grpcio (setup.py): started
    Building wheel for grpcio (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"'; __file__='"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__fi
le__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\n2\AppData\Local\Temp\pip-wheel-0wb9243m'
         cwd: C:\Users\n2\AppData\Local\Temp\pip-req-build-822bdw3z\
    Complete output (79 lines):
    ASM Builds for BoringSSL currently not supported on: win-amd64
    Found cython-generated files...
    running bdist_wheel
    running build
    running build_py
    running build_project_metadata
    creating python_build
    creating python_build\lib.win-amd64-3.9
    creating python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_channel.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_common.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_compression.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_grpcio_metadata.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_interceptor.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_plugin_wrapping.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_runtime_protos.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_server.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_simple_stubs.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\_utilities.py -> python_build\lib.win-amd64-3.9\grpc
    copying src\python\grpcio\grpc\__init__.py -> python_build\lib.win-amd64-3.9\grpc
    creating python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_base_call.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_base_channel.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_base_server.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_call.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_channel.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_interceptor.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_metadata.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_server.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_typing.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\_utils.py -> python_build\lib.win-amd64-3.9\grpc\aio
    copying src\python\grpcio\grpc\aio\__init__.py -> python_build\lib.win-amd64-3.9\grpc\aio
    creating python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\implementations.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\interfaces.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\utilities.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\_client_adaptations.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\_metadata.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\_server_adaptations.py -> python_build\lib.win-amd64-3.9\grpc\beta
    copying src\python\grpcio\grpc\beta\__init__.py -> python_build\lib.win-amd64-3.9\grpc\beta
    creating python_build\lib.win-amd64-3.9\grpc\experimental
    copying src\python\grpcio\grpc\experimental\gevent.py -> python_build\lib.win-amd64-3.9\grpc\experimental
    copying src\python\grpcio\grpc\experimental\session_cache.py -> python_build\lib.win-amd64-3.9\grpc\experimental
    copying src\python\grpcio\grpc\experimental\__init__.py -> python_build\lib.win-amd64-3.9\grpc\experimental
    creating python_build\lib.win-amd64-3.9\grpc\framework
    copying src\python\grpcio\grpc\framework\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework
    creating python_build\lib.win-amd64-3.9\grpc\_cython
    copying src\python\grpcio\grpc\_cython\__init__.py -> python_build\lib.win-amd64-3.9\grpc\_cython
    creating python_build\lib.win-amd64-3.9\grpc\experimental\aio
    copying src\python\grpcio\grpc\experimental\aio\__init__.py -> python_build\lib.win-amd64-3.9\grpc\experimental\aio
    creating python_build\lib.win-amd64-3.9\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\cardinality.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\style.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
    copying src\python\grpcio\grpc\framework\common\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
    creating python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\abandonment.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\callable_util.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\future.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\logging_pool.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\stream.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\stream_util.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    copying src\python\grpcio\grpc\framework\foundation\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
    creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces
    copying src\python\grpcio\grpc\framework\interfaces\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces
    creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\base.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\utilities.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
    copying src\python\grpcio\grpc\framework\interfaces\base\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
    creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\face.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\utilities.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
    copying src\python\grpcio\grpc\framework\interfaces\face\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
    creating python_build\lib.win-amd64-3.9\grpc\_cython\_cygrpc
    copying src\python\grpcio\grpc\_cython\_cygrpc\__init__.py -> python_build\lib.win-amd64-3.9\grpc\_cython\_cygrpc
    creating python_build\lib.win-amd64-3.9\grpc\_cython\_credentials
    copying src\python\grpcio\grpc\_cython\_credentials\roots.pem -> python_build\lib.win-amd64-3.9\grpc\_cython\_credentials
    running build_ext
    error: [WinError 2] The system cannot find the file specified
    ----------------------------------------
    ERROR: Failed building wheel for grpcio
    Running setup.py clean for grpcio
  Failed to build grpcio
  DEPRECATION: Could not build wheels for grpcio which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
  Installing collected packages: grpcio
      Running setup.py install for grpcio: started
      Running setup.py install for grpcio: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"'; __file__='"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__
file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\n2\AppData\Local\Temp\pip-record-un95orpr\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\include\site\python3.9\grpcio'
           cwd: C:\Users\n2\AppData\Local\Temp\pip-req-build-822bdw3z\
      Complete output (82 lines):
      C:\Users\n2\AppData\Local\Temp\pip-req-build-822bdw3z\src\python\grpcio\commands.py:104: SyntaxWarning: "is not" with a literal. Did you mean "!="?
        if exit_code is not 0:
      ASM Builds for BoringSSL currently not supported on: win-amd64
      Cython-generated files are missing...
      We could not find Cython. Setup may take 10-20 minutes.
      running install
      running build
      running build_py
      running build_project_metadata
      creating python_build
      creating python_build\lib.win-amd64-3.9
      creating python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_auth.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_channel.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_common.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_compression.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_grpcio_metadata.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_interceptor.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_plugin_wrapping.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_runtime_protos.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_server.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_simple_stubs.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\_utilities.py -> python_build\lib.win-amd64-3.9\grpc
      copying src\python\grpcio\grpc\__init__.py -> python_build\lib.win-amd64-3.9\grpc
      creating python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_base_call.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_base_channel.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_base_server.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_call.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_channel.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_interceptor.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_metadata.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_server.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_typing.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\_utils.py -> python_build\lib.win-amd64-3.9\grpc\aio
      copying src\python\grpcio\grpc\aio\__init__.py -> python_build\lib.win-amd64-3.9\grpc\aio
      creating python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\implementations.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\interfaces.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\utilities.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\_client_adaptations.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\_metadata.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\_server_adaptations.py -> python_build\lib.win-amd64-3.9\grpc\beta
      copying src\python\grpcio\grpc\beta\__init__.py -> python_build\lib.win-amd64-3.9\grpc\beta
      creating python_build\lib.win-amd64-3.9\grpc\experimental
      copying src\python\grpcio\grpc\experimental\gevent.py -> python_build\lib.win-amd64-3.9\grpc\experimental
      copying src\python\grpcio\grpc\experimental\session_cache.py -> python_build\lib.win-amd64-3.9\grpc\experimental
      copying src\python\grpcio\grpc\experimental\__init__.py -> python_build\lib.win-amd64-3.9\grpc\experimental
      creating python_build\lib.win-amd64-3.9\grpc\framework
      copying src\python\grpcio\grpc\framework\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework
      creating python_build\lib.win-amd64-3.9\grpc\_cython
      copying src\python\grpcio\grpc\_cython\__init__.py -> python_build\lib.win-amd64-3.9\grpc\_cython
      creating python_build\lib.win-amd64-3.9\grpc\experimental\aio
      copying src\python\grpcio\grpc\experimental\aio\__init__.py -> python_build\lib.win-amd64-3.9\grpc\experimental\aio
      creating python_build\lib.win-amd64-3.9\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\cardinality.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\style.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
      copying src\python\grpcio\grpc\framework\common\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\common
      creating python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\abandonment.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\callable_util.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\future.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\logging_pool.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\stream.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\stream_util.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      copying src\python\grpcio\grpc\framework\foundation\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\foundation
      creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces
      copying src\python\grpcio\grpc\framework\interfaces\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces
      creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\base.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\utilities.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
      copying src\python\grpcio\grpc\framework\interfaces\base\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\base
      creating python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\face.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\utilities.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
      copying src\python\grpcio\grpc\framework\interfaces\face\__init__.py -> python_build\lib.win-amd64-3.9\grpc\framework\interfaces\face
      creating python_build\lib.win-amd64-3.9\grpc\_cython\_cygrpc
      copying src\python\grpcio\grpc\_cython\_cygrpc\__init__.py -> python_build\lib.win-amd64-3.9\grpc\_cython\_cygrpc
      creating python_build\lib.win-amd64-3.9\grpc\_cython\_credentials
      copying src\python\grpcio\grpc\_cython\_credentials\roots.pem -> python_build\lib.win-amd64-3.9\grpc\_cython\_credentials
      running build_ext
      error: [WinError 2] The system cannot find the file specified
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"'; __file__='"'"'C:\\Users\\n2\\AppData\\Local\\Temp\\pip-req-build-822bdw3z\\setup.py'"'"';f=getattr(t
okenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\n2\AppData\Local\Temp\pip-record-un95orpr\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\in
clude\site\python3.9\grpcio' Check the logs for full command output.
  WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
  You should consider upgrading via the 'C:\Users\n2\WinDevs\sakuguru\saku\.venv\Scripts\python.exe -m pip install --upgrade pip' command.


  at ~\.poetry\lib\poetry\utils\env.py:948 in _run
       944│                 output = subprocess.check_output(
       945│                     cmd, stderr=subprocess.STDOUT, **kwargs
       946│                 )
       947│         except CalledProcessError as e:
    →  948│             raise EnvCommandError(e, input=input_)
       949│
       950│         return decode(output)
       951│
       952│     def execute(self, bin, *args, **kwargs):

There is an error, but that may be unrelated and off-topic.

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Oct 9, 2020
  2. ninyawee commented on Oct 9, 2020

    @ninyawee
    ContributorAuthor

    seems related to #3117

  3. ninyawee commented on Oct 9, 2020

    @ninyawee
    ContributorAuthor

    seems related to #3117

    C:\Users\n2\WinDevs\sakuguru\saku>C:\Users\n2\WinDevs\contribute\poetry\.venv\Scripts\poetry.cmd update
    Creating virtualenv saku in C:\Users\n2\WinDevs\sakuguru\saku\.venv
    Updating dependencies
    Resolving dependencies...
    
      RepositoryError
    
      403 Client Error: Forbidden for url: https://pypi.fury.io/sakuguru/pre-commit/
    
      at ~\WinDevs\contribute\poetry\poetry\repositories\legacy_repository.py:390 in _get
          386│             if response.status_code == 404:
          387│                 return
          388│             response.raise_for_status()
          389│         except requests.HTTPError as e:
        → 390│             raise RepositoryError(e)
          391│
          392│         if response.status_code in (401, 403):
          393│             self._log(
          394│                 "Authorization error accessing {url}".format(url=url), level="warn"
    

    To no avail, this does not solved this issue .

  4. CaueP commented on Oct 8, 2022

    @CaueP

    I'm facing the same issue described here and when it also worked when the custom source is removed from pyproject.toml. The only difference is that I'm using poetry version 1.1.8,

    I was able to reproduce on the following environment:
    Poetry version: 1.1.8
    Python version: 3.7.13

    Using a pyproject.toml:

    [tool.poetry]
    name = "poetry-test"
    version = "0.1.0"
    description = "Poetry test"
    authors = ["Your Name <you@example.com>"]
    
    [tool.poetry.dependencies]
    python = "^3.7"
    requests = "^2.23.0"
    
    [[tool.poetry.source]]
    name = "loggi"
    url = "https://pypi.lg.com/abc/"
    secondary = true
    
    [tool.poetry.dev-dependencies]
    
    [build-system]
    requires = ["poetry-core>=1.0.0"]
    build-backend = "poetry.core.masonry.api"
    

    If I try to add a new lib, update lock file or install with the commands below I get the same error error:

    • Generating lock file: poetry lock --no-update
    » poetry lock --no-update
    Updating dependencies
    Resolving dependencies... (2.0s)
    
      RepositoryError
    
      403 Client Error: Forbidden for url: https://pypi.lg.com/abc/requests/
    
      at ~/.poetry/lib/poetry/repositories/legacy_repository.py:393 in _get
          389│             if response.status_code == 404:
          390│                 return
          391│             response.raise_for_status()
          392│         except requests.HTTPError as e:
        → 393│             raise RepositoryError(e)
          394│ 
          395│         if response.status_code in (401, 403):
          396│             self._log(
          397│                 "Authorization error accessing {url}".format(url=response.url),
    • Adding a new lib: poetry add oauthlib
    » poetry add oauthlib 
    
      RepositoryError
    
      403 Client Error: Forbidden for url: https://pypi.lg.com/abc/oauthlib/
    
      at ~/.poetry/lib/poetry/repositories/legacy_repository.py:393 in _get
          389│             if response.status_code == 404:
          390│                 return
          391│             response.raise_for_status()
          392│         except requests.HTTPError as e:
        → 393│             raise RepositoryError(e)
          394│ 
          395│         if response.status_code in (401, 403):
          396│             self._log(
          397│                 "Authorization error accessing {url}".format(url=response.url),

    Even manually setting the source it tries to use the custom source:

    • poetry add oauthlib --source pypi -vvv
    » poetry add oauthlib --source pypi -vvv            
    Using virtualenv: /home/caue/.pyenv/versions/3.7.4/envs/poetry-test
    PyPI: 49 packages found for oauthlib *
    Using version ^3.2.1 for oauthlib
    
    Updating dependencies
    Resolving dependencies...
       1: fact: poetry-test is 0.1.0
       1: derived: poetry-test
       1: fact: poetry-test depends on requests (^2.23.0)
       1: fact: poetry-test depends on oauthlib (^3.2.1)
       1: selecting poetry-test (0.1.0)
       1: derived: oauthlib (>=3.2.1,<4.0.0)
       1: derived: requests (>=2.23.0,<3.0.0)
    PyPI: No release information found for requests-0.0.1, skipping
    PyPI: No release information found for requests-0.12.01, skipping
    PyPI: No release information found for requests-2.15.0, skipping
    PyPI: 9 packages found for requests >=2.23.0,<3.0.0
       1: Version solving took 0.928 seconds.
       1: Tried 1 solutions.
    
      Stack trace:
    
      16  ~/.poetry/lib/poetry/_vendor/py3.7/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
    
      15  ~/.poetry/lib/poetry/_vendor/py3.7/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():
    
      14  ~/.poetry/lib/poetry/_vendor/py3.7/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
    
      13  ~/.poetry/lib/poetry/_vendor/py3.7/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]
    
      12  ~/.poetry/lib/poetry/console/commands/add.py:173 in handle
           171│             self._installer.whitelist([r["name"] for r in requirements])
           172│ 
         → 173│             status = self._installer.run()
           174│         except BaseException:
           175│             # Using BaseException here as some exceptions, eg: KeyboardInterrupt, do not inherit from Exception
    
      11  ~/.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
    
      10  ~/.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")
    
       9  ~/.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│ 
    
       8  ~/.poetry/lib/poetry/puzzle/solver.py:234 in _solve
           232│         try:
           233│             result = resolve_version(
         → 234│                 self._package, self._provider, locked=locked, use_latest=use_latest
           235│             )
           236│ 
    
       7  ~/.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│ 
    
       6  ~/.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()
    
       5  ~/.poetry/lib/poetry/mixology/version_solver.py:372 in _choose_package_version
           370│             dependency = unsatisfied[0]
           371│         else:
         → 372│             dependency = min(*unsatisfied, key=_get_min)
           373│ 
           374│         locked = self._get_locked(dependency)
    
       4  ~/.poetry/lib/poetry/mixology/version_solver.py:364 in _get_min
           362│                 return (
           363│                     not dependency.marker.is_any(),
         → 364│                     len(self._provider.search_for(dependency)),
           365│                 )
           366│             except ValueError:
    
       3  ~/.poetry/lib/poetry/puzzle/provider.py:139 in search_for
           137│             packages = self.search_for_url(dependency)
           138│         else:
         → 139│             packages = self._pool.find_packages(dependency)
           140│ 
           141│             packages.sort(
    
       2  ~/.poetry/lib/poetry/repositories/pool.py:170 in find_packages
           168│         packages = []
           169│         for repo in self._repositories:
         → 170│             packages += repo.find_packages(dependency)
           171│ 
           172│         return packages
    
       1  ~/.poetry/lib/poetry/repositories/legacy_repository.py:264 in find_packages
           262│             versions = self._cache.store("matches").get(key)
           263│         else:
         → 264│             page = self._get("/{}/".format(dependency.name.replace(".", "-")))
           265│             if page is None:
           266│                 return []
    
      RepositoryError
    
      403 Client Error: Forbidden for url: https://pypi.lg.com/abc/requests/
    
      at ~/.poetry/lib/poetry/repositories/legacy_repository.py:393 in _get
          389│             if response.status_code == 404:
          390│                 return
          391│             response.raise_for_status()
          392│         except requests.HTTPError as e:
        → 393│             raise RepositoryError(e)
          394│ 
          395│         if response.status_code in (401, 403):
          396│             self._log(
          397│                 "Authorization error accessing {url}".format(url=response.url),
    
  5. added
    status/needs-reproductionIssue needs a minimal reproduction to be confirmed
    area/sourcesReleated to package sources/indexes/repositories
    and removed
    status/triageThis issue needs to be triaged
    on Oct 9, 2022
  6. neersighted commented on Oct 9, 2022

    @neersighted
    Member

    Hi @CaueP -- you are on a very outdated version of Poetry. I cannot reproduce this on 1.2.x -- if you are able to do so, please open a new issue with a package repository that reproduces it defined/available. There is a user on Discord with a similar issue -- whichever of you manages to reproduce it second, please add your reproduction to the existing issue if it exists.

  7. kristang commented on Oct 12, 2022

    @kristang

    I was the user on Discord @neersighted referred to. My issue does not seem related to yours @CaueP, but also involves a private feed causing some problems.

    I downgraded poetry to 1.1.8 to see if I could replicate your issue, but it works fine for me on Python 3.9. I cannot downgrade my Python to exactly match you unfortunately.

  8. CaueP commented on Oct 17, 2022

    @CaueP

    Hi @CaueP -- you are on a very outdated version of Poetry. I cannot reproduce this on 1.2.x -- if you are able to do so, please open a new issue with a package repository that reproduces it defined/available. There is a user on Discord with a similar issue -- whichever of you manages to reproduce it second, please add your reproduction to the existing issue if it exists.

    The error reported doesn't happen on version 1.2.x, but I faced other issues related to setuptools and pip as noted on the version 1.2 announcement that is blocking the update to this version, so this is not a feasible solution.

    I updated to the latest 1.1 version (1.1.15), but the same error still happens.

    Inspired by this workaround on another issue, I changed the code on the same file to avoid raising the exception when Poetry cannot retrieve a PyPi package from a custom source and it worked as expected. The change I've made:

    Current code:

    def _get(self, endpoint): # type: (str) -> Union[Page, None]
    url = self._url + endpoint
    try:
    response = self.session.get(url)
    if response.status_code == 404:
    return
    response.raise_for_status()
    except requests.HTTPError as e:
    raise RepositoryError(e)

    Change on line 389 to return when the response is a 403:

        def _get(self, endpoint):  # type: (str) -> Union[Page, None]
            url = self._url + endpoint
            try:
                response = self.session.get(url)
                if response.status_code in (404, 403):
                    return
                response.raise_for_status()
            except requests.HTTPError as e:
                raise RepositoryError(e)

    @kristang could you try this code change to see if it works for you?

    The main problem with this issue is that I'm blocked to do anything that changes poetry.lock file, because it always fails on the dependency resolution even with pre-existing packages. Do you think it's possible to make a patch with this change on version 1.1.x so we can get it fixed? I could work on this issue if needed.

  9. neersighted commented on Oct 17, 2022

    @neersighted
    Member

    You should be fine to migrate to 1.2 -- the issue is only when 'split brain' between 1.2 and 1.1. If you're having other issues relating to locking and installing setuptools/pip, that may be a new issue?

    We're not planning any releases for the 1.1 branch -- the team is pretty small and we do not have the bandwidth to maintain a third branch with very very different code (and, the intention is that all fixes/changes go into master first, barring exceptional circumstances like the bad cherry-pick last week).

    I would suggest evaluating 1.2 and asking for help via Discord/Discussions if there is something truly blocking you from moving over -- there are massive correctness improvements in 1.2.x, and as Poetry adopts a loose versioning-with-deprecations style ala Python in general, putting off moving to new versions for too long is liable to be painful later. We'd much rather make sure that people can stay on the current stable version and fix any blockers they encounter.

  10. github-actions commented on Mar 1, 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.

  11. locked as resolved and limited conversation to collaborators on Mar 1, 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

    area/sourcesReleated to package sources/indexes/repositorieskind/bugSomething isn't working as expectedstatus/needs-reproductionIssue needs a minimal reproduction to be confirmed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions