Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
c33e23b6
Unverified
Commit
c33e23b6
authored
Nov 12, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reading bz2 source distribution files
parent
71e89c12
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
0 deletions
+123
-0
CHANGELOG.md
+1
-0
poetry/repositories/pypi_repository.py
+3
-0
tests/repositories/fixtures/pypi.org/dists/Twisted-18.9.0.tar.bz2
+0
-0
tests/repositories/fixtures/pypi.org/json/twisted.json
+82
-0
tests/repositories/test_pypi_repository.py
+37
-0
No files found.
CHANGELOG.md
View file @
c33e23b6
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
-
Fixed permission errors when adding/removing git dependencies on Windows.
-
Fixed permission errors when adding/removing git dependencies on Windows.
-
Fixed
`Pool`
not raising an exception when no package could be found.
-
Fixed
`Pool`
not raising an exception when no package could be found.
-
Fixed reading
`bz2`
source distribution.
## [0.12.7] - 2018-11-08
## [0.12.7] - 2018-11-08
...
...
poetry/repositories/pypi_repository.py
View file @
c33e23b6
...
@@ -462,6 +462,9 @@ class PyPiRepository(Repository):
...
@@ -462,6 +462,9 @@ class PyPiRepository(Repository):
else
:
else
:
if
suffix
==
".bz2"
:
if
suffix
==
".bz2"
:
gz
=
BZ2File
(
str
(
filepath
))
gz
=
BZ2File
(
str
(
filepath
))
suffixes
=
filepath
.
suffixes
if
len
(
suffixes
)
>
1
and
suffixes
[
-
2
]
==
".tar"
:
suffix
=
".tar.bz2"
else
:
else
:
gz
=
GzipFile
(
str
(
filepath
))
gz
=
GzipFile
(
str
(
filepath
))
suffix
=
".tar.gz"
suffix
=
".tar.gz"
...
...
tests/repositories/fixtures/pypi.org/dists/Twisted-18.9.0.tar.bz2
0 → 100644
View file @
c33e23b6
File added
tests/repositories/fixtures/pypi.org/json/twisted.json
0 → 100644
View file @
c33e23b6
{
"info"
:
{
"author"
:
"Twisted Matrix Laboratories"
,
"author_email"
:
"twisted-python@twistedmatrix.com"
,
"bugtrack_url"
:
null
,
"classifiers"
:
[
"Programming Language :: Python :: 2.7"
,
"Programming Language :: Python :: 3"
,
"Programming Language :: Python :: 3.4"
,
"Programming Language :: Python :: 3.5"
,
"Programming Language :: Python :: 3.6"
,
"Programming Language :: Python :: 3.7"
],
"description"
:
"description"
,
"description_content_type"
:
""
,
"docs_url"
:
null
,
"download_url"
:
""
,
"downloads"
:
{
"last_day"
:
-1
,
"last_month"
:
-1
,
"last_week"
:
-1
},
"home_page"
:
"http://twistedmatrix.com/"
,
"keywords"
:
""
,
"license"
:
"MIT"
,
"maintainer"
:
"Glyph Lefkowitz"
,
"maintainer_email"
:
"glyph@twistedmatrix.com"
,
"name"
:
"Twisted"
,
"package_url"
:
"https://pypi.org/project/Twisted/"
,
"platform"
:
""
,
"project_url"
:
"https://pypi.org/project/Twisted/"
,
"project_urls"
:
{
"Homepage"
:
"http://twistedmatrix.com/"
},
"release_url"
:
"https://pypi.org/project/Twisted/18.9.0/"
,
"requires_dist"
:
null
,
"requires_python"
:
""
,
"summary"
:
"An asynchronous networking framework written in Python"
,
"version"
:
"18.9.0"
},
"last_serial"
:
4376865
,
"releases"
:
{
"18.9.0"
:
[
{
"comment_text"
:
""
,
"digests"
:
{
"md5"
:
"20fe2ec156e6e45b0b0d2ff06d9e828f"
,
"sha256"
:
"294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395"
},
"downloads"
:
-1
,
"filename"
:
"Twisted-18.9.0.tar.bz2"
,
"has_sig"
:
false
,
"md5_digest"
:
"20fe2ec156e6e45b0b0d2ff06d9e828f"
,
"packagetype"
:
"sdist"
,
"python_version"
:
"source"
,
"requires_python"
:
null
,
"size"
:
3088398
,
"upload_time"
:
"2018-10-15T09:11:22"
,
"url"
:
"https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2"
}
]
},
"urls"
:
[
{
"comment_text"
:
""
,
"digests"
:
{
"md5"
:
"20fe2ec156e6e45b0b0d2ff06d9e828f"
,
"sha256"
:
"294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395"
},
"downloads"
:
-1
,
"filename"
:
"Twisted-18.9.0.tar.bz2"
,
"has_sig"
:
false
,
"md5_digest"
:
"20fe2ec156e6e45b0b0d2ff06d9e828f"
,
"packagetype"
:
"sdist"
,
"python_version"
:
"source"
,
"requires_python"
:
null
,
"size"
:
3088398
,
"upload_time"
:
"2018-10-15T09:11:22"
,
"url"
:
"https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2"
}
]
}
tests/repositories/test_pypi_repository.py
View file @
c33e23b6
...
@@ -129,3 +129,40 @@ def test_fallback_can_read_setup_to_get_dependencies():
...
@@ -129,3 +129,40 @@ def test_fallback_can_read_setup_to_get_dependencies():
"postgresql_psycopg2cffi"
:
[
Dependency
(
"psycopg2cffi"
,
"*"
)],
"postgresql_psycopg2cffi"
:
[
Dependency
(
"psycopg2cffi"
,
"*"
)],
"pymysql"
:
[
Dependency
(
"pymysql"
,
"*"
)],
"pymysql"
:
[
Dependency
(
"pymysql"
,
"*"
)],
}
}
def
test_pypi_repository_supports_reading_bz2_files
():
repo
=
MockRepository
(
fallback
=
True
)
package
=
repo
.
package
(
"twisted"
,
"18.9.0"
)
assert
package
.
name
==
"twisted"
assert
sorted
(
package
.
requires
,
key
=
lambda
r
:
r
.
name
)
==
[
Dependency
(
"attrs"
,
">=17.4.0"
),
Dependency
(
"Automat"
,
">=0.3.0"
),
Dependency
(
"constantly"
,
">=15.1"
),
Dependency
(
"hyperlink"
,
">=17.1.1"
),
Dependency
(
"incremental"
,
">=16.10.1"
),
Dependency
(
"PyHamcrest"
,
">=1.9.0"
),
Dependency
(
"zope.interface"
,
">=4.4.2"
),
]
expected_extras
=
{
"all_non_platform"
:
[
Dependency
(
"appdirs"
,
">=1.4.0"
),
Dependency
(
"cryptography"
,
">=1.5"
),
Dependency
(
"h2"
,
">=3.0,<4.0"
),
Dependency
(
"idna"
,
">=0.6,!=2.3"
),
Dependency
(
"priority"
,
">=1.1.0,<2.0"
),
Dependency
(
"pyasn1"
,
"*"
),
Dependency
(
"pyopenssl"
,
">=16.0.0"
),
Dependency
(
"pyserial"
,
">=3.0"
),
Dependency
(
"service_identity"
,
"*"
),
Dependency
(
"soappy"
,
"*"
),
]
}
for
name
,
deps
in
expected_extras
.
items
():
assert
expected_extras
[
name
]
==
sorted
(
package
.
extras
[
name
],
key
=
lambda
r
:
r
.
name
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment