+
Skip to content

Cannot find working version for release version of Python 3.11 (3.11.6 windows, 3.11.13 Linux) #43

@belonesox

Description

@belonesox

Consider small test program.

import asyncio
from aiopath import Path

async def main():
    current_dir = Path('.')
    resolved_path = await current_dir.resolve()
    print(f"Resolved path: {resolved_path}")


if __name__ == "__main__":
    asyncio.run(main())

I cannot get it work on python 3.11.6

aiopath==0.6.11 + python 3.11.6 windows

D:\wtf\aiopath>.\.venv\Scripts\python.exe wtf.py
Traceback (most recent call last):
  File "D:\wtf\aiopath\wtf.py", line 11, in <module>
    asyncio.run(main())
  File "C:\ta-buildroot\python-amd64-3.11.6\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\ta-buildroot\python-amd64-3.11.6\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ta-buildroot\python-amd64-3.11.6\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "D:\wtf\aiopath\wtf.py", line 6, in main
    resolved_path = await current_dir.resolve()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\wtf\aiopath\.venv\Lib\site-packages\aiopath\path.py", line 560, in resolve
    s: str | None = await self._flavour.resolve(self, strict=strict)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\wtf\aiopath\.venv\Lib\site-packages\aiopath\flavours.py", line 107, in resolve
    s = self._ext_to_normal(await _getfinalpathname(s))
        ^^^^^^^^^^^^^^^^^^^
AttributeError: '_AsyncWindowsFlavour' object has no attribute '_ext_to_normal'

aiopath==0.6.11 + python 3.11.13 linux

stas@stasbox64gb:~/tmp/aiopath$ ./.venv/bin/python wtf.py
Traceback (most recent call last):
  File "/home/stas/tmp/aiopath/wtf.py", line 11, in <module>
    asyncio.run(main())
  File "/usr/lib64/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/stas/tmp/aiopath/wtf.py", line 6, in main
    resolved_path = await current_dir.resolve()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/stas/tmp/aiopath/.venv/lib64/python3.11/site-packages/aiopath/path.py", line 571, in resolve
    obj = self._from_parts((normed,), init=False)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PurePath._from_parts() got an unexpected keyword argument 'init'

aiopath==0.5.1 — 0.6.10 + python 3.11.6 windows
(except versions broken in install, see below)

D:\wtf\aiopath>.\.venv\Scripts\python.exe wtf.py
Traceback (most recent call last):
  File "D:\wtf\aiopath\wtf.py", line 2, in <module>
    from aiopath import Path
  File "D:\wtf\aiopath\.venv\Lib\site-packages\aiopath\__init__.py", line 2, in <module>
    from .path import AsyncPath, AsyncPurePath, AsyncWindowsPath, \
  File "D:\wtf\aiopath\.venv\Lib\site-packages\aiopath\path.py", line 2, in <module>
    from pathlib import PosixPath, WindowsPath, _NormalAccessor, \
ImportError: cannot import name '_NormalAccessor' from 'pathlib' (C:\ta-buildroot\python-amd64-3.11.6\Lib\pathlib.py)

aiopath==0.5.1 — 0.6.10 + python 3.11.13 linux

Traceback (most recent call last):
  File "/home/stas/tmp/aiopath/wtf.py", line 2, in <module>
    from aiopath import Path
  File "/home/stas/tmp/aiopath/.venv/lib64/python3.11/site-packages/aiopath/__init__.py", line 2, in <module>
    from .path import AsyncPath, AsyncPurePath, AsyncWindowsPath, \
  File "/home/stas/tmp/aiopath/.venv/lib64/python3.11/site-packages/aiopath/path.py", line 2, in <module>
    from pathlib import PosixPath, WindowsPath, _NormalAccessor, \
ImportError: cannot import name '_NormalAccessor' from 'pathlib' (/usr/lib64/python3.11/pathlib.py)

Lot of versions aiopath==0.6.8 - broken on install on windows and linux

D:\wtf\aiopath>.venv\Scripts\python -m pip install aiopath==0.6.8
Collecting aiopath==0.6.8
  Obtaining dependency information for aiopath==0.6.8 from https://files.pythonhosted.org/packages/e8/7e/f11b16629ce284831b50ded98b6769933de5ebc16fefea32565187d836fe/aiopath-0.6.8-py2.py3-none-any.whl.metadata
  Using cached aiopath-0.6.8-py2.py3-none-any.whl.metadata (9.7 kB)
Collecting aiofile==3.5.1 (from aiopath==0.6.8)
  Using cached aiofile-3.5.1.tar.gz (12 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
  ╰─> [1 lines of output]
      error in aiofile setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>3.4.*'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: There was an error checking the latest version of pip.

aiopath==0.5.8 - broken on install

D:\wtf\aiopath>.venv\Scripts\python -m pip install aiopath==0.5.8
Collecting aiopath==0.5.8
  Obtaining dependency information for aiopath==0.5.8 from https://files.pythonhosted.org/packages/2d/fb/34efc81d41f10a51c3bd11ac26e1e9d01842a610a932c985425c5c02979a/aiopath-0.5.8-py2.py3-none-any.whl.metadata
  Downloading aiopath-0.5.8-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting aiofile==3.5.1 (from aiopath==0.5.8)
  Using cached aiofile-3.5.1.tar.gz (12 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
  ╰─> [1 lines of output]
      error in aiofile setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: '>3.4.*'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: There was an error checking the latest version of pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载