37667 Commits

Author SHA1 Message Date
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
Kovid Goyal
692230147c
Start work on porting to beautifulsoup4 2019-03-24 12:18:42 +05:30
Kovid Goyal
78b7112012
Fix using --insert-metadata with ebook-convert not inserting the title and author metadata from the source document 2019-03-24 12:17:21 +05:30
Eli Schwartz
4f545af415
autopep8 2019-03-24 01:18:27 -04:00
Eli Schwartz
a623717d96
python3: apply various fixes from python-modernize "dict_six"
Imports were then fixed and consolidated to derive from the internal
polyglot.builtins
2019-03-24 01:18:27 -04:00
Eli Schwartz
13d236f556
python3: make recent_uas build 2019-03-24 00:54:58 -04:00
Eli Schwartz
a7bbf0f51e
flake8: uniformly ignore unused polyglot imports
No need to have files where every single line contains the trailing
comment "noqa"
2019-03-24 00:54:58 -04:00
Eli Schwartz
f61dcf6b1a
python3: more BytesIO 2019-03-24 00:54:58 -04:00
Eli Schwartz
69711828bd
python3: make lopen a direct alias for the builtin open
Thanks to PEP 0446, its reason to exist no longer applies and it is the
default behavior. However, trying to use it on python3 resulted in
errors since "e" is no longer a valid open() mode.
2019-03-24 00:54:58 -04:00
Eli Schwartz
09e97e5af1
setup: don't report full pathname when creating msgpack'ed resources
The full pathname in the log info was introduced as a side effect of
moving off of pickle.
2019-03-24 00:23:15 -04:00
Eli Schwartz
391ca722e0
python3: PEP 3114 compliance for next() and iterators 2019-03-24 00:23:15 -04:00
Eli Schwartz
9ecadb9c13
python3: use exec() instead of execfile() 2019-03-24 00:23:15 -04:00
Kovid Goyal
c68a5c8ab1
Port Tag creation in recipes to work with any version of BeautifulSoup 2019-03-23 08:06:25 +05:30
Kovid Goyal
930624d2be
pep8 2019-03-22 23:48:01 +05:30
Kovid Goyal
5755625d1e
Get rid of has_key from all recipes 2019-03-22 23:47:49 +05:30
Kovid Goyal
3c86c9be6f
pep8 2019-03-21 20:40:28 +05:30
Kovid Goyal
df0e052c08
Update 1843 2019-03-21 20:33:52 +05:30
Kovid Goyal
47ed2df137
Various fixes for the latest py3 commit 2019-03-21 18:33:19 +05:30
Kovid Goyal
9f31662571
Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-03-21 18:15:34 +05:30
Eli Schwartz
d66fdc2df7
autopep8 2019-03-21 01:27:21 -04:00
Eli Schwartz
cb85e778d8
python3: fix various uses of itertools.i(map|zip)
Use the existing polyglot.builtins / future_builtins versions.
Also smooth over izip_longest, but don't bother with another polyglot
module for one function used in two places.
2019-03-21 01:27:21 -04:00
Eli Schwartz
45f68f552b
python3: make coffee build
add polyglot.socketserver wrapper and fix BaseHTTPServer.HTTPServer
2019-03-21 01:27:21 -04:00
Eli Schwartz
c940d9941a
python3: make kakasi build
Since these are all being opened as non-binary, it makes no sense to
then immediately decode them.
2019-03-21 00:23:43 -04:00
Eli Schwartz
8aceae428e
py3: make setup.py gui work
Apparently compileUi explicitly opens the file/buffer as unicode, not
bytes, and then writes a unicode header string (containing the source
file). So the previous attempt to use BytesIO was wrong in this case.

Also images.qrc is being constructed completely in the right here and
now from a bunch of unicode strings, so just use exactly that.
2019-03-20 23:56:30 -04:00
Eli Schwartz
8e125b56a0
python3: listify the range() generator before appending to it
We explicitly need a list here.
2019-03-20 23:56:30 -04:00
Kovid Goyal
9386839320
Various ixes for the previous polyglot commit 2019-03-20 21:11:45 +05:30
Kovid Goyal
1ea8b07078
Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-03-20 20:08:13 +05:30
Eli Schwartz
e828a4bd98
python3: more use of unicode_type
These metadata sources files are part of the infrastructure, not the
parts which are downloaded.
2019-03-20 08:44:26 -04:00
Eli Schwartz
83b055122a
python3: add polyglot.queue wrapper 2019-03-20 08:44:23 -04:00
Eli Schwartz
ea6a210e70
python3: wire up more code to polyglot.http_server 2019-03-20 08:43:58 -04:00
Eli Schwartz
8594f52fe8
python3: add more urllib wrappers 2019-03-20 08:43:54 -04:00
Eli Schwartz
1653c790db
remove dead code
Initially added in commit c1ef643b8ed6c1740438692e345761a401fea1af but I
cannot tell what it was ever used for.
2019-03-20 08:43:22 -04:00
Eli Schwartz
2d382274cd
py3: gettext no longer has a unicode= argument
This is unicode by default "since there's no point in translating to
byte strings." Good riddance.
2019-03-20 08:43:22 -04:00
Kovid Goyal
042d740593
... 2019-03-20 15:02:31 +05:30
Kovid Goyal
ae735b2ea3
De-vendor html2text 2019-03-20 14:42:46 +05:30
Kovid Goyal
40a12c31c1
Remove unused code 2019-03-20 10:41:19 +05:30
Kovid Goyal
d02a6ea36a
Remove unused code 2019-03-19 18:00:20 +05:30
Kovid Goyal
c4d30dd75f
Misc fixes for the cStriongIO -> io commit 2019-03-19 17:58:16 +05:30
Kovid Goyal
0801ce96a5
Merge branch 'stringio' of https://github.com/eli-schwartz/calibre 2019-03-19 17:55:38 +05:30
Kovid Goyal
ac5f1e9039
... 2019-03-19 12:35:12 +05:30
Kovid Goyal
f760326ed2
Fix #1820549 [Ampersand is not escaped from strings on right-click menu](https://bugs.launchpad.net/calibre/+bug/1820549) 2019-03-19 12:21:22 +05:30
Kovid Goyal
14e4682f29
Fix #1820548 [Backups backtrace](https://bugs.launchpad.net/calibre/+bug/1820548) 2019-03-18 07:34:36 +05:30
Kovid Goyal
651344027c
Nicer error message if the progress_indicator plugin fails to load 2019-03-17 20:18:06 +05:30
Kovid Goyal
dc4c444a71
Handle passing str to json_loads 2019-03-17 20:07:22 +05:30
Kovid Goyal
7d7731f5d0
... 2019-03-17 19:46:58 +05:30
Eli Schwartz
c1fb63378f python3: migrate lots of code to io.(Bytes|String)IO instead of c?StringIO
This is the only IO representation on python3, and it is backported to
python2 to aid in porting but requires determining whether to handle
bytes or unicode...  which is sort of the point of porting, so let's
handle this properly everywhere we can.
2019-03-17 09:15:02 -04:00
Eli Schwartz
0b252e8659 palmdoc: consistently use bytes when writing to the buffer 2019-03-17 09:15:02 -04:00