Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #649 from carver/drop-multiaddr-git-dependency
Browse files Browse the repository at this point in the history
Drop git dependency for pypi release
  • Loading branch information
carver authored May 21, 2019
2 parents 2e3ddb3 + ce11779 commit df78bdf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion p2p/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,8 @@ def trim_middle(arbitrary_string: str, max_length: int) -> str:
half_len, is_odd = divmod(max_length, 2)
first_half = arbitrary_string[:half_len - 1]
last_half_len = half_len - 2 + is_odd
last_half = arbitrary_string[last_half_len * -1:]
if last_half_len > 0:
last_half = arbitrary_string[last_half_len * -1:]
else:
last_half = ''
return f"{first_half}✂✂✂{last_half}"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
'libp2p': [
"base58>=1.0.3",
# use the forked multiaddr temporarily until the fixing changes are released
"multiaddr @ git+https://[email protected]/mhchia/py-multiaddr@feature/add-unix-proto",
"multiaddr>=0.0.7,<0.1.0",
"protobuf>=3.6.1",
"pymultihash>=0.8.2",
],
Expand Down
1 change: 1 addition & 0 deletions tests/p2p/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
("notcut", 6, "notcut"),
("tobecut", 6, "to✂✂✂t"),
("tobecut", 5, "t✂✂✂t"),
("0000", 3, "✂✂✂"),
("really long thing with a bunch of garbage", 20, "really lo✂✂✂ garbage"),
)
)
Expand Down

0 comments on commit df78bdf

Please sign in to comment.