encode / httpx

A next generation HTTP client for Python. 🦋
https://www.python-httpx.org/
BSD 3-Clause "New" or "Revised" License
13.28k stars 844 forks source link

Bug in the 0.7.0 packaging #233

Closed pablogamboa closed 5 years ago

pablogamboa commented 5 years ago

I've tried to upgrade to 0.7.0 and it exploded with a

$ poetry update
Updating dependencies
Resolving dependencies... (1.0s)

Package operations: 0 installs, 1 update, 0 removals

  - Updating httpx (0.6.8 -> 0.7.0)

[EnvCommandError]
Command ['/Users/pablo/Library/Caches/pypoetry/virtualenvs/drop-eventsng-1aNj3rOl-py3.7/bin/python', '-m', 'pip', 'install', '--no-deps', '-U', 'httpx==0.7.0'] errored with the following return code 1, and output:
Collecting httpx==0.7.0
  Using cached https://files.pythonhosted.org/packages/12/b3/fdd6e528a3385e2149ad42cc4e9b54e326d532e3e79a86e7cfdaea45723e/httpx-0.7.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /Users/pablo/Library/Caches/pypoetry/virtualenvs/drop-eventsng-1aNj3rOl-py3.7/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x4/txc7_0pn6zlfb30cs_0sh5mm0000gn/T/pip-install-jq6aut9d/httpx/setup.py'"'"'; __file__='"'"'/private/var/folders/x4/txc7_0pn6zlfb30cs_0sh5mm0000gn/T/pip-install-jq6aut9d/httpx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/x4/txc7_0pn6zlfb30cs_0sh5mm0000gn/T/pip-install-jq6aut9d/httpx/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/x4/txc7_0pn6zlfb30cs_0sh5mm0000gn/T/pip-install-jq6aut9d/httpx/setup.py", line 45, in <module>
        long_description=get_long_description(),
      File "/private/var/folders/x4/txc7_0pn6zlfb30cs_0sh5mm0000gn/T/pip-install-jq6aut9d/httpx/setup.py", line 26, in get_long_description
        with open("CHANGELOG.md", encoding="utf8") as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'CHANGELOG.md'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
yeraydiazdiaz commented 5 years ago

I can replicate simply doing pip install httpx:

pip install httpx
Collecting httpx
  Downloading https://files.pythonhosted.org/packages/12/b3/fdd6e528a3385e2149ad42cc4e9b54e326d532e3e79a86e7cfdaea45723e/httpx-0.7.0.tar.gz (41kB)
     |████████████████████████████████| 51kB 1.4MB/s
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/73/4w3335w5157419t63g0ghx4h0000gn/T/pip-install-yw4ftz0n/httpx/setup.py", line 45, in <module>
        long_description=get_long_description(),
      File "/private/var/folders/73/4w3335w5157419t63g0ghx4h0000gn/T/pip-install-yw4ftz0n/httpx/setup.py", line 26, in get_long_description
        with open("CHANGELOG.md", encoding="utf8") as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'CHANGELOG.md'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/73/4w3335w5157419t63g0ghx4h0000gn/T/pip-install-yw4ftz0n/httpx/

I can't see a MANIFEST.in file in our repo, how are we adding these files to the releases?

sethmlarson commented 5 years ago

Yep this is an issue, I'm fixing this up creating a PR now and releasing 0.7.1.

sethmlarson commented 5 years ago

Verified that this works with 0.7.1:

$ python -m pip install --upgrade httpx
Collecting httpx
  Downloading https://files.pythonhosted.org/packages/05/8e/8e371d91bb908df80289121278c3ba7c6c6deb722b22e77ac043772746be/httpx-0.7.1.tar.gz (69kB)
     |████████████████████████████████| 71kB 1.6MB/s 
Requirement already satisfied, skipping upgrade: certifi in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (2019.6.16)
Requirement already satisfied, skipping upgrade: chardet==3.* in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (3.0.4)
Requirement already satisfied, skipping upgrade: h11==0.8.* in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (0.8.1)
Requirement already satisfied, skipping upgrade: h2==3.* in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (3.1.1)
Requirement already satisfied, skipping upgrade: hstspreload in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (2019.8.12)
Requirement already satisfied, skipping upgrade: idna==2.* in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (2.8)
Requirement already satisfied, skipping upgrade: rfc3986==1.* in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from httpx) (1.3.2)
Requirement already satisfied, skipping upgrade: hyperframe<6,>=5.2.0 in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from h2==3.*->httpx) (5.2.0)
Requirement already satisfied, skipping upgrade: hpack<4,>=2.3 in /home/sethmlarson/Desktop/http3/venv/lib/python3.8/site-packages (from h2==3.*->httpx) (3.0.0)
Installing collected packages: httpx
  Running setup.py install for httpx ... done
Successfully installed httpx-0.7.1
yeraydiazdiaz commented 5 years ago

Awesome, thanks for the amazing response time ⚡️ 😄

sethmlarson commented 5 years ago

Just so happened to be awake at 5am lol went back to bed after :)