Ver código fonte

Remove obsolete __future__ imports (#8337)

tags/v1.21.0rc1
Jonathan de Jong 3 anos atrás
committed by GitHub
pai
commit
837293c314
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
19 arquivos alterados com 2 adições e 40 exclusões
  1. +1
    -0
      changelog.d/8337.misc
  2. +0
    -2
      contrib/cmdclient/console.py
  3. +0
    -2
      contrib/cmdclient/http.py
  4. +0
    -2
      contrib/graph/graph.py
  5. +0
    -2
      contrib/graph/graph3.py
  6. +0
    -2
      contrib/jitsimeetbridge/jitsimeetbridge.py
  7. +1
    -7
      contrib/scripts/kick_users.py
  8. +0
    -2
      scripts-dev/definitions.py
  9. +0
    -2
      scripts-dev/dump_macaroon.py
  10. +0
    -2
      scripts-dev/federation_client.py
  11. +0
    -2
      scripts-dev/hash_history.py
  12. +0
    -2
      scripts/move_remote_media_to_new_store.py
  13. +0
    -2
      scripts/register_new_matrix_user
  14. +0
    -2
      synapse/_scripts/register_new_matrix_user.py
  15. +0
    -2
      synapse/app/homeserver.py
  16. +0
    -1
      synapse/config/emailconfig.py
  17. +0
    -2
      synapse/config/stats.py
  18. +0
    -2
      synapse/storage/databases/main/events_worker.py
  19. +0
    -2
      synapse/util/patch_inline_callbacks.py

+ 1
- 0
changelog.d/8337.misc Ver arquivo

@@ -0,0 +1 @@
Remove `__future__` imports related to Python 2 compatibility.

+ 0
- 2
contrib/cmdclient/console.py Ver arquivo

@@ -15,8 +15,6 @@
# limitations under the License.

""" Starts a synapse client console. """
from __future__ import print_function

import argparse
import cmd
import getpass


+ 0
- 2
contrib/cmdclient/http.py Ver arquivo

@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import json
import urllib
from pprint import pformat


+ 0
- 2
contrib/graph/graph.py Ver arquivo

@@ -1,5 +1,3 @@
from __future__ import print_function

import argparse
import cgi
import datetime


+ 0
- 2
contrib/graph/graph3.py Ver arquivo

@@ -1,5 +1,3 @@
from __future__ import print_function

import argparse
import cgi
import datetime


+ 0
- 2
contrib/jitsimeetbridge/jitsimeetbridge.py Ver arquivo

@@ -10,8 +10,6 @@ the bridge.
Requires:
npm install jquery jsdom
"""
from __future__ import print_function

import json
import subprocess
import time


+ 1
- 7
contrib/scripts/kick_users.py Ver arquivo

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

import json
import sys
@@ -8,11 +7,6 @@ from argparse import ArgumentParser

import requests

try:
raw_input
except NameError: # Python 3
raw_input = input


def _mkurl(template, kws):
for key in kws:
@@ -58,7 +52,7 @@ def main(hs, room_id, access_token, user_id_prefix, why):
print("The following user IDs will be kicked from %s" % room_name)
for uid in kick_list:
print(uid)
doit = raw_input("Continue? [Y]es\n")
doit = input("Continue? [Y]es\n")
if len(doit) > 0 and doit.lower() == "y":
print("Kicking members...")
# encode them all


+ 0
- 2
scripts-dev/definitions.py Ver arquivo

@@ -1,7 +1,5 @@
#! /usr/bin/python

from __future__ import print_function

import argparse
import ast
import os


+ 0
- 2
scripts-dev/dump_macaroon.py Ver arquivo

@@ -1,7 +1,5 @@
#!/usr/bin/env python2

from __future__ import print_function

import sys

import pymacaroons


+ 0
- 2
scripts-dev/federation_client.py Ver arquivo

@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import argparse
import base64
import json


+ 0
- 2
scripts-dev/hash_history.py Ver arquivo

@@ -1,5 +1,3 @@
from __future__ import print_function

import sqlite3
import sys



+ 0
- 2
scripts/move_remote_media_to_new_store.py Ver arquivo

@@ -32,8 +32,6 @@ To use, pipe the above into::
PYTHON_PATH=. ./scripts/move_remote_media_to_new_store.py <source repo> <dest repo>
"""

from __future__ import print_function

import argparse
import logging
import os


+ 0
- 2
scripts/register_new_matrix_user Ver arquivo

@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

from synapse._scripts.register_new_matrix_user import main

if __name__ == "__main__":


+ 0
- 2
synapse/_scripts/register_new_matrix_user.py Ver arquivo

@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import argparse
import getpass
import hashlib


+ 0
- 2
synapse/app/homeserver.py Ver arquivo

@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import gc
import logging
import math


+ 0
- 1
synapse/config/emailconfig.py Ver arquivo

@@ -14,7 +14,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function

# This file can't be called email.py because if it is, we cannot:
import email.utils


+ 0
- 2
synapse/config/stats.py Ver arquivo

@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import division

import sys

from ._base import Config


+ 0
- 2
synapse/storage/databases/main/events_worker.py Ver arquivo

@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import division

import itertools
import logging
import threading


+ 0
- 2
synapse/util/patch_inline_callbacks.py Ver arquivo

@@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import functools
import sys
from typing import Any, Callable, List


Carregando…
Cancelar
Salvar