I sometimes like to get my thoughts into kitchen and cook something tasty. I might not look like, but I like to eat. One of my recent adventures was Apple sauce chicken. Whole idea of such chicken seems more difficult, than it actually is.
I might not be fond of Django itself, but one can learn a thing or two from it. For example, if it wasn't for working with Django, I'd probably miss the fact, that you can start a simple smtp server to debug email communications in your apps (no matter the programming language).
It's simple as that. Now you can just configure your app to use smtp connection as passed to smtpd server here.
Recently at work I've stumbled across quite a problem, how do You check your code coverage, especially in integration tests, when portions of your code are running as subprocesses?
tl;dr: Be gentle.
I've just released new version of pyramid_fullauth v0.2.0. It gained License, test were rewritten to py.test, and CSRF token handling seen major overhaul.
Last week, our team at Clearcode has released package to PyPI, that takes most of the tedious tasks when writing and running selenium tests of Ones shoulder. It main tasks is to take prepared configuration file, which tells paytest_sauce what tests and what browser should the tests be run in, and then run them. But that's not all.
10 months ago, I run sqlalchemy tests against mysql server on different mysql dialects. This time, I did the same, but for both postgres and mysql dialects.
A couple of days ago, I completed and released new version of pyramid_fullauth, now at 0.1. This package aims to provide full authorization and authentication functionality for Your pyramid application. It provides standard email authentication, and by integrating velruse, it also allows for broad spectrum of social and oauth2 services authentication, by just the means of settings config! So what's new in version 0.1?
This might come as a surprise, but in python 2.7, it's actually faster to decode strigs with unicode function, than decode method.
>>> from timeit import Timer >>> s = "grzegrzółka" >>> ts = Timer(lambda: s.decode('utf-8')) >>> ts.timeit() 1.4051871299743652 >>> tu = Timer(lambda: unicode(s, 'utf-8')) >>> tu.timeit() 0.4272959232330322
Of course, unicode method isn't valid for python3, but you can always mock it's behaviour for py3 in some compat.py file, but... strings in python3 are finally unicode, not ascii like in python2.7,so unless you develop some nice library, you probably know what python version will be running your project.