Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for upcoming Python default change #1681

Merged
merged 2 commits into from
Apr 9, 2019

Conversation

BanzaiMan
Copy link
Contributor

@BanzaiMan BanzaiMan commented Apr 8, 2019

To correspond to #1678.

DEPRECATIONS = [
{
name: 'Python',
current_default: DEFAULTS[:phython],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phython

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈

Copy link
Contributor

@cotsog cotsog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick one, where's the code using the DEPRECATIONS array?

lib/travis/build/script/python.rb Outdated Show resolved Hide resolved
Co-Authored-By: BanzaiMan <asari.ruby@gmail.com>
@BanzaiMan
Copy link
Contributor Author

Quick one, where's the code using the DEPRECATIONS array?

It's here:

def check_deprecation
return unless self.class.const_defined?("DEPRECATIONS")
self.class.const_get("DEPRECATIONS").each do |cfg|
if data.language_default_p && DateTime.now < Date.parse(cfg[:cutoff_date])
sh.echo "Using the default #{cfg[:name] || self.class.name} version #{cfg[:current_default]}. " \
"Starting on #{cfg[:cutoff_date]} the default will change to #{cfg[:new_default]}. " \
"If you wish to keep using this version beyond this date, " \
"please explicitly set the #{cfg[:name]} value in configuration.",
ansi: :yellow
end
end
end

@cotsog
Copy link
Contributor

cotsog commented Apr 9, 2019

Thanks! 🐑:it:

@BanzaiMan BanzaiMan merged commit 21b3b95 into master Apr 9, 2019
@BanzaiMan BanzaiMan deleted the ha-python-default-update branch April 9, 2019 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants