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

bump to python 3.11.4 #865

Merged
merged 5 commits into from
Jul 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on: [push, pull_request]

env:
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -e PYTHONWARNINGS=error --shm-size 1G --rm opendbc /bin/bash -c
RUN: docker run -v $GITHUB_WORKSPACE:/project/opendbc -w /project/opendbc -e PYTHONWARNINGS="error,default::DeprecationWarning" --shm-size 1G --rm opendbc /bin/bash -c
BUILD: |
docker pull $(grep -ioP '(?<=^from)\s+\S+' Dockerfile) || true
docker pull ghcr.io/commaai/opendbc:latest || true
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.8.10
RUN pyenv global 3.8.10
RUN pyenv install 3.11.4
RUN pyenv global 3.11.4
RUN pyenv rehash

COPY requirements.txt /tmp/
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN pip install --no-cache-dir pre-commit==2.15.0 pylint==2.5.2
RUN pip install --no-cache-dir pre-commit==2.15.0 pylint==2.17.4

ENV PYTHONPATH=/project

Expand Down
2 changes: 1 addition & 1 deletion generator/chrysler/_stellantis_common_ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
chrysler_path = os.path.dirname(os.path.realpath(__file__))

for out, addr_lookup in chrysler_to_ram.items():
with open(os.path.join(chrysler_path, src)) as in_f, open(os.path.join(chrysler_path, out), 'w') as out_f:
with open(os.path.join(chrysler_path, src), encoding='utf-8') as in_f, open(os.path.join(chrysler_path, out), 'w', encoding='utf-8') as out_f:
out_f.write(f'CM_ "Generated from {src}"\n\n')

wrote_addrs = set()
Expand Down
4 changes: 2 additions & 2 deletions generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def read_dbc(src_dir: str, filename: str) -> str:
with open(os.path.join(src_dir, filename)) as file_in:
with open(os.path.join(src_dir, filename), encoding='utf-8') as file_in:
return file_in.read()


Expand All @@ -23,7 +23,7 @@ def create_dbc(src_dir: str, filename: str, output_path: str):
output_filename = filename.replace('.dbc', generated_suffix)
output_file_location = os.path.join(output_path, output_filename)

with open(output_file_location, 'w') as dbc_file_out:
with open(output_file_location, 'w', encoding='utf-8') as dbc_file_out:
dbc_file_out.write('CM_ "AUTOGENERATED FILE, DO NOT EDIT";\n')

for include_filename in includes:
Expand Down
2 changes: 1 addition & 1 deletion generator/hyundai/hyundai_kia_mando_corner_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if __name__ == "__main__":
dbc_name = os.path.basename(__file__).replace(".py", ".dbc")
hyundai_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(hyundai_path, dbc_name), "w") as f:
with open(os.path.join(hyundai_path, dbc_name), "w", encoding='utf-8') as f:
f.write("""
VERSION ""

Expand Down
2 changes: 1 addition & 1 deletion generator/hyundai/hyundai_kia_mando_front_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if __name__ == "__main__":
dbc_name = os.path.basename(__file__).replace(".py", ".dbc")
hyundai_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(hyundai_path, dbc_name), "w") as f:
with open(os.path.join(hyundai_path, dbc_name), "w", encoding='utf-8') as f:
f.write("""
VERSION ""
Expand Down
14 changes: 7 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Cython==0.29.34
flake8==6.0.0
Jinja2==3.1.2
numpy==1.24.2
pycapnp==1.3.0
pylint==2.17.2
pyyaml==6.0
Cython
flake8
Jinja2
numpy
pycapnp
pylint==2.17.4
pyyaml
scons