Stein Magnus Jodal
0ae6239988
config: Add regression test for format_initial()
2015-07-25 14:23:13 +02:00
Stein Magnus Jodal
d8bcd7f273
Rename mopidy.utils to mopidy.internal
2015-05-07 23:15:56 +02:00
Stein Magnus Jodal
c4940cbea2
autopep8: Add space after class signature/docstring
2015-04-03 00:05:26 +02:00
Thomas Adamcik
b11d89d72f
config: Convert the loglevel schema to a generic map schema
2015-02-25 21:36:59 +01:00
Stein Magnus Jodal
df67d708db
config: Add support for 'all' loglevel
...
Equal to logging.NOTSET or 0 in the logging module.
2015-02-12 18:12:33 +01:00
Lasse Bigum
4bf7a568d1
Check that config is readable
...
Implement a check on file permissions for the config files that are loaded
and print debug if mopidy fails to load it due to missing file file permissions
2015-02-07 17:47:20 +01:00
Thomas Adamcik
ab49d75a45
tests: Fix outstanding flake8 errors in tests
2014-12-30 00:23:08 +01:00
Thomas Adamcik
fa8547c397
tests: Add noqa markers for setUp/tearDown
2014-12-30 00:23:01 +01:00
Stein Magnus Jodal
4f428b8601
py3: Move compat module out of utils
2014-12-07 21:36:15 +01:00
Stein Magnus Jodal
58527406c1
py3: Use compat.text_type instead of unicode
2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
496142c201
py3: Use absolute imports by default
2014-12-07 20:17:10 +01:00
Trygve Aaberge
584484379a
config: Only load .conf-files when loading directories
2014-08-11 16:21:34 +02:00
Trygve Aaberge
9e41eff187
config: Support passing directories to mopidy --config
2014-08-11 14:48:04 +02:00
Stein Magnus Jodal
dda06dd8de
config: Add optional support to Boolean type
2014-07-15 00:33:30 +02:00
Thomas Adamcik
58976ef52d
config: Lists need to handle missing values
2014-06-21 14:11:24 +02:00
Stein Magnus Jodal
b754885064
Fix all import order warnings
2014-05-07 20:08:43 +02:00
Stein Magnus Jodal
c781f77ef3
Rename test files to pattern expected by test runners
2014-01-15 00:01:50 +01:00
Thomas Adamcik
da63942b48
config: Improve handling of Deprecated config values
2013-12-04 22:38:16 +01:00
Thomas Adamcik
26ec956a08
config: Add deprecated config value support.
...
This makes it possible to mark a key as deprecated, this implies it will be
ignored if present, and never included in the resulting config.
2013-11-29 00:15:03 +01:00
Thomas Adamcik
73f91710e1
config: Add postprocessor for converting config back.
...
Idea forward from here is that once we have a config sub command that we expose
a setting config values which will:
1. Run the preprocessor on the file to edit.
2. Load it into config parser.
3. Modify the value.
4. Write it to a io.ByteString
5. Run the postprocessor
6. Save the file with comments etc intact.
2013-10-27 12:30:02 +01:00
Thomas Adamcik
d5cb4282d9
config: Add preprocessor for preserving comments when editing configs.
...
Adds markers to configs files that ensures configparser won't mangle comments
in the files. Will be combined with a postprocessor that undoes these changes.
2013-10-27 11:38:01 +01:00
Stein Magnus Jodal
05d4fa846f
config: Deserialize Secret to unicode ( fix #473 )
...
MPD, Scrobbler, and Spotify extensions have been reviewed for need for changes
due to this, without anything being found.
2013-09-15 23:51:41 +02:00
Stein Magnus Jodal
5c7a496dc2
Fix flake8 warnings
2013-08-08 21:09:01 +02:00
AlexandreP2101
da86015a2b
Correct typo
2013-08-01 08:47:22 +02:00
Alexandre Petitjean
c66e2a5b0f
add some tests about optionnal integer and optionnal+choices string
2013-07-31 23:11:29 +02:00
Stein Magnus Jodal
2ad1bb8bb3
config: Raise ValueError if Path is asked to serialize unicode
...
If we accept unicode and try to encode using sys.getfilesystemencoding() then
it may work most of the time, but will fail if we get non-ASCII chars in the
unicode string and the file system encoding is e.g. ANSI-something because the
locale is C. Thus, I figure it is better to always fail if we try to serialize
Path from unicode strings. Paths should be maintained as bytes all the time.
2013-06-27 00:08:05 +02:00
Stein Magnus Jodal
94ab12b13c
commands: Update override parsing tests
2013-04-30 23:42:53 +02:00
Stein Magnus Jodal
52ee456692
tests: Import unittest directly from the stdlib
2013-04-29 19:45:25 +02:00
Thomas Adamcik
64465d318d
config: Ensure that overrides are bytes
2013-04-28 23:31:41 +02:00
Thomas Adamcik
9974f77f1b
config: Serialize unicode to bytes using sys.getfilesystemencoding()
2013-04-28 23:31:41 +02:00
Thomas Adacmik
9fab339941
config: Add preliminary handling of parse errors
2013-04-28 00:25:28 +02:00
Thomas Adacmik
c5b036f988
config: Add test config with non-ascii
2013-04-28 00:05:36 +02:00
Thomas Adacmik
085b44e52f
path: Update with respect to review comments in #427
2013-04-27 02:21:27 +02:00
Thomas Adamcik
ac7edad86d
config/path: Pass in expanded value in expanded path type
2013-04-25 22:39:06 +02:00
Thomas Adamcik
160a70e6df
path: Only accept bytes as paths
2013-04-25 21:08:33 +02:00
Thomas Adamcik
2f8bc32c14
config: Remove ExtensionConfigSchema
2013-04-24 23:39:14 +02:00
Thomas Adamcik
b7232797ea
config/ext: Accept unicode defaults
2013-04-24 23:31:39 +02:00
Thomas Adamcik
cde84748f7
config: Create config.format and switch to just serialize on schemas
2013-04-16 22:36:58 +02:00
Thomas Adamcik
d8f6886311
config: Set missing/invalid keys to none
2013-04-16 22:19:34 +02:00
Thomas Adamcik
f0131fdc93
config: Fix serialization of none
2013-04-16 21:37:55 +02:00
Thomas Adamcik
ee40f0385a
config: Remove format from types API
2013-04-16 21:37:54 +02:00
Thomas Adamcik
211379a01c
config: Unknown loglevels should serialize to blank string
2013-04-16 00:13:57 +02:00
Thomas Adamcik
78d3888dd1
config: Remove ConfigErrors expception
2013-04-15 23:09:19 +02:00
Thomas Adamcik
51f89017fe
config: Fix handling of None in Secret
2013-04-15 21:16:19 +02:00
Thomas Adamcik
f5cd806dc5
config: Rename convert to deserialize
2013-04-15 21:16:19 +02:00
Thomas Adamcik
e4873c4516
config: Return convereted values and errors
2013-04-15 21:16:18 +02:00
Thomas Adamcik
ee57eb58a3
config: Strict config value init kwargs, also adds Secret
2013-04-15 00:07:31 +02:00
Thomas Adamcik
4826dc7cac
config: Support lists in required validator
2013-04-15 00:07:07 +02:00
Thomas Adamcik
805733a2aa
config: Make tests discoverable and fix broken ones
2013-04-14 23:52:39 +02:00
Thomas Adamcik
d5b8f2ab02
config: Make List use proper encode/decode helpers
2013-04-14 17:50:16 +02:00