jsonpointer 3.0.0__tar.gz → 3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: jsonpointer
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: Identify specific nodes in a JSON document (RFC 6901)
5
5
  Home-page: https://github.com/stefankoegl/python-json-pointer
6
6
  Author: Stefan Kögl
@@ -13,20 +13,28 @@ Classifier: License :: OSI Approved :: BSD License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
16
  Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
21
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
22
  Classifier: Topic :: Software Development :: Libraries
25
23
  Classifier: Topic :: Utilities
26
- Requires-Python: >=3.7
24
+ Requires-Python: >=3.10
27
25
  Description-Content-Type: text/markdown
28
26
  License-File: LICENSE.txt
29
27
  License-File: AUTHORS
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: requires-python
37
+ Dynamic: summary
30
38
 
31
39
  python-json-pointer
32
40
  ===================
@@ -1,5 +1,4 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
1
+ #!/usr/bin/env python3
3
2
 
4
3
 
5
4
  import argparse
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: jsonpointer
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: Identify specific nodes in a JSON document (RFC 6901)
5
5
  Home-page: https://github.com/stefankoegl/python-json-pointer
6
6
  Author: Stefan Kögl
@@ -13,20 +13,28 @@ Classifier: License :: OSI Approved :: BSD License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
16
  Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
21
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
22
  Classifier: Topic :: Software Development :: Libraries
25
23
  Classifier: Topic :: Utilities
26
- Requires-Python: >=3.7
24
+ Requires-Python: >=3.10
27
25
  Description-Content-Type: text/markdown
28
26
  License-File: LICENSE.txt
29
27
  License-File: AUTHORS
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: license-file
36
+ Dynamic: requires-python
37
+ Dynamic: summary
30
38
 
31
39
  python-json-pointer
32
40
  ===================
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
1
  # python-json-pointer - An implementation of the JSON Pointer syntax
4
2
  # https://github.com/stefankoegl/python-json-pointer
5
3
  #
@@ -34,7 +32,7 @@
34
32
 
35
33
  # Will be parsed by setup.py to determine package metadata
36
34
  __author__ = 'Stefan Kögl <stefan@skoegl.net>'
37
- __version__ = '3.0.0'
35
+ __version__ = '3.1.0'
38
36
  __website__ = 'https://github.com/stefankoegl/python-json-pointer'
39
37
  __license__ = 'Modified BSD License'
40
38
 
@@ -136,7 +134,7 @@ class JsonPointerException(Exception):
136
134
  pass
137
135
 
138
136
 
139
- class EndOfList(object):
137
+ class EndOfList:
140
138
  """Result of accessing element "-" of a list"""
141
139
 
142
140
  def __init__(self, list_):
@@ -147,7 +145,7 @@ class EndOfList(object):
147
145
  lst=repr(self.list_))
148
146
 
149
147
 
150
- class JsonPointer(object):
148
+ class JsonPointer:
151
149
  """A JSON Pointer that can reference parts of a JSON document"""
152
150
 
153
151
  # Array indices must not contain:
@@ -294,7 +292,7 @@ class JsonPointer(object):
294
292
  except: # noqa E722
295
293
  raise JsonPointerException("Invalid suffix")
296
294
 
297
- def __truediv__(self, suffix): # Python 3
295
+ def __truediv__(self, suffix):
298
296
  return self.join(suffix)
299
297
 
300
298
  @property
@@ -1,6 +1,3 @@
1
- [bdist_wheel]
2
- universal = 1
3
-
4
1
  [flake8]
5
2
  max-line-length = 120
6
3
  exclude = .git,.tox,dist,doc,*egg,build,.venv
@@ -38,29 +38,28 @@ CLASSIFIERS = [
38
38
  'Operating System :: OS Independent',
39
39
  'Programming Language :: Python',
40
40
  'Programming Language :: Python :: 3',
41
- 'Programming Language :: Python :: 3.7',
42
- 'Programming Language :: Python :: 3.8',
43
- 'Programming Language :: Python :: 3.9',
44
41
  'Programming Language :: Python :: 3.10',
45
42
  'Programming Language :: Python :: 3.11',
46
43
  'Programming Language :: Python :: 3.12',
44
+ 'Programming Language :: Python :: 3.13',
47
45
  'Programming Language :: Python :: Implementation :: CPython',
48
46
  'Programming Language :: Python :: Implementation :: PyPy',
49
47
  'Topic :: Software Development :: Libraries',
50
48
  'Topic :: Utilities',
51
49
  ]
52
50
 
53
- setup(name=PACKAGE,
54
- version=VERSION,
55
- description=DESCRIPTION,
56
- long_description=long_description,
57
- long_description_content_type="text/markdown",
58
- author=AUTHOR,
59
- author_email=EMAIL,
60
- license=LICENSE,
61
- url=WEBSITE,
62
- py_modules=MODULES,
63
- scripts=['bin/jsonpointer'],
64
- classifiers=CLASSIFIERS,
65
- python_requires='>=3.7',
66
- )
51
+ setup(
52
+ name=PACKAGE,
53
+ version=VERSION,
54
+ description=DESCRIPTION,
55
+ long_description=long_description,
56
+ long_description_content_type="text/markdown",
57
+ author=AUTHOR,
58
+ author_email=EMAIL,
59
+ license=LICENSE,
60
+ url=WEBSITE,
61
+ py_modules=MODULES,
62
+ scripts=['bin/jsonpointer'],
63
+ classifiers=CLASSIFIERS,
64
+ python_requires='>=3.10',
65
+ )
@@ -1,11 +1,7 @@
1
1
  #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
