Commit Graph

13214 Commits

Author SHA1 Message Date
Florian Bruhin
e7dba338b5 Pass %APPDATA% to pyinstaller env
This hopefully helps with PyInstaller creating a ~ directory
2017-09-26 07:30:54 +02:00
Florian Bruhin
5a60630450 Don't use utils.is_* in build_release.py
This partially reverts ef1c83862b
Otherwise, we'd have to have PyQt5 installed in the environment which runs
build_release.py.
2017-09-26 07:25:59 +02:00
Florian Bruhin
e766cf5ed1 build_release: print artifacts if not releasing 2017-09-26 07:13:54 +02:00
Florian Bruhin
6e226c6885 Add a recipes section to configuring.asciidoc
Closes #2987
Closes #2969
Closes #3009
See #2975
2017-09-26 07:08:42 +02:00
Florian Bruhin
38449e3e2b Make sure the autoconfig.yml is saved periodically
Fixes #2982
2017-09-26 06:41:55 +02:00
Florian Bruhin
38038df703 Compare objects with :set with multiple values 2017-09-25 21:24:12 +02:00
Florian Bruhin
1086e31f28 Split up configinit tests 2017-09-25 21:24:12 +02:00
Florian Bruhin
6aed6bca93 Make loading autoconfig.yml opt-in when a config.py exists
This lets the user control the precedence those files should have, and also
simplifies the code quite a bit.

Fixes #2975
2017-09-25 21:24:12 +02:00
Florian Bruhin
930bc9c998 Merge pull request #3032 from forkbong/fix-faq-link
Fix the link to faq.html in help page
2017-09-25 20:13:16 +02:00
Panagiotis Ktistakis
54eb23eab1 Fix the link to faq.html in help page 2017-09-25 20:54:28 +03:00
Florian Bruhin
c7c198b949 Stabilize hint test 2017-09-25 08:22:40 +02:00
Florian Bruhin
07862ce52e Merge branch 'pr/3029' 2017-09-25 06:57:02 +02:00
Florian Bruhin
8408d6ed9b Fix emacs syntax highlighting in configdata.yml 2017-09-25 06:56:33 +02:00
Florian Bruhin
d7273283ce Regenerate docs 2017-09-25 06:55:17 +02:00
Florian Bruhin
40f0f75ad5 Improve error message for duplicate keys in config.py 2017-09-24 19:43:30 +02:00
Florian Bruhin
fb9fca2477 Merge pull request #3017 from rcorre/overwrite-hist-backup
Append multiple history backups on import.
2017-09-24 14:24:53 +02:00
arza
cb68e4b6b2 Remove extra backslashes in configdata.yml 2017-09-23 22:58:30 +03:00
arza
1784dc777d Add table headers and widen input fields in qute://settings 2017-09-23 22:24:17 +03:00
Ryan Roden-Corrent
888a1b8c57 Append multiple history backups on import.
Previously, a successful import of the text history into sqlite would
move 'history' to 'history.bak'. If history.bak already existed, this
would overwrite it on unix and fail on windows.

With this patch, the most recently imported history is appended to
history.bak to avoid data loss.

Resolves #3005.

A few other options I considered:

1. os.replace:
    - fast, simple, no error on Windows
    - potential data loss
2. numbered backups (.bak.1, .bak.2, ...):
    - fast, no data loss, but more complex
3. append each line to the backup as it is read:
    - more efficient than current patch (no need to read history twice)
    - potentially duplicate data if backup fails
