-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Fix bug where opening files in GCS forgets to define a name field #506
Conversation
@todor-markov Thank you for making the PR! Can you add a unit test that checks for your new functionality? |
+1 for the PR. I have been messing with this for 2 hours now and this is the exact issue. Could we please speed up the process to get this in. |
Was it working in any version? |
Yes, because of this. |
I am new to smart-open, so, I don't understand why it was working before. Btw, i don't understand the reason for these TODOs in the code. In added logging to my code to find the problem and got TODO multiple times. Was not helpful. |
Thank you for adding the tests. |
This PR adds .name attribute to file objects created by the GCS backend. Previously, this attribute was missing. However, the code that relied on the .name attribute was robust enough to handle its absense.
TODOs serve as a reminder to developers about parts of the code that are incomplete (or require attention for whatever reason). They are not ideal - in retrospect, it would have been better to fix the underlying problem, or create a github ticket to track the issue. Hindsight is always 20/20.
You're welcome to make PRs to make things more helpful. |
Thank you @todor-markov ! Congratulations on your first contribution to smart_open 🥇 |
Motivation
Fixes #505
Checklist
Before you create the PR, please make sure you have: