Releases: omaciel/fauxfactory
Releases · omaciel/fauxfactory
v2.1.0
v2.0.9
v2.0.8
v2.0.7
v2.0.6
Thanks to James Laska FauxFactory
is now compatible with python 2.6
.
v2.0.5
Improved unicode letters generator
Added a new helper for the gen_utf8
function which improves how we generate unicode letters and avoids generating unicode string with control characters and other non letters characters.
Also adds tests for the generator in order to ensure it is not generating unwanted characters.
v2.0.4
v2.0.3
2.0.3 (2014-12-17)
- Dropped the class-wide FauxFactory deprecation warning.
- Refactored the
deprecated
decorator function to comply with pylint
and flake8. - Make gen_netmask verify function arguments.
- Make
gen_netmask
raise aValueError
ifmin_cidr
is less than
0 ormax_cidr
is greater than 32. Add tests for this boundary
checking code. - Improvements to constants and documentation.
v2.0.2
Added new netmask random generator, thanks to @elyezer! You can now generate a netmask value using:
from fauxfactory import gen_netmask
gen_netmask()
u'255.255.255.252'
You can also generate a netmask value that falls within valid CIDR values:
gen_netmask(min_cidr=4)
u'255.255.255.252'
gen_netmask(min_cidr=4, max_cidr=10)
u'252.0.0.0'
v2.0.1
What's new? Basically:
- If your code still uses the older code and imports the
FauxFactory
class or tries to use one of its functions, a deprecation message is now displayed:
In [1]: from fauxfactory import FauxFactory
fauxfactory/__init__.py:721: Warning: The FauxFactory class is deprecated. Please use functions from the fauxfactory module instead.
category=Warning)
In [2]: FauxFactory.generate_utf8()
fauxfactory/__init__.py:697: Warning: Function generate_utf8 is now deprecated! Please update your your code to use the gen_utf8 function instead.
warnings.warn(warn_message.format(name, new_name), category=Warning)
Out[2]: u'\u3ca8\ucc98\uaf06\uef9c\uc7e7\ub10f\u8554\u8ec0\uf64c\ub6a1'
- The
gen_string
function now has a default for thelength
argument, which means that you can callgen_string('utf8')
without having to pass a default value.
In [1]: from fauxfactory import gen_string
In [2]: gen_string('utf8')
Out[2]: u'\u0d53\ufebf\u336b\uffb1\u3899\u3c4d\u1d2b\ub9f9\u0f36\uef60'
... and that's all for now :)