diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a07539a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test + +on: [push, pull_request] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"] + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Linux dependencies + run: | + sudo apt-get install -y libattr1-dev + sudo apt-get install -y pkg-config + sudo apt-get install -y gcc + sudo apt-get install -y libfuse3-dev fuse3 + sudo apt-get install -y ninja-build + sudo apt-get install -y meson + sudo apt-get install -y python3-sphinx + + - name: Install Python dependencies + run: | + test/ci-install.sh + + - name: Test + run: | + test/ci-test.sh diff --git a/.gitignore b/.gitignore index f1a8a49..e027114 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +MANIFEST build/ dist/ doc/html/ @@ -7,3 +8,5 @@ src/pyfuse3*.so test/.cache/ __pycache__ test/.pytest_cache/ +*.egg-info +*.pyc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 14b1588..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -sudo: required -language: python - -matrix: - include: - - python: "3.8" - os: linux - dist: focal - - python: "3.9-dev" - os: linux - dist: focal - -addons: - apt: - packages: - - libattr1-dev - - pkg-config - - gcc - - ninja-build - - meson - - python3-sphinx - - cython3 - - libfuse3-dev - - fuse3 -install: test/travis-install.sh -script: test/travis-test.sh diff --git a/Changes.rst b/Changes.rst index 44aff34..f7a71b2 100644 --- a/Changes.rst +++ b/Changes.rst @@ -4,6 +4,23 @@ .. currentmodule:: pyfuse3 +Release 3.2.2 (2022-09-28) +========================== + +* remove support for python 3.5 (broken, out of support by python devs) + +* cythonize with latest Cython 0.29.x (brings Python 3.11 support) + +* use github actions for CI, remove travis-ci + +* update README: minimal maintenance, not developed + +* update setup.py with tested python versions + +* examples/tmpfs.py: work around strange kernel behaviour (calling SETATTR after + UNLINK of a (not open) file): respond with ENOENT instead of crashing. + + Release 3.2.1 (2021-09-17) ========================== diff --git a/README.rst b/README.rst index db73add..5939173 100644 --- a/README.rst +++ b/README.rst @@ -4,16 +4,11 @@ by PyPi and/or BitBucket. -This Project is Orphaned -======================== +Warning - no longer developed! +============================== -This project is no longer maintained or developed. Github issue tracking and pull requests have -therefore been disabled. The mailing list (see below) is still available for use. - -If you would like to take over this project, you are welcome to do so. Please fork it and -develop the fork for a while. Once there has been 6 months of reasonable activity, please -contact Nikolaus@rath.org and I'll be happy to give you ownership of this repository or -replace with a pointer to the fork. +pyfuse3 is no longer actively developed and just receiving community-contributed +maintenance to keep it alive for some time. The pyfuse3 Module diff --git a/examples/tmpfs.py b/examples/tmpfs.py index a70e9b3..d68b4df 100755 --- a/examples/tmpfs.py +++ b/examples/tmpfs.py @@ -147,7 +147,10 @@ async def lookup(self, inode_p, name, ctx=None): async def getattr(self, inode, ctx=None): - row = self.get_row('SELECT * FROM inodes WHERE id=?', (inode,)) + try: + row = self.get_row("SELECT * FROM inodes WHERE id=?", (inode,)) + except NoSuchRowError: + raise(pyfuse3.FUSEError(errno.ENOENT)) entry = pyfuse3.EntryAttributes() entry.st_ino = inode @@ -264,8 +267,8 @@ def _replace(self, inode_p_old, name_old, inode_p_new, name_new, async def link(self, inode, new_inode_p, new_name, ctx): entry_p = await self.getattr(new_inode_p) if entry_p.st_nlink == 0: - log.warn('Attempted to create entry %s with unlinked parent %d', - new_name, new_inode_p) + log.warning('Attempted to create entry %s with unlinked parent %d', + new_name, new_inode_p) raise FUSEError(errno.EINVAL) self.cursor.execute("INSERT INTO contents (name, inode, parent_inode) VALUES(?,?,?)", @@ -359,8 +362,8 @@ async def create(self, inode_parent, name, mode, flags, ctx): async def _create(self, inode_p, name, mode, ctx, rdev=0, target=None): if (await self.getattr(inode_p)).st_nlink == 0: - log.warn('Attempted to create entry %s with unlinked parent %d', - name, inode_p) + log.warning('Attempted to create entry %s with unlinked parent %d', + name, inode_p) raise FUSEError(errno.EINVAL) now_ns = int(time() * 1e9) diff --git a/setup.py b/setup.py index 33dbb81..7457822 100755 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ # to work properly sys.path.insert(0, os.path.join(basedir, 'src')) -PYFUSE3_VERSION = '3.2.1' +PYFUSE3_VERSION = '3.2.2' def main(): @@ -127,6 +127,13 @@ def main(): classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Filesystems', 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', @@ -134,11 +141,11 @@ def main(): 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Typing :: Typed'], - platforms=[ 'Linux' ], + platforms=[ 'Linux', 'FreeBSD', 'OS X' ], keywords=['FUSE', 'python' ], install_requires=['trio >= 0.15'], tests_require=['pytest >= 3.4.0', 'pytest-trio'], - python_requires='>=3.5', + python_requires='>=3.6', package_dir={'': 'src'}, py_modules=['_pyfuse3', 'pyfuse3_asyncio'], provides=['pyfuse3'], diff --git a/test/travis-install.sh b/test/ci-install.sh similarity index 70% rename from test/travis-install.sh rename to test/ci-install.sh index 00e6e67..d90c450 100755 --- a/test/travis-install.sh +++ b/test/ci-install.sh @@ -6,7 +6,8 @@ set -e # testing eg merge requests because some of those packages have started emitting # depreciation warnings or made backwards incompatible changes. pip install \ - "trio == 0.15" \ - "pytest >= 4.6.5, < 5.0.0" \ - "pytest_trio == 0.6.0" \ - sphinxcontrib-asyncio + trio \ + pytest \ + pytest_trio \ + sphinxcontrib-asyncio \ + Cython diff --git a/test/travis-test.sh b/test/ci-test.sh similarity index 100% rename from test/travis-test.sh rename to test/ci-test.sh diff --git a/test/test_fs.py b/test/test_fs.py index 0aa941e..a3f2c05 100755 --- a/test/test_fs.py +++ b/test/test_fs.py @@ -44,7 +44,7 @@ def get_mp(): return mp -@pytest.yield_fixture() +@pytest.fixture() def testfs(tmpdir): mnt_dir = str(tmpdir) mp = get_mp()