Skip to content

Commit

Permalink
Merge pull request #341 from sarugaku/drop-odmdict
Browse files Browse the repository at this point in the history
Drop ordered mutlidict
  • Loading branch information
oz123 authored Aug 29, 2022
2 parents fe2e4c4 + ffec4f1 commit fa7f572
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ known_third_party = [
"environ",
"hypothesis",
"invoke",
"orderedmultidict",
"packaging",
"parver",
"pep517",
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ install_requires =
attrs>=19.2
cached_property
distlib>=0.2.8
orderedmultidict
packaging>=19.0
pep517>=0.5.0
pip>=22.2
Expand All @@ -52,7 +51,7 @@ install_requires =
requests
setuptools>=40.8
tomlkit>=0.5.3
vistir>=0.3.1
vistir==0.6.1
pyparsing<3.0.0

[options.extras_require]
Expand Down
9 changes: 4 additions & 5 deletions src/requirementslib/models/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from urllib.parse import unquote_plus

import attr
from orderedmultidict import omdict
from pip._internal.models.link import Link
from pip._internal.req.constructors import _strip_extras
from urllib3.util import parse_url as urllib3_parse
Expand Down Expand Up @@ -87,8 +86,8 @@ class URI(object):
username = attr.ib(default="", type=str)
#: Password parsed from `user:password@hostname`
password = attr.ib(default="", type=str, repr=False)
#: An orderedmultidict representing query fragments
query_dict = attr.ib(factory=omdict, type=omdict)
#: A dictionary representing query fragments
query_dict = attr.ib(factory=dict, type=dict)
#: The name of the specified package in case it is a VCS URI with an egg fragment
name = attr.ib(default="", type=str)
#: Any extras requested from the requirement
Expand All @@ -105,7 +104,7 @@ class URI(object):
def _parse_query(self):
# type: () -> URI
query = self.query if self.query is not None else ""
query_dict = omdict()
query_dict = dict()
queries = query.split("&")
query_items = []
subdirectory = self.subdirectory if self.subdirectory else None
Expand All @@ -116,7 +115,7 @@ def _parse_query(self):
subdirectory = val
else:
query_items.append((key, val))
query_dict.load(query_items)
query_dict.update(query_items)
return attr.evolve(
self, query_dict=query_dict, subdirectory=subdirectory, query=query
)
Expand Down

0 comments on commit fa7f572

Please sign in to comment.