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
f3f71ea2
Unverified
Commit
f3f71ea2
authored
May 24, 2023
by
Riccardo Albertazzi
Committed by
GitHub
May 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: revert #7916 to fix caching issue resulting in missing dependencies (#7995)
parent
92179755
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
28 deletions
+0
-28
src/poetry/repositories/http_repository.py
+0
-4
src/poetry/utils/authenticator.py
+0
-8
tests/utils/test_authenticator.py
+0
-16
No files found.
src/poetry/repositories/http_repository.py
View file @
f3f71ea2
...
@@ -76,10 +76,6 @@ class HTTPRepository(CachedRepository):
...
@@ -76,10 +76,6 @@ class HTTPRepository(CachedRepository):
@contextmanager
@contextmanager
def
_cached_or_downloaded_file
(
self
,
link
:
Link
)
->
Iterator
[
Path
]:
def
_cached_or_downloaded_file
(
self
,
link
:
Link
)
->
Iterator
[
Path
]:
filepath
=
self
.
_authenticator
.
get_cached_file_for_url
(
link
.
url
)
if
filepath
:
yield
filepath
else
:
self
.
_log
(
f
"Downloading: {link.url}"
,
level
=
"debug"
)
self
.
_log
(
f
"Downloading: {link.url}"
,
level
=
"debug"
)
with
temporary_directory
()
as
temp_dir
:
with
temporary_directory
()
as
temp_dir
:
filepath
=
Path
(
temp_dir
)
/
link
.
filename
filepath
=
Path
(
temp_dir
)
/
link
.
filename
...
...
src/poetry/utils/authenticator.py
View file @
f3f71ea2
...
@@ -19,7 +19,6 @@ import requests.exceptions
...
@@ -19,7 +19,6 @@ import requests.exceptions
from
cachecontrol
import
CacheControlAdapter
from
cachecontrol
import
CacheControlAdapter
from
cachecontrol.caches
import
FileCache
from
cachecontrol.caches
import
FileCache
from
cachecontrol.caches.file_cache
import
url_to_file_path
from
filelock
import
FileLock
from
filelock
import
FileLock
from
poetry.config.config
import
Config
from
poetry.config.config
import
Config
...
@@ -464,13 +463,6 @@ class Authenticator:
...
@@ -464,13 +463,6 @@ class Authenticator:
return
selected
.
certs
(
config
=
self
.
_config
)
return
selected
.
certs
(
config
=
self
.
_config
)
return
RepositoryCertificateConfig
()
return
RepositoryCertificateConfig
()
def
get_cached_file_for_url
(
self
,
url
:
str
)
->
Path
|
None
:
if
self
.
_cache_control
is
None
:
return
None
path
=
Path
(
url_to_file_path
(
url
,
self
.
_cache_control
))
return
path
if
path
.
exists
()
else
None
_authenticator
:
Authenticator
|
None
=
None
_authenticator
:
Authenticator
|
None
=
None
...
...
tests/utils/test_authenticator.py
View file @
f3f71ea2
...
@@ -627,22 +627,6 @@ def test_authenticator_git_repositories(
...
@@ -627,22 +627,6 @@ def test_authenticator_git_repositories(
assert
not
three
.
password
assert
not
three
.
password
def
test_authenticator_get_cached_file_for_url__cache_miss
(
config
:
Config
)
->
None
:
authenticator
=
Authenticator
(
config
,
NullIO
())
assert
(
authenticator
.
get_cached_file_for_url
(
"https://foo.bar/cache/miss.whl"
)
is
None
)
def
test_authenticator_get_cached_file_for_url__cache_hit
(
config
:
Config
)
->
None
:
authenticator
=
Authenticator
(
config
,
NullIO
())
url
=
"https://foo.bar/files/foo-0.1.0.tar.gz"
authenticator
.
_cache_control
.
set
(
url
,
b
"hello"
)
assert
authenticator
.
get_cached_file_for_url
(
url
)
@pytest.mark.parametrize
(
@pytest.mark.parametrize
(
(
"ca_cert"
,
"client_cert"
,
"result"
),
(
"ca_cert"
,
"client_cert"
,
"result"
),
[
[
...
...
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