Skip to content

Commit

Permalink
Remove obsolete code.
Browse files Browse the repository at this point in the history
  • Loading branch information
fschulze committed Aug 31, 2023
1 parent 09f6747 commit cad5017
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
6 changes: 0 additions & 6 deletions common/devpi_common/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ def parentbasename(self):
def fragment(self):
return self._parsed.fragment

@cached_property
def eggfragment(self):
frag = self.fragment
if frag.startswith("egg="):
return frag[4:]

@cached_property
def md5(self):
val = self.fragment
Expand Down
7 changes: 0 additions & 7 deletions common/testing/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ def test_hashing(self):
assert hash(URL("http://a?foo=bar")) == hash(URL("http://a?foo=bar"))
assert URL("http://a?foo=bar") == URL("http://a?foo=bar")

def test_eggfragment(self):
url = URL("http://a/py.tar.gz#egg=py-dev")
assert url.eggfragment == "py-dev"
url = URL("http://a/py.tar.gz?foo=bar#egg=py-dev")
assert url.eggfragment == "py-dev"
assert url.query == "foo=bar"

def test_md5(self):
url = URL("http://a/py.tar.gz#md5=123123")
assert url.md5 == "123123"
Expand Down
4 changes: 0 additions & 4 deletions server/devpi_server/filestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ class FileEntry(object):
__slots__ = ('_meta', '_storepath', 'basename', 'key', 'readonly', 'relpath')
BadGateway = BadGateway
hash_spec = metaprop("hash_spec") # e.g. "md5=120938012"
# BBB keep this until devpi-server 6.0.0,
# it was required for devpi-web <= 3.5.1
# it was used for the old scraping/crawling code
eggfragment = metaprop("eggfragment")
last_modified = metaprop("last_modified")
url = metaprop("url")
project = metaprop("project")
Expand Down

0 comments on commit cad5017

Please sign in to comment.