Commit 6376061
authored
upgrade precommit semgrep to fix python 3.14 errors (#1087)
I was getting this error:
```
- hook id: semgrep-ci
- exit code: 1
Traceback (most recent call last):
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/bin/pysemgrep", line 52, in <module>
sys.exit(semgrep.main.main())
~~~~~~~~~~~~~~~~~^^
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/main.py", line 115, in main
from semgrep.cli import cli
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/cli.py", line 5, in <module>
from semgrep.commands.ci import ci
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/commands/ci.py", line 22, in <module>
import semgrep.run_scan
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/run_scan.py", line 38, in <module>
import semgrep.scan_report as scan_report
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/scan_report.py", line 17, in <module>
from semgrep.app import auth
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/app/auth.py", line 7, in <module>
from semgrep import tracing
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/semgrep/tracing.py", line 14, in <module>
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py", line 25, in <module>
from opentelemetry.exporter.otlp.proto.common._internal import (
_create_exp_backoff_generator,
)
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py", line 31, in <module>
from opentelemetry.proto.common.v1.common_pb2 import (
InstrumentationScope as PB2InstrumentationScope,
)
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/opentelemetry/proto/common/v1/common_pb2.py", line 5, in <module>
from google.protobuf import descriptor as _descriptor
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/google/protobuf/descriptor.py", line 17, in <module>
from google.protobuf.internal import api_implementation
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/google/protobuf/internal/api_implementation.py", line 51, in <module>
if _CanImport('google._upb._message'):
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sorinbuliarca/.cache/pre-commit/repol1ucohzc/py_env-python3.14/lib/python3.14/site-packages/google/protobuf/internal/api_implementation.py", line 41, in _CanImport
mod = importlib.import_module(mod_name)
File "/opt/homebrew/Cellar/python@3.14/3.14.0_1/Frameworks/Python.framework/Versions/3.14/lib/python3.14/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Metaclasses with custom tp_new are not supported.
```1 parent 6c58058 commit 6376061
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
0 commit comments