🐞 bug report
Affected Rule
pypi__dataclasses was build into python after 3.7 but when I use werkzeug the rule throw a error that can't found pypi__dataclasses.
But when I add this package the flask throw a ClassVar Exception which fixed in dataclasses==0.8,but this version can't be found.
Is this a regression?
No, the previous also have this problem.
Description
requirements.txt
-i https://pypi.org/simple
click==8.0.3; python_version >= '3.6'
flask==2.0.2
importlib-metadata==4.8.2
itsdangerous==2.0.1; python_version >= '3.6'
jinja2==3.0.3; python_version >= '3.6'
markupsafe==2.0.1; python_version >= '3.6'
typing-extensions==4.0.1
werkzeug==2.0.2; python_version >= '3.6'
zipp==3.6.0; python_version >= '3.6'
werkzeug was denpend on pypi__dataclasses before python 3.7. But this was build into python after 3.7.
Generated BUILD.bazel for @pip//pypi__werkzeug
package(default_visibility = ["//visibility:public"])
load("@rules_python//python:defs.bzl", "py_library")
filegroup(
name="whl",
srcs=glob(["*.whl"]),
data=["//pypi__dataclasses:whl"]
)
py_library(
name = "pypi__werkzeug",
srcs = glob(["**/*.py"], allow_empty = True),
data = glob(["**/*"], exclude=["*.whl", "**/*.py", "**/* *", "BUILD.bazel", "WORKSPACE"]),
# This makes this directory a top-level in the python import
# search path for anything that depends on this.
imports = ["."],
deps = ["//pypi__dataclasses"],
)
Because of this I got error when build.
ERROR: /data/julian/.cache/bazel/_bazel_julian/8c348c6a4a98ab4769a8510cc65dd7e6/external/com_deps/pypi__werkzeug/BUILD.bazel:11:11: no such package '@com_deps//pypi__dataclasses': BUILD file not found in directory 'pypi__dataclasses' of external repository @com_deps. Add a BUILD file to a directory to mark it as a package. and referenced by '@com_deps//pypi__werkzeug:pypi__werkzeug'
ERROR: Analysis of target '//web/cooeeu/com:app' failed; build aborted:
INFO: Elapsed time: 8.714s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (64 packages loaded, 427 targets configured)
So I added dataclasses==0.6 to my requirements.txt but when I run the workspace I got the error bellow.
AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?
This error was fixed by 0.8, but this version was build into Python after version 3.7.
I tried to add dataclasses==0.6; python_version < '3.7' to my requirements.txt.but I got the same error as didn't set dataclasses.
How can I got the pypi__werkzeug rule without pypi__dataclasses when I use python 3.10.1?
Thank you.
🔬 Minimal Reproduction
🔥 Exception or Error
ERROR: /data/julian/.cache/bazel/_bazel_julian/8c348c6a4a98ab4769a8510cc65dd7e6/external/com_deps/pypi__werkzeug/BUILD.bazel:11:11: no such package '@com_deps//pypi__dataclasses': BUILD file not found in directory 'pypi__dataclasses' of external repository @com_deps. Add a BUILD file to a directory to mark it as a package. and referenced by '@com_deps//pypi__werkzeug:pypi__werkzeug'
ERROR: Analysis of target '//web/cooeeu/com:app' failed; build aborted:
INFO: Elapsed time: 8.714s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (64 packages loaded, 427 targets configured)
🌍 Your Environment
Operating System:
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Output of bazel version:
Bazelisk version: v1.11.0
Build label: 6.0.0-pre.20211117.1
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Dec 7 13:45:34 2021 (1638884734)
Build timestamp: 1638884734
Build timestamp as int: 1638884734
Rules_python version:
http_archive(
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz",
sha256 = "cd6730ed53a002c56ce4e2f396ba3b3be262fd7cb68339f0377a45e8227fe332",
)
Anything else relevant?
🐞 bug report
Affected Rule
pypi__dataclasses was build into python after 3.7 but when I use werkzeug the rule throw a error that can't found pypi__dataclasses.
But when I add this package the flask throw a ClassVar Exception which fixed in dataclasses==0.8,but this version can't be found.
Is this a regression?
No, the previous also have this problem.
Description
requirements.txt
werkzeug was denpend on pypi__dataclasses before python 3.7. But this was build into python after 3.7.
Generated BUILD.bazel for @pip//pypi__werkzeug
Because of this I got error when build.
So I added
dataclasses==0.6to my requirements.txt but when I run the workspace I got the error bellow.AttributeError: module 'typing' has no attribute '_ClassVar'. Did you mean: 'ClassVar'?This error was fixed by 0.8, but this version was build into Python after version 3.7.
I tried to add
dataclasses==0.6; python_version < '3.7'to my requirements.txt.but I got the same error as didn't set dataclasses.How can I got the pypi__werkzeug rule without pypi__dataclasses when I use python 3.10.1?
Thank you.
🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version:Rules_python version:
Anything else relevant?