- 27 Ock, 2013 1 kayıt (commit)
-
-
Ezio Melotti yazdı
-
- 24 Haz, 2012 1 kayıt (commit)
-
-
R David Murray yazdı
This code passes all the same tests that the existing RFC mime header parser passes, plus a bunch of additional ones. There are a couple of commented out tests where there are issues with the folding. The folding doesn't normally get invoked for headers parsed from source, and the cases are marginal anyway (headers with invalid binary data) so I'm not worried about them, but will fix them after the beta. There are things that can be done to make this API even more convenient, but I think this is a solid foundation worth having. And the parser is a full RFC parser, so it handles cases that the current parser doesn't. (There are also probably cases where it fails when the current parser doesn't, but I haven't found them yet ;) Oh, yeah, and there are some really ugly bits in the parser for handling some 'postel' cases that are unfortunately common. I hope/plan to to eventually refactor a lot of the code in the parser which should reduce the line count...but there is no escaping the fact that the error recovery is welter of special cases.
-
- 31 May, 2012 2 kayıt (commit)
-
-
R David Murray yazdı
Thanks to Nick Coghlan for pointing out that I'd forgotten about class decorators.
-
R David Murray yazdı
Or perhaps more hackish, depending on your perspective. But at least this way it is now possible to run the individual tests using the unittest CLI.
-
- 29 May, 2012 1 kayıt (commit)
-
-
R David Murray yazdı
-
- 27 May, 2012 1 kayıt (commit)
-
-
R David Murray yazdı
When I made the checkin of the provisional email policy, I knew that Address and Group needed to be made accessible from somewhere. The more I looked at it, though, the more it became clear that since this is a provisional API anyway, there's no good reason to hide headerregistry as a private API. It was designed to ultimately be part of the public API, and so it should be part of the provisional API. This patch fully documents the headerregistry API, and deletes the abbreviated version of those docs I had added to the provisional policy docs.
-
- 26 May, 2012 1 kayıt (commit)
-
-
R David Murray yazdı
This is a danger of focusing on unit tests: sometimes you forget to do the integration tests.
-
- 25 May, 2012 1 kayıt (commit)
-
-
R David Murray yazdı
When the new policies are used (and only when the new policies are explicitly used) headers turn into objects that have attributes based on their parsed values, and can be set using objects that encapsulate the values, as well as set directly from unicode strings. The folding algorithm then takes care of encoding unicode where needed, and folding according to the highest level syntactic objects. With this patch only date and time headers are parsed as anything other than unstructured, but that is all the helper methods in the existing API handle. I do plan to add more parsers, and complete the set specified in the RFC before the package becomes stable.
-