Ensure type information is present in wheels
diff --git a/.gitignore b/.gitignore
index a30c504..2d3faa9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,10 @@
*.py[cdo]
+*.egg-info/
/env*/
/build/
/cython_debug/
/dist/
-/*.egg-info/
*.c
*.cpp
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70d0a16..1f61d39 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+### 1.5.3
+
+* Add [PEP 484](https://www.python.org/dev/peps/pep-0484/) type hints ([Pascal Corpet](https://github.com/pcorpet))
+* Update [JSONTestSuite](https://github.com/nst/JSONTestSuite)
+
### 1.5.2
* Add file extensions to fix compilation with current Apple SDKs
diff --git a/MANIFEST.in b/MANIFEST.in
index e0eb6fe..7d750fb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,7 @@
-include __init__.pyi
include LICENSE
include make_*.py
include sha512sum.py
include Makefile
-include py.typed
include pyjson5.cpp
include pyjson5.pyx
include requires.txt
diff --git a/Makefile b/Makefile
index e99ab0c..61947b4 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
FILES := Makefile MANIFEST.in pyjson5.pyx README.rst setup.py ${INCLUDES}
DerivedGeneralCategory.txt: DerivedGeneralCategory.txt.sha
- curl -s -o $@ https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedGeneralCategory-14.0.0d19.txt
+ curl -s -o $@ https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedGeneralCategory.txt
python sha512sum.py -c $@.sha
src/_unicode_cat_of.hpp: DerivedGeneralCategory.txt make_unicode_categories.py
diff --git a/docs/conf.py b/docs/conf.py
index 05c1694..d4434ac 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -65,7 +65,7 @@
autosummary_generate = True
intersphinx_mapping = {
- 'python': ('https://docs.python.org/3.9', None),
+ 'python': ('https://docs.python.org/3.10', None),
}
inheritance_graph_attrs = {
diff --git a/setup.py b/setup.py
index d7d1d73..fee4337 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@
python_requires='~= 3.5',
zip_safe=False,
ext_modules=[Extension(
- name,
+ name + '.' + name,
sources=[name + '.pyx'],
include_dirs=['src'],
extra_compile_args=extra_compile_args,
@@ -53,8 +53,19 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Text Processing :: General',
],
+ packages=[name],
+ package_dir={
+ '': 'src',
+ },
+ package_data = {
+ name: [
+ '__init__.pyi',
+ 'py.typed',
+ ],
+ },
)
diff --git a/src/VERSION.inc b/src/VERSION.inc
index e67bcd1..8b265a8 100644
--- a/src/VERSION.inc
+++ b/src/VERSION.inc
@@ -1 +1 @@
-"1.5.2"
+"1.5.3"
diff --git a/src/pyjson5/__init__.py b/src/pyjson5/__init__.py
new file mode 100644
index 0000000..08aeed9
--- /dev/null
+++ b/src/pyjson5/__init__.py
@@ -0,0 +1 @@
+from .pyjson5 import *
diff --git a/__init__.pyi b/src/pyjson5/__init__.pyi
similarity index 97%
rename from __init__.pyi
rename to src/pyjson5/__init__.pyi
index 6b252da..1997fd9 100644
--- a/__init__.pyi
+++ b/src/pyjson5/__init__.pyi
@@ -67,10 +67,10 @@
...
def decode_callback(
- cb: Callable[[...], Union[str, bytes, bytearray, int, None]],
+ cb: Callable[[_T], Union[str, bytes, bytearray, int, None]],
maxdepth: Optional[int] = ...,
some: bool = ...,
- args: Optional[Iterable[Any]] = None,
+ args: Optional[Iterable[_T]] = None,
) -> Any:
...
@@ -167,7 +167,6 @@
...
class Json5Exception(Exception):
-
def __init__(self, message: Optional[str] = ..., *args: Any) -> None:
...
diff --git a/py.typed b/src/pyjson5/py.typed
similarity index 100%
rename from py.typed
rename to src/pyjson5/py.typed
diff --git a/third-party/JSONTestSuite b/third-party/JSONTestSuite
index 9f23c68..d64aefb 160000
--- a/third-party/JSONTestSuite
+++ b/third-party/JSONTestSuite
@@ -1 +1 @@
-Subproject commit 9f23c68b521dd700e8c99151d6dc1c5c52a0246e
+Subproject commit d64aefb55228d9584d3e5b2433f720ea8fd00c82