Skip to content

Commit

Permalink
Merge pull request #202 from astraw/fix-user-agent-import
Browse files Browse the repository at this point in the history
Fix cyclic import dependency by moving USER_AGENT to pypi_simple client.
  • Loading branch information
nuclearsandwich authored Jul 9, 2024
2 parents c68317e + 8519a07 commit 1601cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions stdeb/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
import requests
import hashlib
import warnings
import stdeb
from stdeb.pypi_simple import PyPIClient
from stdeb.pypi_simple import PyPIClient, USER_AGENT

myprint = print

USER_AGENT = 'pypi-install/%s ( https://github.com/astraw/stdeb )' % \
stdeb.__version__


def find_tar_gz(package_name, pypi_url='https://pypi.org',
verbose=0, release=None):
Expand Down
5 changes: 4 additions & 1 deletion stdeb/pypi_simple.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import re
import requests
from stdeb.downloader import USER_AGENT
import stdeb

USER_AGENT = 'pypi-install/%s ( https://github.com/astraw/stdeb )' % \
stdeb.__version__


def normalize_package_name(package_name):
Expand Down

0 comments on commit 1601cb9

Please sign in to comment.