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

Fix FTP write functionality by sending additional FTP command #781

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

beck3905
Copy link
Contributor

@beck3905 beck3905 commented Aug 30, 2023

Fix FTP write functionality by sending additional FTP command

Motivation

Writing to an FTP server will fail because ASCII is not supported, but the existing ftp module does not correctly store data in binary mode.

Based on the builtin ftplib.FTP.storbinary() method, sending an additional TYPE I command to the FTP server will set the STOR command to binary mode and allow the write operation to proceed.

Fixes #780

@mpenkov
Copy link
Collaborator

mpenkov commented Sep 2, 2023

Looks good to me. Thanks!

@mpenkov mpenkov merged commit a0c870a into piskvorky:develop Sep 2, 2023
21 checks passed
@mpenkov mpenkov added the bug label Sep 2, 2023
@beck3905
Copy link
Contributor Author

beck3905 commented Sep 5, 2023

@mpenkov Thank you. Is there a new release scheduled for this?

@mpenkov
Copy link
Collaborator

mpenkov commented Sep 6, 2023

I'll try to release within one or two weeks.

I'd like to get #748 merged in first.

@mpenkov
Copy link
Collaborator

mpenkov commented Sep 6, 2023

(if you're able to help, please see the discussion in that thread)

beck3905 added a commit to beck3905/smart_open that referenced this pull request Sep 6, 2023
mpenkov pushed a commit that referenced this pull request Sep 7, 2023
* fix: ignore seek requests to the current position

* fix: adjust test to match new seek behavior

* run seek if it is the first time

* Add required import for example to work (#756)

If a person were to simply copy this code block it would use the built in `open` and would not work. Adding in the correct import makes this block a bit easier for a simple copy paste.

* run tests on py3.11 (#774)

* add type command to ftp (#781)

* Add python 3.11 to setup.py (#775)

* Fixes KeyError when retrieving empty but existing object from S3 (#771)

* fix: Fixes KeyError when retrieving empty file from S3

* Add test

* bugfix: when read size > chunk size, return read size and not chunk size (#767)

* undo formatting

* fix whitespace

* undo formatting

---------

Co-authored-by: Rusty Conover <rusty@conover.me>
Co-authored-by: Christian Jensen <christian@orbik.com>
Co-authored-by: tooptoop4 <33283496+tooptoop4@users.noreply.github.com>
Co-authored-by: Raphaël Cohen <raphael.cohen.utt@gmail.com>
Co-authored-by: Ron Reiter <ron.reiter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants