-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HISTORY
408 lines (254 loc) · 8.58 KB
/
HISTORY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
4.16
====
Features
--------
- Feature flags now has a modify context manager that allows for patching flags
that are reverted when the context manager exits (similar to settings).
- Add PyTest fixture `patch_feature_flags` that returns modify context for feature
flags.
- Fully implement split logging configuration. Settings now contains `LOG_HANDLERS`
and `LOG_LOGGERS` that are merged into the logging configuration before it is
applied.
- Add a function `settings_in_module` in the testing package to fetch a list of
setting names from a settings module.
- The injection FactoryRegistry now has a modify context manager that allows for
patching (and mocking) factories that are reverted when the context manager
exits.
- Add PyTest fixture `patch_injection` that returns modify context for the
factory registry.
4.15.1
======
Bugfix
------
- Fix for certain edge cases where loglevel is not supplied.
4.15
====
Features
--------
- Command decorators can now be supplied with an alternate loglevel to
allow certain commands to use a different level.
Bugfix
------
- Fix initial log replay so the specified log-level is correctly applied.
4.14
====
Features
--------
- Add tooling for generating documentation of settings by inspecting the
default_settings file.
Project Changes
---------------
- All linting and formatting is now handled by pre-commit using ruff.
4.13.1
======
Fixes
-----
- Update utils.inspect.import_root_module to handle ``__mp_main__`` module
correctly.
4.13
====
Changes
-------
- Added ext_block_list to allow for blocking of extensions to CliApplication.
- Allow ext_allow_list and ext_block_list to include glob patterns.
Pending Deprecations
--------------------
- Deprecated the use of ``ext_white_list`` in favour of ``ext_allow_list``.
4.12
====
Changes
-------
- Introduction of typed_settings, providing a cleaner way to access default settings
that supports auto-completion and type inference. And preparing the way for more
in-depth checks that ensure settings values match the expected types.
- Support ``Literal`` types in CLI. Maps str and int literals to choices.
- Support sequences of Enum values in the CLI. This is implemented via the
``AppendEnumValue`` and ``AppendEnumName`` actions.
- Migrate from pkg_resources to the standardised builtin importlib.metadata.
- Fix for handling events/callbacks on classes where the parent has __slots__ defined.
4.11.0
======
Changes
-------
- Self is now ignored in command handlers if it is the first argument. This covers
the case where a non ``staticfunction`` is used as a handler when grouped as part
of a command group.
- Allow CLI entry points to define an argument as a date, time or datetime type
which will accept an valid ISO8601 string.
- Add pre_dispatch, post_dispatch and dispatch_error events to CliApplication
4.10.1
======
Changes
-------
- Fix issue with docs build related to Poetry and RTD
4.10.0
======
Changes
-------
- Add implementation of ``multiprocessing.Pool`` that ensures that settings are
mirrored into any worker process.
- Include pytest plugin to provide fixtures
4.9.0
=====
Changes
-------
- Changed settings to be support being pickled.
- Added feature to export and restore settings into a serialised form for
use-cases where settings need to be duplicated (eg deploying tasks into a
spark cluster where settings are required).
4.8.2
=====
Changes
-------
- Extend change to RegexType to allow for any custom ArgumentType by extending
the ArgumentType ABC.
- Allow CLI entry points to define an argument as Sequence[Enum] and obtain a
list of enum values.
4.8.1
=====
Changes
-------
- Fix bug with RegexType argument where regex searched input string not raising
an invalid argument if the input _contained_ a valid string.
- Support RegexType in type annotations for command line generation.
4.8.0
=====
Changes
-------
- Dropping official support for Python 3.6 and 3.7
- Fix bug in NamedSingletonFactory and ThreadLocalNamedSingletonFactory classes
that skipped the singleton wrapper causing a new instance to be generated each
time.
4.7.2
=====
Changes
--------
- Fix feature_flags.if_enabled to ensure doc string and function name are passed
to the decorator wrapper.
4.7.1
=====
Changes
-------
- Improve the settings reset to properly apply the base-settings after reset.
These are the basic settings required for the application to operate
correctly.
4.7.0
=====
Features
--------
- Add reset option to settings modify context to allow settings to be completely
cleared during testing. This is particularly useful for testing CLI methods.
4.6.0
=====
Features
--------
- Builtin feature flags support for enabling functionality at runtime
Changes
-------
- Change to initial logger so early log commands are replayed to the entire
logging framework after logging has been configured. This could cause initial
log messages to be displayed subtly different however log messages will follow
the rules defined in your logging configuration.
4.5.0
=====
Features
--------
- Add TOML support for remote configuration.
Security Updates
----------------
- By default require TLS 1.2 for HTTPS connections to fetch remote configuration.
4.4.0
=====
Features
--------
- Delayed logging on startup, initial log messages are stored (critical messages
are still displayed) to allow for logging to be configured before the stored
messages are replayed for the now active logger. This also opens up the option
of file only based logging.
- Command signature can now accept the Optional values for both positional are
optional arguments, this allows for optional positional arguments.
- Argument grouping support enable, with builtin CLI commands grouped.
- Single file scripts. A single script can now be used with pyApp, allowing even
quick scripts to take advantage of pyApp features and extensions.
- Command signature generation. CLI arguments are generated from the arguments
signature of the command function.
- Improvements to checks to handle unexpected exceptions. Rather than checks
outright failing errors are caught and reported along with a stack trace.
- Switch to using poetry
Bug fixes
---------
- Custom logging configuration was not being applied for logging defined in settings
- Using an _ in a positional argument signature caused an exception in argparse
- Positional arguments caused an exception in argparse, a entire new suit of tests
was added to address this issue.
4.3.0
=====
Features
--------
- Async commands, ``app.command`` can not be applied to async functions and
handle the event loop.
- ``app.default`` now returns a Command Proxy supporting async and additional
command line arguments.
4.2.0
=====
Features
--------
- Added Object config loader, to aid in integration into other frameworks eg
Django.
- Add argument action for handling Enums
- Add argument type for validation with regex
Fixes
-----
- Utilisation of pylint to improve and maintain code quality.
- Use `sys.exit` instead of the `exit`.
- Fix command aliases not being resolved at run-time bug.
Backwards Compatibility
-----------------------
- The ``inject_into`` decorator has been removed use the simpler ``inject``
decorator in it's place.
4.1.0
=====
Features
--------
- Coloured log output be default (for ttys)
- Root module no longer required for CliApplication, is auto resolved (most of
the time)
- Added compatibility tools for marking methods to be deprecated.
Fixes
-----
- Change ``exit`` to ``sys.exit`` for compatibility with `pyinstaller`_.
- Greatly improved documentation, some sections re-written to improve clarity.
- Correct when event bindings are stored.
.. _pyinstaller: https://www.pyinstaller.org/
Deprecated
----------
- Migrate from ``pyapp.injection.inject_into`` to plain ``pyapp.injection.inject``
will be removed in 4.2.0.
4.0.6
=====
Features
--------
- Aliases for NamedPluginFactory entries
Changes
-------
- Generate explicit CannotImport exception if an invalid object is specified to
a NamedFactory.
- Have checks handle import errors
4.0.4
=====
Features
--------
- Added callbacks in addition to events
- Added specific exceptions for NamedFactories
- Added NoDefault mode
- Updated extension report to report code (so extensions that register multiple
items don't just look like duplicates)
- Shorted name of inject_into to inject (left alias of inject_into)
- Shorted name of FactoryArgs to Args (left alias of FactoryArgs)
- Added registration of factories into CliApplication, initially supports the
asyncio event loop.
4.0.2
=====
Features
--------
- Added events support