alexdelorenzo / aiopath

📁 Asynchronous pathlib for Python
https://alexdelorenzo.dev
GNU Lesser General Public License v3.0
162 stars 6 forks source link

Looks like 0.5.7 has broken things #16

Closed primal100 closed 3 years ago

primal100 commented 3 years ago

Tested with python 3.8 and Python3.9. Works ok on aiopath 0.5.6

async for path in AsyncPath('.').glob():
    print(path)
TypeError: func_to_async_func() takes 1 positional argument but 2 were given
await f.read_text()
    async with self.open('r', encoding=encoding, errors=errors) as file:
AttributeError: __aexit__
bronsen commented 3 years ago

Can confirm.

Also this (from my CI):

>     async with self.open('r', encoding=encoding, errors=errors) as file:
E     AttributeError: __aenter__

Downgrading aiopath to 0.5.6 shows no such errors.

lopisan commented 3 years ago

Same for me - 0.5.7 is broken, 0.5.6 works. Same error as @bronsen

alexdelorenzo commented 3 years ago

Thanks for submitting bug reports, @primal100, @bronsen and @lopisan. Sorry for breaking aiopath on you!

I've added new tests here so that this doesn't happen again.

Version 0.5.11 on PyPI will fix your issues. You can install it like so:

python3 -m pip install aiopath==0.5.11
bronsen commented 3 years ago

Indeed aiopath 0.5.11 no longer raises the AttributeError during CI run.

alexdelorenzo commented 3 years ago

Glad to hear it, @bronsen.

I'm going to close this issue, feel free to comment again if anyone is still affected by this issue.