2017-09-23 13:06:11 -04:00
Florian Bruhin
b8389e4496 Revert "Fix NUL byte error handling on Python 3.4"
This reverts commit a7d5a98cc4.
Not needed anymore now that we dropped support.
2017-09-22 22:30:02 +02:00
Florian Bruhin
e8ceeceac8 Fix mock check with Python 3.5
Looks like .assert_not_called() doesn't work on function mocks with 3.5.
2017-09-22 22:28:40 +02:00
Florian Bruhin
459bbc3a6f Add configinit to PERFECT_FILES 2017-09-22 20:26:56 +02:00
Florian Bruhin
4e46c34e5a Use .assert_not_called() for mocks 2017-09-22 19:58:38 +02:00
Florian Bruhin
e27c54a5c1 Fix modeparser tests 2017-09-22 19:49:52 +02:00
Florian Bruhin
5be44756e3 Remove unused imports 2017-09-22 17:29:01 +02:00
Florian Bruhin
1e2015be65 Make bindings win over mappings
Fixes #2995
2017-09-22 17:13:17 +02:00
Florian Bruhin
7f4cba8bc2 Improve load_autoconfig docs
Closes #2993
2017-09-22 14:23:41 +02:00
Florian Bruhin
d5a1fff637 Move init stuff from config.py to configinit.py
Closes #2997
2017-09-22 14:11:54 +02:00
Florian Bruhin
d1a4a028cd Use more idiomatic comparison 2017-09-22 13:24:26 +02:00
Florian Bruhin
69d19e49df Fix flake8 2017-09-22 13:20:18 +02:00
Florian Bruhin
501764d1cb Fix documented default values for falsey non-strings
Fixes #3015.
2017-09-22 13:18:27 +02:00
Florian Bruhin
d9a3268405 Explain relationship between 'c' and 'config.set' better
[ci skip]
2017-09-22 11:33:42 +02:00
Florian Bruhin
43ab27634f Fix vulture 2017-09-22 11:07:54 +02:00
Florian Bruhin
7f8ae531aa Add config.configdir and config.datadir to config API.
Fixes #1419
2017-09-22 09:59:46 +02:00
Florian Bruhin
9b22480b07 Raise config.py errors happening in tests 2017-09-22 09:09:45 +02:00
Florian Bruhin
ebf378a945 Add docs about importing modules in config.py 2017-09-22 08:58:41 +02:00
Florian Bruhin
1dbd156c2f Simplify some config.py tests 2017-09-22 08:53:08 +02:00
Florian Bruhin
276b244466 Merge remote-tracking branch 'origin/pr/2970' 2017-09-22 08:37:23 +02:00
Florian Bruhin
10016ae240 Remove unused import 2017-09-22 08:23:06 +02:00
Jay Kamat
43ce10efc3
Simplify and reorganize configfile tests
Also make save/load of sys.path a little more robust
2017-09-22 02:05:55 -04:00
Jay Kamat
4e22b4666d
Convert save-restore of sys to a context-manager
Also improve and simplify tests for save/load of sys.module and sys.path
2017-09-22 02:05:55 -04:00
Jay Kamat
7ddde334da
Add tests for module/path isolation 2017-09-22 02:05:55 -04:00
Jay Kamat
333c0d848b
Restructure save/load of state to be more extensible
Also save/load sys.modules as well
- This is a little rough, but I can't find a better way...
2017-09-22 02:05:54 -04:00
Jay Kamat
0332dce458
Get config path from config.py location, rather than standarddir 2017-09-22 02:05:54 -04:00
Jay Kamat
a2952e13a8
Add qutebrowser config directory to python path
This is done so config.py can import other python files in the config
directory. For example, config.py can 'import theme' which would load
a theme.py.

The previous path is restored at the end of this function, to avoid
tainting qutebrowser's path
2017-09-22 02:05:52 -04:00
Florian Bruhin
c652b0f96c Remove old monkeypatch 2017-09-21 23:59:16 +02:00
Florian Bruhin
f4017eb5b6 Ignore more Python warnings when importing in earlyinit
With a17c4767d6 we moved the first time
pkg_resources is imported to earlyinit.py, which means less warnings were
suppressed.

Fixes #2990
2017-09-21 23:24:22 +02:00
Florian Bruhin
cd9fe57d84 build_release: Also run asciidoc2html on Linux 2017-09-21 23:03:02 +02:00
Florian Bruhin
3f18a5ada7 Update metainfo in setup.py 2017-09-21 22:57:29 +02:00
Florian Bruhin
c74236dd96 Move some data from setupcommon to setup.py
We can't get rid of setupcommon entirely (it's needed by PyInstaller), but at
least we can get the data back to setup.py.

Fixes #2996
2017-09-21 22:54:58 +02:00