You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Note I am not a regular user of Github - this was written by ChatGPT but seems to me to describe the issue, I am in the process of upgrading to Linux Mint 22.2 which now uses a newer version of Python)
Environment
Linux Mint 22.2 (based on Ubuntu 24.04)
Python 3.12.7
s3cmd 2.4.0-2 (installed from Mint/Ubuntu repository)
(Note I am not a regular user of Github - this was written by ChatGPT but seems to me to describe the issue, I am in the process of upgrading to Linux Mint 22.2 which now uses a newer version of Python)
Environment
Observed behavior
Running
s3cmdproduces multiple warnings:/usr/local/bin/s3cmd:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import('pkg_resources').run_script('s3cmd==2.4.0', 's3cmd')
/usr/local/lib/python3.12/dist-packages/s3cmd-2.4.0-py3.12.egg/S3/S3Uri.py:122: SyntaxWarning: invalid escape sequence '.'
/usr/local/lib/python3.12/dist-packages/s3cmd-2.4.0-py3.12.egg/S3/S3Uri.py:170: SyntaxWarning: invalid escape sequence '\w'
/usr/local/lib/python3.12/dist-packages/s3cmd-2.4.0-py3.12.egg/S3/FileLists.py:525: SyntaxWarning: invalid escape sequence '*'
Expected behavior
No warnings should be emitted during normal usage.
Notes
pkg_resourceswarning comes from the entry point script usingpkg_resources.run_script().SyntaxWarnings are due to regex strings written as"\\.","\\w","\\*"instead of raw strings (r"\.", etc.).Suggested fix
pkg_resources.run_script()with modern setuptools entry points or direct imports.Related reports
Impact
Functionality is not broken, but the warnings are noisy and may confuse users.