Skip to content

Commit

Permalink
Set minimum python version to 3.6 and test on python 3.8 (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinner-lyft committed Sep 9, 2020
1 parent e374363 commit 5d58fc9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
@@ -1,6 +1,7 @@
language: python

python:
- "3.8"
- "3.7"
- "3.6"
- "pypy3"
Expand All @@ -21,7 +22,7 @@ before_script:

script:
- pytest --cov-report term-missing --cov=pynamodb tests
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then mypy .; fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then mypy .; fi
- sphinx-build -W docs /tmp/docs-build

after_success:
Expand All @@ -36,4 +37,4 @@ deploy:
distributions: "sdist bdist_wheel"
on:
tags: true
condition: $TRAVIS_PYTHON_VERSION = 3.7
condition: $TRAVIS_PYTHON_VERSION = 3.8
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -227,7 +227,7 @@ Want to backup and restore a table? No problem.
Features
========

* Python >= 3.5 support
* Python >= 3.6 support
* An ORM-like interface with query and scan filters
* Compatible with DynamoDB Local
* Supports the entire DynamoDB API
Expand Down
5 changes: 2 additions & 3 deletions docs/tutorial.rst
Expand Up @@ -2,8 +2,7 @@ Basic Tutorial
==============

PynamoDB is attempt to be a Pythonic interface to DynamoDB that supports all of DynamoDB's
powerful features in *both* Python 3, and Python 2. This includes support for unicode and
binary attributes.
powerful features. This includes support for unicode and binary attributes.

But why stop there? PynamoDB also supports:

Expand Down Expand Up @@ -216,7 +215,7 @@ PynamoDB comes with several built in attribute types for convenience, which incl
* :py:class:`JSONAttribute <pynamodb.attributes.JSONAttribute>`
* :py:class:`MapAttribute <pynamodb.attributes.MapAttribute>`

All of these built in attributes handle serializing and deserializng themselves, in both Python 2 and Python 3.
All of these built in attributes handle serializing and deserializng themselves.

Creating the table
------------------
Expand Down
1 change: 0 additions & 1 deletion examples/url_shortener/README.rst
Expand Up @@ -3,7 +3,6 @@ A very short URL shortener
==========================

This is a very small implementation of a `URL shortener <http://en.wikipedia.org/wiki/URL_shortening>`_ powered by Flask and PynamoDB.
This example works with both Python 2 and Python 3.

Try it for yourself in three easy steps, assuming you have `access to AWS <https://pynamodb.readthedocs.io/en/latest/awsaccess.html>`_.

Expand Down
4 changes: 2 additions & 2 deletions pynamodb/attributes.py
Expand Up @@ -312,11 +312,11 @@ def _set_attributes(self, **attributes: Attribute) -> None:
setattr(self, attr_name, attr_value)

def __eq__(self, other: Any) -> bool:
# This is required for python 2 support so that MapAttribute can call this method.
# This is required so that MapAttribute can call this method.
return self is other

def __ne__(self, other: Any) -> bool:
# This is required for python 2 support so that MapAttribute can call this method.
# This is required so that MapAttribute can call this method.
return self is not other


Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -27,6 +27,7 @@
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: MIT License',
],
extras_require={
Expand Down

0 comments on commit 5d58fc9

Please sign in to comment.