Skip to content

Commit

Permalink
Drop Python2 support in order to fix failing tests due to item metacl…
Browse files Browse the repository at this point in the history
…ass updates in scrapy>=2.2.0 (#19)

* fix failing tests due to item metaclass updates in scrapy>=2.1.0

* fix filename typos

* remove remnants of Python2 support

* fix missing resource in tox.ini due to typo

* add support for Python 3.8
  • Loading branch information
BurnzZ authored Aug 11, 2020
1 parent 43dc70d commit 0e38129
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ sudo: false
dist: xenial
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.7
env: TOXENV=py37
- python: 3.8
env: TOXENV=py38
install: pip install -U tox codecov
script: tox
after_success:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jsonschema[format]
scrapy
scrapy>=2.0.0
six
4 changes: 2 additions & 2 deletions scrapy_jsonschema/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
draft7_format_checker,
)

from scrapy.item import DictItem, Field
from scrapy.item import DictItem, Field, _BaseItemMeta


def _merge_schema(base, new):
Expand All @@ -40,7 +40,7 @@ def _merge_schema(base, new):
return base


class JsonSchemaMeta(ABCMeta):
class JsonSchemaMeta(_BaseItemMeta):

# For backward compatibility
format_checker = FormatChecker()
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
install_requires=['scrapy', 'jsonschema[format]', 'six']
)
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py35, py36, py37
envlist = py35, py36, py37, py38

[testenv]
deps =
-rrequirements.txt
-rdev-requiremens.txt
-rdev-requirements.txt
coverage
nose

Expand Down

0 comments on commit 0e38129

Please sign in to comment.