Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Added

Changed
~~~~~~~~~
* Updated deprecation warning for python 2 pack installs, following python 2 support removal. #5099
Contributed by @amanda11

* Improve the st2-self-check script to echo to stderr and exit if it isn't run with a
ST2_AUTH_TOKEN or ST2_API_KEY environment variable. (improvement) #5068

Expand Down
11 changes: 8 additions & 3 deletions st2common/st2common/util/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@
]

# Common format for python 2.7 warning
PACK_PYTHON2_WARNING = "DEPRECATION WARNING: Pack %s only supports Python 2.x. " \
"Python 2 support will be dropped in future releases. " \
"Please consider updating your packs to work with Python 3.x"
if six.PY2:
PACK_PYTHON2_WARNING = "DEPRECATION WARNING: Pack %s only supports Python 2.x. " \
"Python 2 support will be dropped in future releases. " \
"Please consider updating your packs to work with Python 3.x"
else:
PACK_PYTHON2_WARNING = "DEPRECATION WARNING: Pack %s only supports Python 2.x. " \
"Python 2 support has been removed since st2 v3.4.0. " \
"Please update your packs to work with Python 3.x"


def get_pack_ref_from_metadata(metadata, pack_directory_name=None):
Expand Down