Skip to content
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

File Descriptor Not Closed For File Parameter #378

Closed
blaw859 opened this issue Oct 9, 2023 · 2 comments
Closed

File Descriptor Not Closed For File Parameter #378

blaw859 opened this issue Oct 9, 2023 · 2 comments
Milestone

Comments

@blaw859
Copy link

blaw859 commented Oct 9, 2023

In RequestsKeywords.py there is a comment on line 51 # file descriptors should be closed for files parameter as well

As far as I am aware this is not happening, for example if you open a file for streaming, put it in a tuple with its filename, then in a dictionary where the name maps to this tuple. If you passed this dictionary to the PUT request using kwargs, files=my_dict the file descriptor for the file object created would never be closed

Apologies if this issue already exists elsewhere as the comment seems to imply it would, however I could not find it

@lucagiove
Copy link
Member

I think that I should have added a FIXME prefix, I don't recall but probably I added it when I discover that file descriptors can be passed to files parameters as well. Indeed the commit where I added it is where I used this feature for a test.

@lucagiove lucagiove added this to the 0.9 milestone Apr 7, 2024
lucagiove added a commit that referenced this issue Apr 7, 2024
…sed-for-file-parameter

fix: files descriptors not closed in files param #378
@lucagiove
Copy link
Member

try with the new version and let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants