Skip to content

Commit 2124157

Browse files
authored
Merge pull request #3193 from nexB/v31.2.3-branch-hotfix
Vendor attrs to avoid unpickle issues #3179 #3192
2 parents cc14890 + 73dc7c8 commit 2124157

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6590
-13
lines changed

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ License detection:
187187
and exposed with the "percentage_of_license_text" attribute.
188188

189189

190+
v31.2.4 - 2023-01-09
191+
----------------------------------
192+
193+
This is a minor bugfix release.
194+
195+
There is a fix for an installation issue with the new "attrs" version 22.x
196+
when scancode-toolkit is installed using pip.
197+
This is resolved by vendoring attrs for use in licensedcode" to work around
198+
https://github.com/nexB/scancode-toolkit/issues/3179
199+
200+
190201
v31.2.3 - 2022-12-24
191202
----------------------------------
192203

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ norecursedirs = [
3737
"tests/data",
3838
".eggs",
3939
"src/*/data",
40-
"tests/*/data"
40+
"tests/*/data",
41+
"src/licensedcode/_vendor"
4142
]
4243

4344
python_files = "*.py"

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ tomli==2.0.1
2929
tqdm==4.64.0
3030
twine==4.0.1
3131
typing_extensions==4.3.0
32+
vendorize==0.3.0
33+

setup-mini.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ testing =
132132
twine
133133
black
134134
isort
135+
vendorize >= 0.3.0
135136

136137
docs =
137138
Sphinx >= 3.3.1

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ testing =
132132
twine
133133
black
134134
isort
135+
vendorize >= 0.3.0
135136

136137
docs =
137138
Sphinx >= 3.3.1

src/licensedcode/_vendor/__init__.py

Whitespace-only changes.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
from __future__ import absolute_import, division, print_function
4+
5+
import sys
6+
7+
from functools import partial
8+
9+
from . import converters, exceptions, filters, setters, validators
10+
from ._cmp import cmp_using
11+
from ._config import get_run_validators, set_run_validators
12+
from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types
13+
from ._make import (
14+
NOTHING,
15+
Attribute,
16+
Factory,
17+
attrib,
18+
attrs,
19+
fields,
20+
fields_dict,
21+
make_class,
22+
validate,
23+
)
24+
from ._version_info import VersionInfo
25+
26+
27+
__version__ = "21.4.0"
28+
__version_info__ = VersionInfo._from_version_string(__version__)
29+
30+
__title__ = "attrs"
31+
__description__ = "Classes Without Boilerplate"
32+
__url__ = "https://www.attrs.org/"
33+
__uri__ = __url__
34+
__doc__ = __description__ + " <" + __uri__ + ">"
35+
36+
__author__ = "Hynek Schlawack"
37+
__email__ = "hs@ox.cx"
38+
39+
__license__ = "MIT"
40+
__copyright__ = "Copyright (c) 2015 Hynek Schlawack"
41+
42+
43+
s = attributes = attrs
44+
ib = attr = attrib
45+
dataclass = partial(attrs, auto_attribs=True) # happy Easter ;)
46+
47+
__all__ = [
48+
"Attribute",
49+
"Factory",
50+
"NOTHING",
51+
"asdict",
52+
"assoc",
53+
"astuple",
54+
"attr",
55+
"attrib",
56+
"attributes",
57+
"attrs",
58+
"cmp_using",
59+
"converters",
60+
"evolve",
61+
"exceptions",
62+
"fields",
63+
"fields_dict",
64+
"filters",
65+
"get_run_validators",
66+
"has",
67+
"ib",
68+
"make_class",
69+
"resolve_types",
70+
"s",
71+
"set_run_validators",
72+
"setters",
73+
"validate",
74+
"validators",
75+
]
76+
77+
if sys.version_info[:2] >= (3, 6):
78+
from ._next_gen import define, field, frozen, mutable # noqa: F401
79+
80+
__all__.extend(("define", "field", "frozen", "mutable"))

0 commit comments

Comments
 (0)