Skip to content

Migration to Python3? SafeConfigParser #1132

@justinb-dfw

Description

@justinb-dfw

Environment

  • How did you install GRR? [e.g. from release DEB, HEAD DEB, PIP package, source]
    Docker Compose
  • What GRR version are you running?
    Latest
  • What operating system does the GRR server run on? [e.g. Ubuntu 18.04]
    Docker on Mac OS 15.4.1
  • What operating system does the affected GRR client run on, if applicable? [e.g. Windows 10]
    Mac OS 15.4.1

Describe the issue
It seems like the script is utilizing antiquated python such as SafeConfigParser - can we make sure the 2to3 futures library is included so it doesnt break in later python3 enviornments?

Ran the command:
CFLAGS=-stdlib=libc++ pip install grr-response-client-builder

Error logs

ollecting grr-response-client-builder
  Using cached grr-response-client-builder-3.4.2.post4.zip (49 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "/Users/justinb/grr/grr/grr/client_builder/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/Users/justinb/grr/grr/grr/client_builder/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/justinb/grr/grr/grr/client_builder/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/nr/hpqy5wdj1pd1ksvhs5x20dvw0000gn/T/pip-build-env-bigcx154/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nr/hpqy5wdj1pd1ksvhs5x20dvw0000gn/T/pip-build-env-bigcx154/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/private/var/folders/nr/hpqy5wdj1pd1ksvhs5x20dvw0000gn/T/pip-build-env-bigcx154/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/nr/hpqy5wdj1pd1ksvhs5x20dvw0000gn/T/pip-build-env-bigcx154/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 32, in <module>
        File "<string>", line 27, in get_config
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Additional context
Was working on this as the mac osx client doesnt seem to work on Apple Sillicon?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions