Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 2.58 KB

upgrading.rst

File metadata and controls

67 lines (49 loc) · 2.58 KB

Upgrading notes

Beyond the high-level notes you can find in NEWS.rst, you’ll find some more specific upgrading advice in this document.

Python 2 removal (0.5.0)

Since the merge of 2, Python 2 is no longer supported. If you’re using in a project that requires Python 2 support then two paths are available to you:

  • Pin your dependency, for example you can use jnrbase<0.5.0 in pip requirement files
  • Upgrade your project to Python 3

If you choose to upgrade your project, plenty of documents exist to help. Start with the official porting guide <python:pyporting-howto>, and end with a thumb through the extensive ”what’s new” documents <python:whatsnew-index> from the Python documentation.

Note

Feel free to ask me for advice or help too. I have enjoyed porting projects to Python 3 over the past ten years1 , and this offer is open to people who are not using too!

Switching to ConfigParser (0.6.0)

Since the merge of 3, ~jnrbase.config.read_configs has been using ~configparser.ConfigParser. Although configobj has always been awesome, it is — unfortunately — no longer maintained.

The biggest changes you’ll probably notice are that the getters are named differently. For example, ConfigObj.as_bool becomes ~configparser.ConfigParser.getboolean. For the list of default getters see the configparser.ConfigParser documentation.

A significant improvement that has been made is adding the time parsers from as custom getters for the ~configparser.ConfigParser objects returned by read_configs. See the ~jnrbase.config.read_configs documentation for the list of supported functions.

httplib2 cert handling removal (1.2.0)

It has become untenable to support httplib2 certificate setup, and I can no no longer recommend httplib2. There are various alternatives, all with equally odd support for working system certificates. It is unclear what upgrade path one should recommend for users who need stable and repeatable certificate handling.

See 30 for more information.

Footnotes


  1. My earliest public commit for Python 3 support I can find is in pyisbn