mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove backported ipaddress module
This commit is contained in:
parent
e0699fe01a
commit
484fb7e3d7
File diff suppressed because it is too large
Load Diff
@ -5,31 +5,31 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import ssl, socket, select, os, traceback
|
import ipaddress
|
||||||
from io import BytesIO
|
import os
|
||||||
|
import select
|
||||||
|
import socket
|
||||||
|
import ssl
|
||||||
|
import traceback
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from calibre import as_unicode
|
from calibre import as_unicode
|
||||||
from calibre.ptempfile import TemporaryDirectory
|
from calibre.ptempfile import TemporaryDirectory
|
||||||
from calibre.srv.errors import JobQueueFull
|
from calibre.srv.errors import JobQueueFull
|
||||||
from calibre.srv.pool import ThreadPool, PluginPool
|
|
||||||
from calibre.srv.opts import Options
|
|
||||||
from calibre.srv.jobs import JobsManager
|
from calibre.srv.jobs import JobsManager
|
||||||
|
from calibre.srv.opts import Options
|
||||||
|
from calibre.srv.pool import PluginPool, ThreadPool
|
||||||
from calibre.srv.utils import (
|
from calibre.srv.utils import (
|
||||||
socket_errors_socket_closed, socket_errors_nonblocking, HandleInterrupt,
|
DESIRED_SEND_BUFFER_SIZE, HandleInterrupt, create_sock_pair, socket_errors_eintr,
|
||||||
socket_errors_eintr, start_cork, stop_cork, DESIRED_SEND_BUFFER_SIZE,
|
socket_errors_nonblocking, socket_errors_socket_closed, start_cork, stop_cork
|
||||||
create_sock_pair)
|
)
|
||||||
from calibre.utils.socket_inheritance import set_socket_inherit
|
|
||||||
from calibre.utils.logging import ThreadSafeLog
|
from calibre.utils.logging import ThreadSafeLog
|
||||||
from calibre.utils.monotonic import monotonic
|
|
||||||
from calibre.utils.mdns import get_external_ip
|
from calibre.utils.mdns import get_external_ip
|
||||||
|
from calibre.utils.monotonic import monotonic
|
||||||
|
from calibre.utils.socket_inheritance import set_socket_inherit
|
||||||
from polyglot.builtins import iteritems, unicode_type
|
from polyglot.builtins import iteritems, unicode_type
|
||||||
from polyglot.queue import Empty, Full
|
from polyglot.queue import Empty, Full
|
||||||
try:
|
|
||||||
import ipaddress
|
|
||||||
except ImportError:
|
|
||||||
from backports import ipaddress
|
|
||||||
|
|
||||||
|
|
||||||
READ, WRITE, RDWR, WAIT = 'READ', 'WRITE', 'RDWR', 'WAIT'
|
READ, WRITE, RDWR, WAIT = 'READ', 'WRITE', 'RDWR', 'WAIT'
|
||||||
WAKEUP, JOB_DONE = b'\0', b'\x01'
|
WAKEUP, JOB_DONE = b'\0', b'\x01'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user