Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv 0.6.7 regression "Received some unexpected JSON" ... "expected a borrowed string" when installing "pyenchant==3.3.0rc1" #12260

Closed
adamtheturtle opened this issue Mar 18, 2025 · 5 comments · Fixed by #12278
Assignees
Labels
bug Something isn't working

Comments

@adamtheturtle
Copy link
Contributor

Summary

Command:

uv pip install --reinstall "pyenchant==3.3.0rc1"

With uv 0.6.6 I can install "pyenchant==3.3.0rc1"

With uv 0.6.7 I get:

⠙ Resolving dependencies...                                                                                                                                                 error: Received some unexpected JSON from https://pypi.org/simple/pyenchant/
  Caused by: invalid type: string ">=\"3.5\"", expected a borrowed string at line 1 column 50181

Platform

macOS 15.3, and GitHub Actions Ubuntu

Version

0.6.7

Python version

Python 3.11 / 3.12 at least

@adamtheturtle adamtheturtle added the bug Something isn't working label Mar 18, 2025
@shauneccles
Copy link

(test-venv) PS C:\Users\shaun\test-venv> uv -vv pip install --reinstall "pyenchant==3.3.0rc1"
DEBUG uv 0.6.7 (029b9e1fc 2025-03-17)
DEBUG Searching for default Python interpreter in virtual environments
TRACE Querying interpreter executable at C:\Users\shaun\test-venv\.venv\Scripts\python.exe
DEBUG Found `cpython-3.13.1-windows-x86_64-none` at `C:\Users\shaun\test-venv\.venv\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.13.1 environment at: .venv
TRACE Checking lock for `.venv` at `.venv\.lock`
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.13.1
DEBUG Solving with target Python version: >=3.13.1
TRACE Assigned packages:
TRACE Chose package for decision: root. remaining choices:
DEBUG Adding direct dependency: pyenchant>=3.3.0rc1, <3.3.0rc1+
TRACE Assigned packages: root==0a0.dev0
TRACE Chose package for decision: pyenchant. remaining choices:
TRACE Fetching metadata for pyenchant from https://pypi.org/simple/pyenchant/
TRACE Checking lock for `C:\Users\shaun\AppData\Local\uv\cache\simple-v15\pypi\pyenchant.lock` at `C:\Users\shaun\AppData\Local\uv\cache\simple-v15\pypi\pyenchant.lock`
DEBUG Acquired lock for `C:\Users\shaun\AppData\Local\uv\cache\simple-v15\pypi\pyenchant.lock`
TRACE No cache entry exists for C:\Users\shaun\AppData\Local\uv\cache\simple-v15\pypi\pyenchant.rkyv
DEBUG No cache entry for: https://pypi.org/simple/pyenchant/
TRACE Sending fresh GET request for https://pypi.org/simple/pyenchant/
TRACE Handling request for https://pypi.org/simple/pyenchant/
TRACE Request for https://pypi.org/simple/pyenchant/ is unauthenticated, checking cache
TRACE No credentials in cache for URL https://pypi.org/simple/pyenchant/
TRACE Attempting unauthenticated request for https://pypi.org/simple/pyenchant/
TRACE Cached request https://pypi.org/simple/pyenchant/ is storable because its response has a 'public' cache-control directive
TRACE Considering retry of error: Error { kind: BadJson { source: Error("invalid type: string \">=\\\"3.5\\\"\", expected a borrowed string", line: 1, column: 50181), url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("pypi.org")), port: None, path: "/simple/pyenchant/", query: None, fragment: None } } }
TRACE Cannot retry error: not an IO error
DEBUG Released lock at `C:\Users\shaun\AppData\Local\uv\cache\simple-v15\pypi\pyenchant.lock`
DEBUG Released lock at `C:\Users\shaun\test-venv\.venv\.lock`
error: Received some unexpected JSON from https://pypi.org/simple/pyenchant/
  Caused by: invalid type: string ">=\"3.5\"", expected a borrowed string at line 1 column 50181
(test-venv) PS C:\Users\shaun\test-venv>

@alberto-gomezcasado-AP
Copy link

alberto-gomezcasado-AP commented Mar 18, 2025

I am having the same problem installing tbump, using uv-0.6.7-py3-none-win_amd64.whl

nox > Running session bump
nox > Creating virtual environment (uv) using python.exe in .nox\bump
nox > git describe --tags --abbrev=0
nox > uv pip install tbump
nox > Command uv pip install tbump failed with exit code 2:
Using Python 3.9.4 environment at: .nox\bump
error: Received some unexpected JSON from https://pypi.org/simple/tbump/
  Caused by: invalid type: string ">=\"3.5\"", expected a borrowed string at line 1 column 19557
nox > Session bump failed.

@charliermarsh
Copy link
Member

Apologies, I’ll fix it this morning.

@alex
Copy link
Contributor

alex commented Mar 18, 2025

Thanks Charlie!

@charliermarsh
Copy link
Member

Fixed in #12278.

charliermarsh added a commit that referenced this issue Mar 18, 2025
## Summary

I suspect this only affects packages with quotes in the requires-python,
which is typically an error but one that we correct for in
`LenientVersionSpecifiers`.

Closes #12260.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants