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
59e3b9aec3
config: Formatting
2013-06-27 00:07:57 +02:00
Thomas Adamcik
cdbe1c9cd1
config: Review fixes.
2013-05-14 21:24:37 +02:00
Thomas Adamcik
9bd4d90e41
config: Keyring debug logging cleanup
2013-05-14 00:21:05 +02:00
Thomas Adamcik
b88cf4a8b2
config: Integrate keyring values with overrides.
2013-05-13 23:51:17 +02:00
Thomas Adamcik
474600cf2a
config: Add keyring module with fetch and set.
...
New config submodule for fetching secrets from a secrets service over dbus. To
facilitate this we add a section and key to the stored attributes, allowing us
to fetch all mopidy values from the keyring and map them to the correct config
values.
A helper for setting values is also added. Due to differences in in the secrets
dbus API across versions of the APIs and various states of support in the
secrets service we try and open the default, login and finally session
keyrings for storage.
Locked keyrings will be dismissed for all operations.
2013-05-13 23:14:49 +02:00
Stein Magnus Jodal
ddef55e0e5
Merge pull request #441 from jodal/feature/argparse
...
Switch from optparse to argparse
2013-04-30 15:01:02 -07:00
Stein Magnus Jodal
69caea2ef9
command: Move override parsing into module
2013-04-30 23:27:12 +02:00
Thomas Adamcik
2f825b34af
config: Switch to ordered dict
2013-04-30 00:19:59 +02:00
Stein Magnus Jodal
a8f8e9363c
config: Fix flake8 warnings
2013-04-29 21:35:29 +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 Adamcik
3417abfe64
config: Use byte paths in convert code
2013-04-28 23:31:29 +02:00
Thomas Adacmik
4f93f93deb
config: Create read-only config proxy
2013-04-28 01:09:22 +02:00
Thomas Adacmik
9c536d3bbe
Merge branch 'develop' of github.com:mopidy/mopidy into develop
2013-04-28 00:25:35 +02:00
Thomas Adacmik
9fab339941
config: Add preliminary handling of parse errors
2013-04-28 00:25:28 +02:00
Stein Magnus Jodal
33747d76eb
config: Remove dashes in free text config sources
2013-04-28 00:19:13 +02:00
Stein Magnus Jodal
1bd8f9e793
Merge pull request #427 from adamcik/feature/path-as-bytes
...
Enforce that we only want bytes in path related code.
2013-04-27 14:41:13 -07:00
Stein Magnus Jodal
e70474fd14
docs: Add ConfigSchema.serialize() docstring
2013-04-26 20:33:45 +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
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
18ebb56b3e
config: Add logging/config_file
2013-04-17 23:47:18 +02:00
Thomas Adamcik
b8b578e107
config: Add basic saving to convert config
2013-04-16 23:52:22 +02:00
Thomas Adamcik
c35dfb3610
config: Ensure format only produces bytes
2013-04-16 23:52:22 +02:00
Thomas Adamcik
10f0632239
config: Encode any unicode passwords if found
2013-04-16 23:52:21 +02:00
Thomas Adamcik
df9d635db8
config: Print converted settings
2013-04-16 23:52:21 +02:00
Thomas Adamcik
14a09643a0
config: Avoid adding empty sections
2013-04-16 23:52:21 +02:00
Thomas Adamcik
b94890a1c7
config: Start work on mopidy-convert-config
2013-04-16 23:52:20 +02:00
Thomas Adamcik
765f3c5d3c
config: flake8
2013-04-16 23:25:30 +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
08db8829af
config: Move all code to new load function
2013-04-15 23:37:40 +02:00
Thomas Adamcik
78d3888dd1
config: Remove ConfigErrors expception
2013-04-15 23:09:19 +02:00
Thomas Adamcik
ec939d707c
Merge branch 'develop' into feature/config-api-cleanup
...
Conflicts:
mopidy/__main__.py
mopidy/ext.py
2013-04-15 22:54:37 +02:00
Stein Magnus Jodal
cfd9ddf550
config: Fix typo in logger name
2013-04-15 22:43:01 +02:00
Thomas Adamcik
611af060f6
config: Add core_defaults to config
2013-04-15 22:26:45 +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
Stein Magnus Jodal
a9a789aa8a
conf: Rename logging.levels to loglevels
...
Part of #280
2013-04-15 20:40:01 +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
Thomas Adamcik
7ed9b8adab
config: Extract encode and decode helpers from String
2013-04-14 17:34:54 +02:00
Thomas Adamcik
9f18d50ab0
config: Fix escapes in string handling
2013-04-14 17:16:17 +02:00