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 pyyaml version to fix bug #305

Closed
wants to merge 1 commit into from

Conversation

forced-request
Copy link

What does this PR do?

This PR bumps the pyyaml version to 6.0.1 to mitigate some issues that I encountered during local setup.

Ref: https://stackoverflow.com/questions/76708329/docker-compose-no-longer-building-image-attributeerror-cython-sources

Collecting pyyaml==6.0 (from -r requirements.txt (line 11))
  Using cached PyYAML-6.0.tar.gz (124 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
  ╰─> [48 lines of output]
      running egg_info
      writing lib/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/Users/john/tools/ScoutSuite/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/john/tools/ScoutSuite/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/john/tools/ScoutSuite/venv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 288, in <module>
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 319, in run
          self.find_sources()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 327, in find_sources
          mm.run()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 549, in run
          self.add_defaults()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 587, in add_defaults
          sdist.add_defaults(self)
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
          super().add_defaults()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
        File "<string>", line 204, in get_source_files
        File "/private/var/folders/rp/dsyxds457wl18_cpnzbvwst80000gp/T/pip-build-env-kqz59wg7/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

Completion checklist

  • Additions and changes have unit tests
  • The pull request has been appropriately labeled using the provided PR labels
  • GitHub actions automation is passing (make test, make lint, make security-test, make test-js)
  • If the UI contents or JavaScript files have been modified, generate a new example report:
# Generate the updated Javascript bundle
make build-js

# Generate the example report
make generate-report

@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @forced-request to sign the Salesforce Inc. Contributor License Agreement.

@gruebel
Copy link
Collaborator

gruebel commented Aug 19, 2023

hey @forced-request please sign the CLA and then we are good to go 🙂

@gruebel
Copy link
Collaborator

gruebel commented Aug 23, 2023

@forced-request still interested in doing the change, otherwise I will do it in my open PR or a follow-up.

@forced-request
Copy link
Author

@forced-request still interested in doing the change, otherwise I will do it in my open PR or a follow-up.

@gruebel Interestingly enough, I did already sign the agreement. Not sure why the bot isn't updating, but here's a screenshot:

Screenshot 2023-08-23 at 8 29 16 AM

If it's easiest, feel free to just fix this in another PR :)

@gruebel
Copy link
Collaborator

gruebel commented Aug 23, 2023

🤔 could you try to resolve the merge conflict and push the change, maybe it will trigger the CLA bot again. I'm ok to wait some extra days. If you already took the time to create a PR for fixing, then I don't want to steal it away from you 😄

@nitrocode
Copy link
Contributor

nitrocode commented Aug 23, 2023

Ah this could solve a similar bug I'm seeing for both policy_sentry and cloudsplaining

Would you also need to update the homebrew formula?

resource "PyYAML" do
url "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz"
sha256 "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"
end

I see the actions-user bot recently updated the policy_sentry homebrew formula and it's now working as expected for me.

salesforce/policy_sentry@14c26be

@nitrocode nitrocode mentioned this pull request Aug 25, 2023
4 tasks
@gruebel gruebel closed this in #310 Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants