Skip to content

Commit

Permalink
Fixing "ValueError: Object 'EXCLUDE'" in
Browse files Browse the repository at this point in the history
NerdWalletOSS#110. Also bumping
Python to >=3.9
  • Loading branch information
ax-brendani committed Oct 11, 2024
1 parent 1270a85 commit fc17041
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dynamorm/types/_marshmallow.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import six
from pkg_resources import parse_version

from marshmallow import Schema as MarshmallowSchema
from marshmallow import Schema as MarshmallowSchema, EXCLUDE
from marshmallow.exceptions import MarshmallowError
from marshmallow import fields, __version__ as marshmallow_version

Expand All @@ -15,7 +15,7 @@ def _validate(cls, obj, partial=False, native=False):
"""Validate using a Marshmallow v3+ schema"""
try:
if native:
data = cls().load(obj, partial=partial, unknown="EXCLUDE")
data = cls().load(obj, partial=partial, unknown=EXCLUDE)
else:
data = cls(partial=partial, unknown="EXCLUDE").dump(obj)
except MarshmallowError as e:
Expand Down
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

setup(
name="dynamorm",
version="0.11.0",
version="0.12.0",
description="DynamORM is a Python object & relation mapping library for Amazon's DynamoDB service.",
long_description=long_description,
author="Evan Borgstrom",
author_email="evan@borgstrom.ca",
url="https://github.com/NerdWalletOSS/DynamORM",
license="Apache License Version 2.0",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4",
python_requires=">=2.7, >=3.9, <4",
install_requires=["blinker>=1.4,<2.0", "boto3>=1.3,<2.0", "six"],
extras_require={
"marshmallow": ["marshmallow>=2.15.1,<4"],
Expand All @@ -22,10 +22,11 @@
classifiers=[
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
Expand Down

0 comments on commit fc17041

Please # to comment.