remove old Python2 __future__ statements

This commit is contained in:
Alexandre Detiste 2024-02-15 16:53:34 +01:00
parent f2f7c1dd48
commit b856238110
238 changed files with 0 additions and 818 deletions

View File

@ -5,10 +5,6 @@
# You can safely skip any of these tests, it'll just appear to "take
# longer" to start the first test as the fixtures get built
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -10,10 +10,6 @@ These tests use Paramiko, rather than Twisted's Conch, because:
2. Its API is much simpler to use.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,12 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import (
print_function,
unicode_literals,
absolute_import,
division,
)
from future.utils import PY2
if PY2:

View File

@ -1,6 +1,5 @@
# -*- python -*-
from __future__ import print_function
"""Monitor a Tahoe grid, by playing sounds in response to remote events.

View File

@ -2,7 +2,6 @@
# This helper script is used with the 'test-desert-island' Makefile target.
from __future__ import print_function
import sys

View File

@ -2,7 +2,6 @@
# This script generates a table of dependencies in HTML format on stdout.
# It expects to be run in the tahoe-lafs-dep-eggs directory.
from __future__ import print_function
import re, os, sys
import pkg_resources

View File

@ -1,4 +1,3 @@
from __future__ import print_function
import sys, os, io, re
from twisted.internet import reactor, protocol, task, defer

View File

@ -29,7 +29,6 @@
# characteristic: 14.1.0 (/Applications/tahoe.app/support/lib/python2.7/site-packages)
# pyasn1-modules: 0.0.5 (/Applications/tahoe.app/support/lib/python2.7/site-packages/pyasn1_modules-0.0.5-py2.7.egg)
from __future__ import print_function
import os, re, shutil, subprocess, sys, tempfile

View File

@ -1,4 +1,3 @@
from __future__ import print_function
"""
Test an existing Tahoe grid, both to see if the grid is still running and to

View File

@ -8,7 +8,6 @@ Runs on Python 3.
Usage: ./check-debugging.py src
"""
from __future__ import print_function
import sys, re, os

View File

@ -4,7 +4,6 @@
#
# bin/tahoe @misc/coding_tools/check-interfaces.py
from __future__ import print_function
import os, sys, re, platform

View File

@ -8,7 +8,6 @@ This runs on Python 3.
# ./check-umids.py src
from __future__ import print_function
import sys, re, os

View File

@ -21,7 +21,6 @@
# Install 'click' first. I run this with py2, but py3 might work too, if the
# wheels can be built with py3.
from __future__ import unicode_literals, print_function
import os, sys, subprocess, json, tempfile, zipfile, re, itertools
import email.parser
from pprint import pprint

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
"""
Given a list of nodeids and a 'convergence' file, create a bunch of files

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
"""Create a short probably-unique string for use as a umid= argument in a
Foolscap log() call, to make it easier to locate the source code that

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
from foolscap import Tub, eventual
from twisted.internet import reactor

View File

@ -1,6 +1,5 @@
# -*- python -*-
from __future__ import print_function
from twisted.internet import reactor
import sys

View File

@ -1,6 +1,5 @@
# -*- python -*-
from __future__ import print_function
"""
# run this tool on a linux box in its own directory, with a file named

View File

@ -2,7 +2,6 @@
# feed this the results of 'tahoe catalog-shares' for all servers
from __future__ import print_function
import sys

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys, re
import urllib

View File

@ -5,7 +5,6 @@
# is left on all disks across the grid. The plugin should be configured with
# env_url= pointing at the diskwatcher.tac webport.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -6,7 +6,6 @@
# used. The plugin should be configured with env_url= pointing at the
# diskwatcher.tac webport.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -5,7 +5,6 @@
# is being used per unit time. The plugin should be configured with env_url=
# pointing at the diskwatcher.tac webport.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -5,7 +5,6 @@
# used on all disks across the grid. The plugin should be configured with
# env_url= pointing at the diskwatcher.tac webport.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -5,7 +5,6 @@
# left before the grid fills up. The plugin should be configured with
# env_url= pointing at the diskwatcher.tac webport.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import sys, os.path

View File

@ -18,7 +18,6 @@
# env.basedir_NODE3 /path/to/node3
#
from __future__ import print_function
import os, sys

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys
import urllib

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys
import urllib

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys
import urllib

