Package Details: python-restrictedpython 5.0-1

Git Clone URL: (read-only, click to copy)
Package Base: python-restrictedpython
Description: A restricted execution environment for Python to run untrusted code
Upstream URL:
Licenses: ZPL
Conflicts: python-restrictedpython
Provides: python-restrictedpython
Submitter: bmwinger
Maintainer: bmwinger
Last Packager: bmwinger
Votes: 0
Popularity: 0.000000
First Submitted: 2019-08-11 00:06
Last Updated: 2019-09-08 02:45

Latest Comments

bunburya commented on 2020-10-01 21:57

Sorry, nevermind. I was getting a ModuleNotFoundError: No module named 'brotli' whenever I tried to install this package, but upon closer inspection that error is actually being thrown by py.test on my system (regardless of context), apparently due to some other package.

bmwinger commented on 2020-09-28 18:09

Are you sure python-brotlipy is needed? I don't see reference to it in the RestrictedPython source code or documentation anywhere.

bunburya commented on 2020-09-26 14:00

I needed python-brotlipy installed to install this; I think it should be included as a check dependency.

lunchbox commented on 2019-10-18 14:47

So it looks like my problem was related to a past install of openmmm. It looks like this package got built back in April and when I went to install it the /usr/lib/python3.7/site-packages/patool-1.12-py3.7.egg-info/ directory and all its contents already existed. I verified that the folder had no owner with pacman so I deleted it and rebuilt this package. Everything worked as expected.

bmwinger commented on 2019-09-08 02:50

I don't know if this was the same as your problem @lunchbox, but I realized that pytest wasn't finding the RestrictedPython module, and the only reason the tests passed on my machine was because I also had RestrictedPython installed via pip in .local at the same time, so it was testing that version.

I've fixed this at the same time as the version bump to 5.0.

bmwinger commented on 2019-09-06 14:39

Looking at the end of your log, it looks like the issue you're having is that it's unable to read the information about patool (version information by the looks of it), it's not trying to install over it. It's reading from the path with 'rb' mode, not writing.

line 1616, in _get
    with open(path, 'rb') as stream:
PermissionError: [Errno 13] Permission denied:

Are there any permission reasons why it would not be able to read that file? Perhaps the better question is why is it trying to read the version of patool at all; restrictedpython doesn't use patool.

lunchbox commented on 2019-09-05 14:26

Receiving the following error when building from yay:

Traceback (most recent call last): File "/usr/bin/py.test", line 6, in <module> from pkg_resources import load_entry_point File "/usr/lib/python3.7/site-packages/pkg_resources/", line 3250, in <module> @_call_aside File "/usr/lib/python3.7/site-packages/pkg_resources/", line 3234, in _call_aside f(*args, kwargs) File "/usr/lib/python3.7/site-packages/pkg_resources/", line 3263, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.7/site-packages/pkg_resources/", line 574, in _build_master ws = cls() File "/usr/lib/python3.7/site-packages/pkg_resources/", line 567, in init self.add_entry(entry) File "/usr/lib/python3.7/site-packages/pkg_resources/", line 623, in add_entry for dist in find_distributions(entry, True): File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2065, in find_on_path for dist in factory(fullpath): File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2135, in distributions_from_metadata root, entry, metadata, precedence=DEVELOP_DIST, File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2592, in from_location py_version=py_version, platform=platform, kw File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2994, in _reload_version md_version = self._get_version() File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2772, in _get_version version = _version_from_file(lines) File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2556, in _version_from_file line = next(iter(version_lines), '') File "/usr/lib/python3.7/site-packages/pkg_resources/", line 2767, in _get_metadata for line in self.get_metadata_lines(name): File "/usr/lib/python3.7/site-packages/pkg_resources/", line 1432, in get_metadata_lines return yield_lines(self.get_metadata(name)) File "/usr/lib/python3.7/site-packages/pkg_resources/", line 1420, in get_metadata value = self._get(path) File "/usr/lib/python3.7/site-packages/pkg_resources/", line 1616, in _get with open(path, 'rb') as stream: PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.7/site-packages/patool-1.12-py3.7.egg-info/PKG-INFO'

It looks like the file is already installed by patool: pacman -Qo /usr/lib/python3.7/site-packages/patool-1.12-py3.7.egg-info/PKG-INFO /usr/lib/python3.7/site-packages/patool-1.12-py3.7.egg-info/PKG-INFO is owned by patool 1.12-3