-
4
- from __future__ import unicode_literals
5
2
 
6
3
  import copy
7
4
  import doctest
8
- import sys
9
5
  import unittest
10
6
 
11
7
  import jsonpointer
@@ -78,45 +74,33 @@ class SpecificationTests(unittest.TestCase):
78
74
 
79
75
  def test_str_and_repr(self):
80
76
  paths = [
81
- ("", "", "JsonPointer({u}'')"),
82
- ("/foo", "/foo", "JsonPointer({u}'/foo')"),
83
- ("/foo/0", "/foo/0", "JsonPointer({u}'/foo/0')"),
84
- ("/", "/", "JsonPointer({u}'/')"),
85
- ("/a~1b", "/a~1b", "JsonPointer({u}'/a~1b')"),
86
- ("/c%d", "/c%d", "JsonPointer({u}'/c%d')"),
87
- ("/e^f", "/e^f", "JsonPointer({u}'/e^f')"),
88
- ("/g|h", "/g|h", "JsonPointer({u}'/g|h')"),
89
- ("/i\\j", "/i\\j", "JsonPointer({u}'/i\\\\j')"),
90
- ("/k\"l", "/k\"l", "JsonPointer({u}'/k\"l')"),
91
- ("/ ", "/ ", "JsonPointer({u}'/ ')"),
92
- ("/m~0n", "/m~0n", "JsonPointer({u}'/m~0n')"),
77
+ ("", "", "JsonPointer('')"),
78
+ ("/foo", "/foo", "JsonPointer('/foo')"),
79
+ ("/foo/0", "/foo/0", "JsonPointer('/foo/0')"),
80
+ ("/", "/", "JsonPointer('/')"),
81
+ ("/a~1b", "/a~1b", "JsonPointer('/a~1b')"),
82
+ ("/c%d", "/c%d", "JsonPointer('/c%d')"),
83
+ ("/e^f", "/e^f", "JsonPointer('/e^f')"),
84
+ ("/g|h", "/g|h", "JsonPointer('/g|h')"),
85
+ ("/i\\j", "/i\\j", "JsonPointer('/i\\\\j')"),
86
+ ("/k\"l", "/k\"l", "JsonPointer('/k\"l')"),
87
+ ("/ ", "/ ", "JsonPointer('/ ')"),
88
+ ("/m~0n", "/m~0n", "JsonPointer('/m~0n')"),
93
89
  ]
94
90
  for path, ptr_str, ptr_repr in paths:
95
91
  ptr = JsonPointer(path)
96
92
  self.assertEqual(path, ptr.path)
97
-
98
- if sys.version_info[0] == 2:
99
- u_str = "u"
100
- else:
101
- u_str = ""
102
93
  self.assertEqual(ptr_str, str(ptr))
103
- self.assertEqual(ptr_repr.format(u=u_str), repr(ptr))
104
-
105
- if sys.version_info[0] == 2:
106
- path = "/\xee"
107
- ptr_str = b"/\xee"
108
- ptr_repr = "JsonPointer(u'/\\xee')"
109
- else:
110
- path = "/\xee"
111
- ptr_str = "/\xee"
112
- ptr_repr = "JsonPointer('/\xee')"
94
+ self.assertEqual(ptr_repr, repr(ptr))
95
+
96
+ path = "/\xee"
97
+ ptr_str = "/\xee"
98
+ ptr_repr = "JsonPointer('/\xee')"
113
99
  ptr = JsonPointer(path)
114
100
  self.assertEqual(path, ptr.path)
115
-
116
101
  self.assertEqual(ptr_str, str(ptr))
117
102
  self.assertEqual(ptr_repr, repr(ptr))
118
103
 
119
- # should not be unicode in Python 2
120
104
  self.assertIsInstance(str(ptr), str)
121
105
  self.assertIsInstance(repr(ptr), str)
122
106
 
@@ -385,7 +369,7 @@ class AltTypesTests(unittest.TestCase):
385
369
  '/root/1/2': '3',
386
370
  }
387
371
 
388
- for path, expected_value in iter(path_to_expected_value.items()):
372
+ for path, expected_value in path_to_expected_value.items():
389
373
  self.assertEqual(resolve_pointer(doc, path, default), expected_value)
390
374
 
391
375
  def test_mock_dict_returns_default(self):
@@ -397,7 +381,7 @@ class AltTypesTests(unittest.TestCase):
397
381
  '/x/y/z/d': default
398
382
  }
399
383
 
400
- for path, expected_value in iter(path_to_expected_value.items()):
384
+ for path, expected_value in path_to_expected_value.items():
401
385
  self.assertEqual(resolve_pointer(doc, path, default), expected_value)
402
386
 
403
387
  def test_mock_dict_raises_key_error(self):
File without changes
File without changes
File without changes
File without changes