Package: trickle
Version: 1.07-10.1+b1
Followup-For: Bug #824513

This also affects the transition from Python 2 to Python 3.

The attached program ‘upload_file.py’ attempts to upload a file to an
FTP service.

When run under ‘strace’, it is evident that:

* Python 2 opens the FTP data socket with type ‘SOCK_STREAM’.

* Python 3 opens the FTP data socket with type ‘SOCK_STREAM|SOCK_CLOEXEC’.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_AU.UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set 
to en_AU.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages trickle depends on:
ii  libbsd0         0.8.7-1
ii  libc6           2.26-4
ii  libevent-2.1-6  2.1.8-stable-4

trickle recommends no packages.

trickle suggests no packages.

-- no debconf information

-- 
 \      “Anyone who believes exponential growth can go on forever in a |
  `\        finite world is either a madman or an economist.” —Kenneth |
_o__)                                                   Boulding, 1973 |
Ben Finney <bign...@debian.org>
import ftplib
import io
import os

session = ftplib.FTP()
session.connect("speedtest.tele2.net")
session.login("anonymous")

testfile_size = 10000
testfile = io.BytesIO(os.urandom(testfile_size))

session.cwd("upload")
session.storbinary("STOR testfile", testfile)
session.quit()

Attachment: signature.asc
Description: PGP signature

Reply via email to