Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor attrs to avoid unpickle issues #3179 #3192 #3193

Merged
merged 7 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,17 @@ License detection:
and exposed with the "percentage_of_license_text" attribute.


v31.2.4 - 2023-01-09
----------------------------------

This is a minor bugfix release.

There is a fix for an installation issue with the new "attrs" version 22.x
when scancode-toolkit is installed using pip.
This is resolved by vendoring attrs for use in licensedcode" to work around
https://github.com/nexB/scancode-toolkit/issues/3179


v31.2.3 - 2022-12-24
----------------------------------

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ norecursedirs = [
"tests/data",
".eggs",
"src/*/data",
"tests/*/data"
"tests/*/data",
"src/licensedcode/_vendor"
]

python_files = "*.py"
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ tomli==2.0.1
tqdm==4.64.0
twine==4.0.1
typing_extensions==4.3.0
vendorize==0.3.0

1 change: 1 addition & 0 deletions setup-mini.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ testing =
twine
black
isort
vendorize >= 0.3.0

docs =
Sphinx >= 3.3.1
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ testing =
twine
black
isort
vendorize >= 0.3.0

docs =
Sphinx >= 3.3.1
Expand Down
Empty file.
80 changes: 80 additions & 0 deletions src/licensedcode/_vendor/attr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: MIT

from __future__ import absolute_import, division, print_function

import sys

from functools import partial

from . import converters, exceptions, filters, setters, validators
from ._cmp import cmp_using
from ._config import get_run_validators, set_run_validators
from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types
from ._make import (
NOTHING,
Attribute,
Factory,
attrib,
attrs,
fields,
fields_dict,
make_class,
validate,
)
from ._version_info import VersionInfo


__version__ = "21.4.0"
__version_info__ = VersionInfo._from_version_string(__version__)

__title__ = "attrs"
__description__ = "Classes Without Boilerplate"
__url__ = "https://www.attrs.org/"
__uri__ = __url__
__doc__ = __description__ + " <" + __uri__ + ">"

__author__ = "Hynek Schlawack"
__email__ = "[email protected]"

__license__ = "MIT"
__copyright__ = "Copyright (c) 2015 Hynek Schlawack"


s = attributes = attrs
ib = attr = attrib
dataclass = partial(attrs, auto_attribs=True) # happy Easter ;)

__all__ = [
"Attribute",
"Factory",
"NOTHING",
"asdict",
"assoc",
"astuple",
"attr",
"attrib",
"attributes",
"attrs",
"cmp_using",
"converters",
"evolve",
"exceptions",
"fields",
"fields_dict",
"filters",
"get_run_validators",
"has",
"ib",
"make_class",
"resolve_types",
"s",
"set_run_validators",
"setters",
"validate",
"validators",
]

if sys.version_info[:2] >= (3, 6):
from ._next_gen import define, field, frozen, mutable # noqa: F401

__all__.extend(("define", "field", "frozen", "mutable"))
Loading