-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Imports interfere with AWS boto3
#1698
Comments
@jtroe or @achapkowski Can you advise? |
@thehappycheese we do not modify the ssl module at all. It looks like the issue for you is in the botocore library, which powers the boto3 library. |
Hi @achapkowski, I added an update to the boto3 ticket. This does seem to be stemming from how arcgis is mutating the ssl module with truststore in Python 3.10+ by calling |
Created sethmlarson/truststore#121. After talking with Seth offline, it seems the current usage in arcgis may not be what's intended. We can use that issue for tracking upstream, but the remedy for this will probably require adjustment to the current logic in arcgis. It may be useful to reopen this to track that portion. |
Indeed this will require some action on arcgis, we weren't clear enough in the docs about who should be using Arcgis should change its usage from |
@sethmlarson we are using truststore for the python 3.10+ version of python, but this issue is for python 3.7-3.9. |
I think from the details that were provided above, the original report is for Python 3.11.5.
I've been able to reproduce this with just arcgis and urllib3 for all versions of Python 3.10+. |
@achapkowski I can also confirm the issue for Python 3.11.7. |
Having scratched the surface a bit, the situation does seem much more gnarly, and as I understand it:
As an end user of this library and having used arcgis within our Django system, currently the only easy option I have is revert to Python 3.9 for now, though would not be an ideal solution in the long run. Would appreciate some means to have a band-aid hack to maintain at Python 3.11+ if possible. In terms of how arcgis could improve the codebase, my surface level research would lead to two possible solutions:
|
Just checking in to see if there's a fix for this. For now downgrading to Python < 3.10 should work? Can this issue be reopened as it hasn't been solved yet? |
Hi folks, I would like to re-open this issue. The workaround is only available if you work in highly manual environments. And even if you can apply the workaround, it will introduce unnecessary complexity. Is it planned to address the underlying root cause? Minimal reproducible example: import boto3
from arcgis.gis import GIS
s3_client = boto3.client("s3")
# => RecursionError: maximum recursion depth exceeded while calling a Python object |
Describe the bug
Does
arcgis
monkey patch ssl, or do any non standard import behavior?Importing
acrgis
first creates an error when trying to useboto3
.One of the two libraries is doing some badly behaved import side effects. I don't know which?
To Reproduce
Simply import
FeatureLayer
before trying to import and create aboto3
s3 client.I realize this is tricky unless you happen to have some AWS profile configured;
A workaround is to swap the order of imports:
error:
Expected behavior
It should not matter what order these two libraries are imported.
Platform (please complete the following information):
Additional context
I raised the same issue on the boto3 repo: boto/boto3#3912
The text was updated successfully, but these errors were encountered: