Eli Schwartz
24f504f16b
python3: remove more cStringIO
2019-03-26 16:12:18 -04:00
Eli Schwartz
4919373608
python3: do not decode uuid4 hex, as it is always a str()
2019-03-26 16:12:18 -04:00
Eli Schwartz
9023ea8947
python3: add Cookie wrapper to polyglot
2019-03-26 16:12:18 -04:00
Eli Schwartz
97ab4acce5
python3: reduce use of cmp when key can be used instead
...
cmp does not exist on python3
2019-03-26 16:12:17 -04:00
Eli Schwartz
06d8560ab2
remove unused files which import non-existing code
2019-03-26 16:12:17 -04:00
Eli Schwartz
67f3ca17dd
test: add test to try importing every file
...
The testsuite does not currently exercise every file, but we can at
least try importing it to make sure it isn't obviously broken. This
additionally helps to iterate through python3 syntax-level
incompatibilities.
2019-03-26 16:12:17 -04:00
Eli Schwartz
564f053c02
python3: add reprlib wrapper to polyglot
2019-03-26 15:49:40 -04:00
Eli Schwartz
696afe85bd
python3: convert filter iterables to list in order to access as a list
2019-03-26 15:49:40 -04:00
Eli Schwartz
2c156d3000
test: fix broken netifaces check
...
This will always return True on python2
[] > 1
On python3 it is instead an error, because you cannot compare a list to
an int -- instead, we want to compare the length of the returned list,
to see how many interfaces are available.
2019-03-26 15:49:40 -04:00
Eli Schwartz
2271463d27
python3: don't require bytestring for unrardll comments
...
unrardll explictly decodes to unicode
Note: unrar.py already uses unicode_literals
2019-03-26 15:49:40 -04:00
Eli Schwartz
b6d4442b23
python3: mark bytestring as needed
2019-03-26 15:49:40 -04:00
Eli Schwartz
7196fa0773
python3: mark zlib plugin as only existing on python2
...
Fixes test failure due to checking whether all plugins work, and
considering this a plugin even though it is not.
2019-03-26 15:49:40 -04:00
Eli Schwartz
6d6509df57
python3: make qt image test work on python3
...
QByteArrays are natively bytes and ended up looking like this: u"b'xpm'"
Instead use the builtin method to get the data back, and decode it to
unicode.
2019-03-26 15:49:39 -04:00
Eli Schwartz
727e65a203
python3: add httplib/http.client polyglot wrapper
2019-03-26 15:49:39 -04:00
Eli Schwartz
bfcb301fe3
python3: add httplib/http.client polyglot wrapper
2019-03-26 15:10:40 -04:00
Eli Schwartz
92c621c718
python3: remove deprecated use of contextlib.nested
...
Using `with Foo() as a, Bar() as b:` is introduced in python 2.7 and
deprecates the use of nested(), which is removed entirely in python3
2019-03-26 15:10:40 -04:00
Eli Schwartz
d7410fe7b3
python3: add polyglot wrapper for html.entities/htmlentitydefs
2019-03-26 15:10:40 -04:00
Kovid Goyal
0aee163cf7
...
2019-03-26 18:03:17 +05:30
Kovid Goyal
e1c7ab579d
...
2019-03-26 14:53:32 +05:30
Kovid Goyal
1fed6604e0
py3: port use of raw_input
2019-03-26 14:45:36 +05:30
Kovid Goyal
40d631f39a
Only store tweaks that have been changed from default values
2019-03-26 12:10:02 +05:30
Kovid Goyal
05ef1457e8
Dont store tweaks in a .py file
...
Use a .json file instead. As with the previosu migrations of pickle and
.py config files this causes the settings to become disjoint if an
upgrage/downgrade is done.
2019-03-26 11:25:15 +05:30
Kovid Goyal
9cecd227bc
Fix #1821635 [scrolling in flow mode (under page flip/scrolling options) percentages can not be increased over 100%]( https://bugs.launchpad.net/calibre/+bug/1821635 )
2019-03-26 08:05:41 +05:30
Kovid Goyal
48d4c73f88
py3: Fix load_plugin() not handling load failures
2019-03-26 07:57:37 +05:30
Kovid Goyal
1c846769db
...
2019-03-25 21:05:07 +05:30
Kovid Goyal
390b0d45c1
Dont use a python file to store catalog section templates
2019-03-25 20:18:19 +05:30
Kovid Goyal
7bd05cbfeb
Another bs4 incompat to port
2019-03-25 20:01:13 +05:30
Kovid Goyal
d9ab752f94
DRYer
2019-03-25 18:54:01 +05:30
Kovid Goyal
5918acabad
Misc fixes for the last py3 porting merge
2019-03-25 16:03:25 +05:30
Kovid Goyal
c8688930ad
Fix various itervalues() that dict_fixes missed
2019-03-25 15:39:39 +05:30
Kovid Goyal
0fcad5f21f
Fix various uses of iteritems missed by dict_fixes
2019-03-25 15:29:08 +05:30
Kovid Goyal
b0d6aec8ed
Fix breakage caused by dict_six auto-fixes
2019-03-25 15:08:56 +05:30
Kovid Goyal
5d46f5fbeb
Get rid of iterkeys
...
dict.__iter__() is the same as iterkeys on both py2 and py3
2019-03-25 14:31:32 +05:30
Kovid Goyal
7fd70a28e8
Remove unused code
2019-03-25 14:28:09 +05:30
Kovid Goyal
ba70f43118
Fix regressions introduced by autopep8
2019-03-25 13:45:24 +05:30
Kovid Goyal
33cea777ac
Merge branch 'py3' of https://github.com/eli-schwartz/calibre
2019-03-25 13:32:21 +05:30
Kovid Goyal
d115058106
Use the library comments_to_html() function to format comments for e-book catalogs
...
The original massage_comments() function was largely a duplicate and
also did not work with bs4
2019-03-25 13:25:17 +05:30
Kovid Goyal
e178f179e1
...
2019-03-25 11:36:02 +05:30
Kovid Goyal
ba59ac679d
Fix incorrect soup usage in various recipes
...
Also make SoupStrainer available in calibre.ebooks.BeautifulSoup
2019-03-25 10:17:27 +05:30
Kovid Goyal
de9d97d688
Port use of BS for comments_html()
2019-03-25 09:52:45 +05:30
Kovid Goyal
9395c717ed
Fix usages of soup.prettify()
2019-03-24 14:35:58 +05:30
Kovid Goyal
5e097e3ac7
Port use of BS in Kindle and Kobo drivers
2019-03-24 14:23:24 +05:30
Kovid Goyal
2fc337d779
Dont use str(soup)
2019-03-24 13:36:45 +05:30
Kovid Goyal
19d4a453e8
...
2019-03-24 13:23:43 +05:30
Kovid Goyal
296eda53ea
Do not use BeautifulSoup to read HTML tocs
2019-03-24 13:15:50 +05:30
Kovid Goyal
a3c0ce3b24
Do not use BeautifulSoup to postprocess the jacket
...
Avoids an extra parse
2019-03-24 12:41:40 +05:30
Kovid Goyal
3045dc3c71
Port use of BeautifulSoup in LRF output
2019-03-24 12:18:42 +05:30
Kovid Goyal
c8f94a552b
Get rid of soupparser as bs4 has no parser of its own
2019-03-24 12:18:42 +05:30
Kovid Goyal
256c7563b6
Port use of renderContents and BeautifulStoneSoup
2019-03-24 12:18:42 +05:30
Kovid Goyal
c89b656df4
Port usage of BeautifulSoup Tag constructor
2019-03-24 12:18:42 +05:30