Precautions when using six with Python 2.5

Precautions when using six in a python script that runs under the environment where Python 2.5 runs.

What is six

See the official documentation for what six are. Six: Python 2 and 3 Compatibility Library — six 1.10.0 documentation

Six provides simple utilities for wrapping over differences between Python 2 and Python 3. It is intended to support codebases that work on both Python 2 and 3 without modification. six consists of only one Python file, so it is painless to copy into a project.

Official repository (gutworth / six — Bitbucket) At the moment (2015/12), the latest version is 1.10.0

The Japanese translation of the official page is currently up to 1.9.0. Six: Python 2 and 3 compatibility library — six 1.9.0 documentation

Conclusion

If there is a possibility that it will work in Python 2.5 environment, use six 1.8.0.

In detail

Python 2.5 is no longer supported in 1.10.0.

six 1.10.0 : Python Package Index

Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)

Python 2.5 is supported in 1.9.0.

six 1.9.0 : Python Package Index

Six supports every Python version since 2.5. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.)

However, I'm using operator.methodcaller, which doesn't work in Python 2.5. Looking at the source diffs, it has been modified to use operator.methodcaller in 1.8.0-> 1.9.0.

So, if you also support Python 2.5, use six 1.8.0.

Recommended Posts

Precautions when using six with Python 2.5
Precautions when using pit in Python
Precautions when using phantomjs from python
When using MeCab with virtualenv python
Precautions when solving DP problems with Python
Precautions when using Chainer
Precautions when using google-cloud library with GAE / py
[Web development with Python] Precautions when saving cookies
What are you using when testing with Python?
When using optparse with iPython
[S3] CRUD with S3 using Python [Python]
[Python] Using OpenCV with Python (Basic)
Error when playing with python
Using OpenCV with Python @Mac
Send using Python with Gmail
Precautions when dealing with ROS MultiArray types in Python
Troublesome story when using Python3 with VScode on ubuntu
Complement python with emacs using company-jedi
[Python] Using OpenCV with Python (Image Filtering)
Using Rstan from Python with PypeR
[Python] Using OpenCV with Python (Image transformation)
Precautions when installing tensorflow with anaconda
[Python] Using OpenCV with Python (Edge Detection)
Precautions when using codecs and pandas
Precautions when using the urllib.parse.quote function
[Python] Be careful when using print
Precautions when creating a Python generator
Notes on using rstrip with python.
Things to keep in mind when using Python with AtCoder
Things to keep in mind when using cgi with python.
When matplotlib doesn't work with python2.7
[VS Code] ~ Tips when using python ~
When using regular expressions in Python
[Python] Format when to_csv with pandas
[Python] Error and solution memo when using venv with pyenv + anaconda
[AWS] Using ini files with Lambda [Python]
Periodic execution processing when using tkinter [Python3]
Try mathematical formulas using Σ with python
Precautions when pickling a function in python
Using Python and MeCab with Azure Databricks
Note when creating an environment with python
Socket communication using socketserver with python now
Favicon placement (when using Python, Flask, Heroku)
[python, multiprocessing] Behavior for exceptions when using multiprocessing
Precautions when using for statements in pandas
Try using Python with Google Cloud Functions
Check stock prices with slackbot using python
Working with OpenStack using the Python SDK
Tips for using python + caffe with TSUBAME
I'm using tox and Python 3.3 with Travis-CI
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
How to deal with OAuth2 error when using Google APIs from Python
Twilio with Python
Integrate with Python
Start using Python
Play with 2016-Python
AES256 with python