Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Start working on the practicalities section.
  • Loading branch information
Carreau committed Nov 21, 2016
commit 2cf782ec1a95bc2934138e20ab5193982a46d620
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_site/
.DS_Store
.DS_Store
*.swo
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ colors:

collections:
- sections
- practicalities

42 changes: 42 additions & 0 deletions _practicalities/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
---
# As a user

If you are already a Python 3 user, you should not encounter a lot of
disruption. Please check that the libraries you use follow best practises not
to break for other users.

Make sure you have Pip >= 9.0

If you are using a custom local package index, for example if you are working
at a company, make sure it implement correctly pep-512 and let pip knows about
Copy link
Contributor

Choose a reason for hiding this comment

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

PEP 512 is the GitHub migration, so I think you may mean another PEP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops, sorry. I'll fix that to 503 :-)

the `python_requires` field.




# Preparing your library

Things to speak about:

- Be on recent enough setuptools
- Add a warning at _runtime_ early on master (before switching to Python 3
only)
- Add an error early at import at runtime with a clear error message, leave the
early import compatible Python 2 for user to not be welcomed with SyntaxError



# Mitigations

- Leave `setup.py` python 2 compatible and fail early. If you detect Python 2
raise a clear error message and ask user to make sure they have pip >9.0 (or
migrate to Python 3). You can (try to) conditionally import pip and check for
its version but this might not be the same pip.

- If you control dependant packages, Make sure to include conditional
dependencies depending on the version of Python.




33 changes: 33 additions & 0 deletions practicalities/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
---
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.title }}</title>
<meta name="keywords" content="{{ site.keywords }}">
<meta name="description" content="{{ site.description }}">
<link rel="stylesheet" href="../combo.css">
<link href='https://fonts.googleapis.com/css?family=Raleway:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.16.1/vis.min.js"></script>
{% if site.favicon %}<link rel="shortcut icon" href="{{ site.favicon }}" type="image/x-icon">{% endif %}
{% if site.touch_icon %}<link rel="apple-touch-icon" href="{{ site.touch_icon }}">{% endif %}
</head>
<body>
<div id="main">


{% for page in site.practicalities %}
<div class="section">

<div class="container {{ page.style }}">
{{ page.content }}
</div>
</div>
{% endfor %}
</div>
</body>