View File

@ -4,7 +4,6 @@
# by 'allmydata start', then extracts the amount of memory they consume (both
# VmSize and VmRSS) from /proc
from __future__ import print_function
import os, sys, re

View File

@ -27,7 +27,6 @@
# This plugin should be configured with env_diskwatcher_url= pointing at the
# diskwatcher.tac webport, and env_deepsize_url= pointing at the PHP script.
from __future__ import print_function
import os, sys, urllib, json

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys
import urllib

View File

@ -42,7 +42,6 @@
# of course, these URLs must match the webports you have configured into the
# storage nodes.
from __future__ import print_function
import os, sys
import urllib

View File

@ -32,7 +32,6 @@
# of course, these URLs must match the webports you have configured into the
# storage nodes.
from __future__ import print_function
import os, sys
import urllib

View File

@ -5,7 +5,6 @@
# then extrapolate to guess how many weeks/months/years of storage space we
# have left, and output it to another munin graph
from __future__ import print_function
import sys, os, time
import rrdtool

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import os
import json

View File

@ -18,7 +18,6 @@
# Allmydata-tahoe must be installed on the system where this plugin is used,
# since it imports a utility module from allmydata.utils .
from __future__ import print_function
import os, sys
import commands

View File

@ -1,6 +1,5 @@
#! /usr/bin/python
from __future__ import print_function
import math
from allmydata.util import statistics

View File

@ -1,4 +1,3 @@
from __future__ import print_function
import unittest
from allmydata import provisioning

View File

@ -1,6 +1,5 @@
# -*- python -*-
from __future__ import print_function
"""
Run this tool with twistd in its own directory, with a file named 'urls.txt'

View File

@ -1,4 +1,3 @@
from __future__ import print_function
"""
To use this, get a trace file such as this one:

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
"""
This tool estimates how much space would be consumed by a filetree into which

View File

@ -1,6 +1,5 @@
#!python
from __future__ import print_function
# range of hash output lengths
range_L_hash = [128]

View File

@ -4,7 +4,6 @@
# import time
from __future__ import print_function
import math
from hashlib import md5 # sha1, sha256

View File

@ -2,7 +2,6 @@
# WARNING. There is a bug in this script so that it does not simulate the actual Tahoe Two server selection algorithm that it was intended to simulate. See http://allmydata.org/trac/tahoe-lafs/ticket/302 (stop permuting peerlist, use SI as offset into ring instead?)
from __future__ import print_function
from past.builtins import cmp

View File

@ -1,6 +1,5 @@
#! /usr/bin/env python
from __future__ import print_function
import hashlib
import os, random

View File

@ -1,6 +1,5 @@
#! /usr/bin/env python
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import sys, math
from allmydata import uri, storage

View File

@ -1,6 +1,5 @@
# -*- mode: python -*-
from __future__ import print_function
from distutils.sysconfig import get_python_lib
import hashlib

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -4,10 +4,6 @@ Monkey-patching of third party libraries.
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,9 +1,5 @@
"""Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -3,10 +3,6 @@ CRS encoding and decoding.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -9,10 +9,6 @@ objects that `cryptography` documents.
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -9,10 +9,6 @@ objects that `cryptography` documents.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -3,10 +3,6 @@ Exceptions raise by allmydata.crypto.* modules
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -3,10 +3,6 @@ Utilities used by allmydata.crypto modules
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Authentication for frontends.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -49,10 +49,6 @@ or eat your children, but it might. Use at your own risk.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,9 +1,5 @@
"""Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -4,10 +4,6 @@
Ported to Python 3.
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -4,10 +4,6 @@ on.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -5,10 +5,6 @@ Ported to Python 3.
Note that for RemoteInterfaces, the __remote_name__ needs to be a native string because of https://github.com/warner/foolscap/blob/43f4485a42c9c28e2c79d655b3a9e24d4e6360ca/src/foolscap/remoteinterface.py#L67
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2, native_str
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2, native_str
if PY2:

View File

@ -3,10 +3,6 @@ Manage status of long-running operations.
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -2,10 +2,6 @@
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2, PY3
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2, PY3
if PY2:

View File

@ -1,10 +1,6 @@
"""
Ported to Python 3.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from future.utils import PY2
if PY2:

Some files were not shown because too many files have changed in this diff Show More