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
path.sep goes missing when importing in a debugger in Python 3.10 #1143
Comments
@idanmiara thanks for the report! I expect this could affect rasterio in some ways, too. Fiona 1.9.x no longer pins cython in pyproject.toml, so the sdist is fine. The wheels were probably built with a buggy version of cython. Fiona 1.8.x wheels and sdists will be affected. |
Hi @sgillies I'm understanding that Fiona 1.9 is atill Alpha, and this bug won't be fixed for 1.8 because it pins the buggy Cython version? This bug means that we can't use pytest with stable Fiona on Python 3.10. |
@idanmiara I think a 1.8.22 release is appropriate. It's only the use of Python's development mode that is prevented, no? Or is a future version of pytest switching to requiring development mode? |
I'm not familiar with Python's development mode, but when I run any pytest test in PyCharm with Python 3.10, that imports fiona, it fails with that error.
I did find a workaround, adding the following code at the top of the test makes the test pass:
```
import os.path
sep = os.path.sep
import fiona
os.path.sep = sep
```
…On Mon, 3 Oct 2022, 23:41 Sean Gillies, ***@***.***> wrote:
@idanmiara <https://github.com/idanmiara> I think a 1.8.22 release is
appropriate. It's only the use of Python's development mode that is
prevented, no? Or is a future version of pytest switching to requiring
development mode?
—
Reply to this email directly, view it on GitHub
<#1143 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGJBBLNWSHE4C4DS2WNQ3QTWBNAJLANCNFSM6AAAAAAQ25YPNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Done! |
Hi,
I think I'm encountering the same error as pyproj4/pyproj#1028 but with Fiona instead of pyproj
Also related:
pytest-dev/pytest#9791 (comment)
Expected behavior and actual behavior.
The following code should run without any error:
But, I get the following exception:
Steps to reproduce the problem.
Run the code snippet above in Python 3.10 in debug mode (I use PyCharm)
The problem is reproducible on:
Python 3.10.7 in debug mode
The problem is not reproducible on:
Python 3.10.7 in non-debug mode (normal run)
Python 3.9.12 in either mode
Operating system
For example: Mac OS X 12.6
Fiona and GDAL version and provenance
Fiona 1.8.21 installed from PyPI using pip version 22.2.2.
The text was updated successfully, but these errors were encountered: