Eli Schwartz
4b280adcc9
py3: more work towards universal __future__s
2019-07-23 17:30:38 -04:00
Eli Schwartz
2212dfc649
fix imports from the wrong module
...
when module_a.submodule_a imports module_b, then module_c should not use
"from module_a.submodule_a import module_b"
2019-07-23 17:29:48 -04:00
Eli Schwartz
b9fb80d9b0
use raw strings where possible to avoid escaping issues
2019-07-23 17:29:48 -04:00
Kovid Goyal
80c6de0eb9
LIT Output: Fix regression in 3.41 caused by py3 porting that broke conversion of some files to LIT. Fixes #1837561 [Lit conversion error (Conversion options changed from default)]( https://bugs.launchpad.net/calibre/+bug/1837561 )
2019-07-23 20:08:12 +05:30
Eli Schwartz
4694efcfc9
Open With: don't raise KeyError if cache exists and there are new dirs
...
If the cache failed to load, it is initialized as a defaultdict and all
mtimes compare as 0. If the cache did load, however, then an ordinary
dict was used, and if new icon directories appeared on the system since
the cache creation, they would raise a KeyError and Open With would not
load data.
Fix by using a defaultdict in all cases, but initializing with the
contents of the cache if possible.
Discovered when crazy applications added crazy subdirectories in
/usr/share/pixmaps (???) and suddenly calibre failed to do the right
thing, but the same should apply if the system adds a new icon theme.
2019-07-23 01:11:19 -04:00
Kovid Goyal
acc6beaad8
Preferences->Ignored devices: Add a button to reset the list of devices that calibre is allowed to manage
2019-07-20 14:59:54 +05:30
Zbigniew Jędrzejewski-Szmek
9480360bc8
py3: another warning about invalid escape
2019-07-19 16:26:02 +02:00
Zbigniew Jędrzejewski-Szmek
0156785a14
py3: fix invalid escapes
...
python3.8 warns about strings which try to escape characters which do
not need that. To avoid the warning, the backslash should be escaped.
(Behaviour is functionally the same, so e.g. '\$' is still the same as
r'\$', except for the warning.)
2019-07-19 16:22:21 +02:00
Kovid Goyal
90714baef8
version 3.46.0
2019-07-19 08:49:21 +05:30
Kovid Goyal
54094a9fa7
Fix #1837102 ["Toolbox and Menu" configuration window jumps around on descriptions]( https://bugs.launchpad.net/calibre/+bug/1837102 )
2019-07-19 08:36:03 +05:30
Kovid Goyal
f7aace3ff8
py3: Another __future__ import
2019-07-18 09:01:37 +05:30
Kovid Goyal
ed06633253
Manage tags dialog: When searching for a tag also search the "Was" column to see if the original tag name matches. Fixes #1836813 [[Enhancement]Tag Manager edits lost with Find]( https://bugs.launchpad.net/calibre/+bug/1836813 )
2019-07-18 08:57:03 +05:30
Kovid Goyal
449240222b
Fix a regression that broke msgfmt for non-ascii strings in 3.45 on python2
2019-07-17 18:22:36 +05:30
Kovid Goyal
78f1896c69
Windows: Fix calibre-server --manage-users not working correctly
...
Apparently when running in the windows command prompy raw_input()
returns a trailing carriage return
2019-07-17 14:53:29 +05:30
Kovid Goyal
2a6e7ea82d
MOBI Input: Fix conversion of MOBI files with malformed markup and embeded <guide> tags not working. Fixes #1836548 [Private bug]( https://bugs.launchpad.net/calibre/+bug/1836548 )
2019-07-15 22:34:20 +05:30
Kovid Goyal
8dc5c82fa0
more py3 porting
...
Also DRYer the socket addresses creation
2019-07-15 22:10:53 +05:30
Kovid Goyal
8d73d33733
Print out failing IPC address
2019-07-15 21:41:00 +05:30
Kovid Goyal
ae02e93b22
Edit book: Allow the search expression history to remember very short terms and also preserve leading and trailing whitespace
...
Fixes #1836559 [leading and trailing spaces are trimmed from old search and replace values in e-book editor](https://bugs.launchpad.net/calibre/+bug/1836559 )
2019-07-15 18:14:55 +05:30
Kovid Goyal
e06d268dad
Ignore --auto-reload if --manage-users is specified
2019-07-15 09:56:29 +05:30
Kovid Goyal
c1e6aca8e0
Fix a regression in 3.45.0 caused by py3 porting that broke rasterization of SVG images when converting to formats such as MOBI that do not support SVG. Fixes #1836463 [Private bug]( https://bugs.launchpad.net/calibre/+bug/1836463 )
2019-07-15 09:21:22 +05:30
Kovid Goyal
bae5d86600
Remove the pipelining test
...
HTTP 1.1 pipelining is not used by any major HTTP clients
and the internal state hackery required to make the HTTPCOnnection class
do it was fragile on python 3, making the test flakey
2019-07-15 09:05:39 +05:30
Kovid Goyal
cb14986b8d
Fix a regression in 3.45.0 that broke parsing of old-style .py config files
...
unicode_literals means we now have to mark bytestrings explicitly before
trying to exec the source
2019-07-14 15:24:01 +05:30
Kovid Goyal
312332a847
version 3.45.2
2019-07-12 20:23:35 +05:30
Kovid Goyal
3d3b469572
Get rid of remaining uses of expanduser from calibre.utils.filenames
...
os.path.expanduser is now monkeypatched at startup on windows.
2019-07-12 20:21:14 +05:30
Kovid Goyal
ad3156a58f
Fix a regression caused by py3 porting that is preventing calibre from starting up on windows machines with non UTF-8 locales. Fixes #1836360 [no RUN ver 3.45.0 or 3.45.1]( https://bugs.launchpad.net/calibre/+bug/1836360 )
...
os.path.expanduser is broken in python2. When passed a unicode object it
concatenates it to a bytestring, which will lead to UnicodeDecodeError
if the bytestring happens to not be in the default encoding, ususally
UTF-8
2019-07-12 20:10:40 +05:30
Kovid Goyal
a5bf5344ec
version 3.45.1
2019-07-12 13:49:12 +05:30
Kovid Goyal
15f69b8fa3
Clean up usage of app uids on windows
2019-07-12 13:43:48 +05:30
Kovid Goyal
f09f10ab8b
Fix incorrect conversion of python unicode objects to wchar_t strings in the winutil module
...
This fixes the various strange windows specific errors or viewer/editor
shutdown in windows
2019-07-12 13:42:33 +05:30
Kovid Goyal
e52d62e71d
Fix ordered_dither not building on older gcc
2019-07-12 06:17:01 +05:30
Kovid Goyal
44fe5e7793
Fix some warnings from sphinx
2019-07-12 05:52:29 +05:30
Kovid Goyal
36ff1b15b8
py3: port a bunch of places where individual byes are accessed from a bytestring
2019-07-12 05:52:07 +05:30
Kovid Goyal
1b0ce5c17f
version 3.45.0
2019-07-12 04:55:42 +05:30
Kovid Goyal
081f4989b7
pep8
2019-07-11 14:10:39 +05:30
Kovid Goyal
b0d18ffb41
Content server: Allow adding or removing formats to a book via the edit metadata page. Fixes #1831304 [Request: Delete Formats on Content Server]( https://bugs.launchpad.net/calibre/+bug/1831304 )
2019-07-10 10:41:22 +05:30
Kovid Goyal
46afc39739
misc fixes for last py3 merge
2019-07-07 19:03:41 +05:30
Kovid Goyal
ec4d9f109d
Remove unused code
2019-07-07 18:44:28 +05:30
Kovid Goyal
b86e9f0f27
py3: Various MOBI fixes found while reviewing the previous py3 merge
2019-07-07 18:14:13 +05:30
Kovid Goyal
134692af38
Merge branch 'py3' of https://github.com/eli-schwartz/calibre
2019-07-07 10:31:51 +05:30
Kovid Goyal
224d35cb79
EPUB Output: If there are no guide elements do not output an empty guide tag. Makes the asinine epubcheck happy. Fixes #1835560 [epub file fails at epub check]( https://bugs.launchpad.net/calibre/+bug/1835560 )
2019-07-07 09:11:59 +05:30
Eli Schwartz
cc30b3f408
py3: port oeb rasterize string types
...
The problem is I'm not sure what manifest's item.data is supposed to be.
The docs for calibre.ebooks.oeb.base.Manifest.Item.data say "it should
be a str type", but that doesn't seem to make sense for a binary file
(at least for python3). More likely it should be a string_or_bytes, and
consumers should check whether the item data is an instance of bytes
(which it should be for image files that aren't representable as decoded
bytes).
2019-07-05 16:51:45 -04:00
Eli Schwartz
73ea548159
py3: name for file-from-fd is unneeded, since py3 won't show it anyway
...
"Changed in version 3.2: Ignore name attribute."
2019-07-05 16:51:45 -04:00
Eli Schwartz
de17dd27c9
use context managers to open files where possible
2019-07-05 16:51:45 -04:00
Eli Schwartz
31bd771cf9
misc cleanup
2019-07-05 16:51:45 -04:00
Eli Schwartz
2d3d1aca50
py3: more work towards universal __future__s
2019-07-05 16:51:45 -04:00
Eli Schwartz
436f864371
py3: use unicode_literals string type in dynamically updated code
2019-07-05 16:51:45 -04:00
Eli Schwartz
6ca1739d6b
use raw strings where possible to avoid escaping issues
2019-07-05 16:51:45 -04:00
Kovid Goyal
7f978f859c
Use a less intrusive workaround for the Linux kernel bug causing Kindle disconnects
2019-07-04 11:01:50 +05:30
Kovid Goyal
f27b3d7c28
py3: More unicode literals porting
2019-07-03 18:09:15 +05:30
Kovid Goyal
e2b51378ad
...
2019-07-02 16:20:46 +05:30
Kovid Goyal
8088902fa8
Workaround for sortByColumn being partially broken in Qt 5.13.0
...
Fixes #1834989 [Qt 5.13 seems to break sorting the book list](https://bugs.launchpad.net/calibre/+bug/1834989 )
2019-07-02 16:18:16 +05:30