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

Deprecation warning for Python 2 #2129

Merged
merged 12 commits into from Oct 4, 2015
Merged

Deprecation warning for Python 2 #2129

merged 12 commits into from Oct 4, 2015

Conversation

@ralsina
Copy link
Member

ralsina commented Oct 1, 2015

No description provided.

PY2_WARNING = """Nikola is going to deprecate python 2 support in 2016. You already have python 3
available in your system. Why not switch?
Please check https://getnikola.com/blog/env-survey-results-and-the-future-of-python-27.html for details."""

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Oct 1, 2015

Member

We could use a shorter link.

Also, Python* should be uppercase

ralsina added 3 commits Oct 1, 2015
@@ -64,6 +64,25 @@
# DO NOT USE unless you know what you are doing!
_RETURN_DOITNIKOLA = False

PY2_WARNING = """Nikola is going to deprecate Python 2 support in 2016. You already have Python 3

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Oct 1, 2015

Member

You most likely have Python 3 available on your system already! (And if you don’t, you can install it really easily.)

This comment has been minimized.

Copy link
@ralsina

ralsina Oct 1, 2015

Author Member

I actually intended to check if it's available, and use a different message if it's not.

ralsina added 3 commits Oct 1, 2015
@Kwpolska

This comment has been minimized.

Copy link
Member

Kwpolska commented on nikola/plugins/task/py3_switch.py in 3125256 Oct 3, 2015

That would be too easy. There is no python3.exe on Windows.

But you can cheat: the py.exe launcher is included since Python 3.3, and it’s also guaranteed to be in %PATH%. Which is exactly what we need.

@Kwpolska

This comment has been minimized.

Copy link
Member

Kwpolska commented on nikola/plugins/task/py3_switch.py in 3125256 Oct 3, 2015

the message should appear in both cases IMO

This comment has been minimized.

Copy link
Member Author

ralsina replied Oct 3, 2015

Well, I would rather not do that, which may feel a bit aggressive, when the user doesn't have py3 installed and may be in trouble upgrading.

ralsina added 5 commits Oct 3, 2015
@ralsina ralsina changed the title WIP Deprecation warning for Python 2 Deprecation warning for Python 2 Oct 3, 2015
PY2_WARNING = """Nikola is going to deprecate Python 2 support in 2016. You already have Python 3
available in your system. Why not switch?
Please check http://bit.ly/1FKEsiX for details.

This comment has been minimized.

Copy link
@Carreau

Carreau Oct 3, 2015

Contributor

I would avoid shortened URL here. People will copy-past anyway, and you never know if bit.ly will keep it infinitely.
If you keep it you can probably make a custom name like bit.ly/drop-Python-2 which is easier to remember.

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Oct 4, 2015

Member

Worst case scenario, we could create a redirect on getnikola.com/py2 (probably via nginx config, not conf.REDIRECTIONS) and use that.

return
if has_python_3():
LOGGER.warn(random.choice(PY2_BARBS))
LOGGER.warn(PY2_WARNING)

This comment has been minimized.

Copy link
@Carreau

Carreau Oct 3, 2015

Contributor

Want to sleep N second with N = f(timedelta since python 3 release) ?

ralsina added a commit that referenced this pull request Oct 4, 2015
Deprecation warning for Python 2
@ralsina ralsina merged commit 4c7367a into master Oct 4, 2015
3 checks passed
3 checks passed
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ralsina ralsina deleted the fight-the-future branch Oct 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.