glyph / txsni

Simple support for running a TLS server with Twisted.
MIT License
25 stars 10 forks source link

Directory map interface. #5

Closed mithrandi closed 8 years ago

mithrandi commented 8 years ago

The first branch in support of #3.

This fleshes out HostDirectoryMap to implement the full MutableMapping interface. This branch actually adds some tests, so merge #4 first for proper CI coverage.

glyph commented 8 years ago

I'd really like to move isort out of this branch; if I understand properly it's a thing for sorting imports? (why does this live in setup.cfg?)

mithrandi commented 8 years ago

Uh, yeah, I've removed that now; I can't remember now why that's in this branch, I'm not sure if I meant it as a proposal or if I meant to put that in another project, but it's not important.

(This is an irrelevant tangent, then, but: the configuration can also go in .isort.cfg, but I think I prefer having project settings gathered in setup.cfg rather than strewn across a ton of different files in the repository root, and most of the tools (eg. isort, flake8) seem to support this now)

mithrandi commented 8 years ago

Upon further discussion with @glyph on IRC, I think the conclusion we reached is that this is too simplistic (eg. in many cases, you'll need setting and listing to be asynchronous operations), so I think the conclusion is that this approach is too simplistic. I think having a separate interface for setting and listing (whether provided by the same object or not) is probably the best approach to take, so I'll experiment with something like that in txacme, and drop this PR for now.