-
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
Allow botocore loading from zip #1969
Conversation
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
Codecov Report
@@ Coverage Diff @@
## develop #1969 +/- ##
===========================================
+ Coverage 92.73% 92.73% +<.01%
===========================================
Files 53 53
Lines 10293 10295 +2
===========================================
+ Hits 9545 9547 +2
Misses 748 748
Continue to review full report at Codecov.
|
@stealthycoin @joguSD please review |
Using pkg_resources allows for loading modules from a zip. Original author: Gábor Lipták <gliptak@gmail.com> See: - boto/boto3#1770 - boto#1969
Why was this closed? Is there a different ticket where support for loading |
@andrewdunai I closed my PR as committers didn't show interest |
@stealthycoin @joguSD @jamesls @nateprewitt It's a shame this is not getting enough attention. This functionality basically renders |
I've got the same problem that causes the error on AWS lambda when botocore is packaged within a zip file. I hope this issue could be improved. |
@gliptak AWS can take a tremendously long time to follow up on pull requests. If you don't want to keep your attention on a months-or-years long open pull request, I'd be happy to take it over for you. Unless it's left open, I'm sure AWS will ignore it forever. |
@kojiromike yes I do close my PRs not receiving attention after about a month. Feel free to resubmit. You might have better success |
When attempting to use botocore / boto3 in AWS EMR or PySpark, it's necessary to load from a zipfile. However, botocore does not support this. ``` + PYTHONPATH=botocore.zip:boto3.zip + .venv/bin/python -c 'import boto3; client=boto3.client("rds")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/__init__.py", line 91, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/session.py", line 258, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 827, in create_client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 700, in _get_internal_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 924, in get_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 163, in create_default_resolver File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 132, in _wrapper File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 424, in load_data botocore.exceptions.DataNotFoundError: Unable to load data for: endpoints ``` This is a re-submission of boto#1969 [with permission from @gliptak](boto#1969 (comment)), the original author.
Wow, it's been more than a year. |
When attempting to use botocore / boto3 in AWS EMR or PySpark, it's necessary to load from a zipfile. However, botocore does not support this. ``` + PYTHONPATH=botocore.zip:boto3.zip + .venv/bin/python -c 'import boto3; client=boto3.client("rds")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/__init__.py", line 91, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/session.py", line 258, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 827, in create_client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 700, in _get_internal_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 924, in get_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 163, in create_default_resolver File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 132, in _wrapper File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 424, in load_data botocore.exceptions.DataNotFoundError: Unable to load data for: endpoints ``` This is a re-submission of boto#1969 [with permission from @gliptak](boto#1969 (comment)), the original author.
When attempting to use botocore / boto3 in AWS EMR or PySpark, it's necessary to load from a zipfile. However, botocore does not support this. ``` + PYTHONPATH=botocore.zip:boto3.zip + .venv/bin/python -c 'import boto3; client=boto3.client("rds")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/__init__.py", line 91, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/session.py", line 258, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 827, in create_client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 700, in _get_internal_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 924, in get_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 163, in create_default_resolver File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 132, in _wrapper File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 424, in load_data botocore.exceptions.DataNotFoundError: Unable to load data for: endpoints ``` This is a re-submission of boto#1969 [with permission from @gliptak](boto#1969 (comment)), the original author.
When attempting to use botocore / boto3 in AWS EMR or PySpark, it's necessary to load from a zipfile. However, botocore does not support this. ``` + PYTHONPATH=botocore.zip:boto3.zip + .venv/bin/python -c 'import boto3; client=boto3.client("rds")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/__init__.py", line 91, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/boto3.zip/boto3/session.py", line 258, in client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 827, in create_client File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 700, in _get_internal_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 924, in get_component File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/session.py", line 163, in create_default_resolver File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 132, in _wrapper File "/private/var/folders/4f/2ps6fjrj2kn4klgq638844bc0000gq/T/tmp.TKx8uF60/botocore.zip/botocore/loaders.py", line 424, in load_data botocore.exceptions.DataNotFoundError: Unable to load data for: endpoints ``` This is a re-submission of boto#1969 [with permission from @gliptak](boto#1969 (comment)), the original author.
Signed-off-by: Gábor Lipták gliptak@gmail.com
boto/boto3#1770