| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| __init__.py | ||
| _compat.py | ||
| appdirs.py | ||
| authenticator.py | ||
| env.py | ||
| exporter.py | ||
| extras.py | ||
| helpers.py | ||
| password_manager.py | ||
| patterns.py | ||
| pip.py | ||
| setup_reader.py | ||
| shell.py |
Relates to: #2153
When running `poetry update`, during the download phase when `PYTHONWARNINGS="default"` environment variable is set, multiple different sessions trigger resource warnings. This fixes one of them that occurs during the download phase of the package update.
```
/Users/username/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:594: ResourceWarning: unclosed <ssl.SSLSocket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('REDACTED', 59025), raddr=('140.108.3.33', 80)>
```
This line references:
```
593 │ try:
594 │ archive = self._download_archive(operation, link)
595 │ except BaseException:
596 │ cache_directory = self._chef.get_cache_directory_for_link(link)
```
The issue is being caused because the session is being left open when the class is later cleaned up. By adding a destructor method, we can close the session if it exists, preventing this error.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| __init__.py | Loading commit data... | |
| _compat.py | Loading commit data... | |
| appdirs.py | Loading commit data... | |
| authenticator.py | Loading commit data... | |
| env.py | Loading commit data... | |
| exporter.py | Loading commit data... | |
| extras.py | Loading commit data... | |
| helpers.py | Loading commit data... | |
| password_manager.py | Loading commit data... | |
| patterns.py | Loading commit data... | |
| pip.py | Loading commit data... | |
| setup_reader.py | Loading commit data... | |
| shell.py | Loading commit data... |