Mimesis v5.0.0 Release Notes

  • โš  Warning: This release contains some breaking changes in API.

    Python compatibility:

    ๐Ÿ‘ Mimesis 5.0 supports Python 3.8, 3.9, and 3.10.

    ๐Ÿ‘ The Mimesis 4.1.3 is the last to support Python 3.6 and 3.7.

    Reworked:

    • A method Person().username(), now it accepts a parameters mask and drange.

    ๐Ÿ“‡ Renamed:

    • ๐Ÿ“‡ Renamed enums.UnitName to enums.MeasureUnit
    • ๐Ÿ“‡ Renamed enums.PrefixSign to enums.MetricPrefixSign
    • ๐Ÿ“‡ Renamed Business() to Finance()
    • Renamed BaseDataProvider.pull to BaseDataProvider._load_datafile
    • ๐Ÿ“‡ Renamed mimesis.providers.numbers.Numbers to mimesis.providers.numeric.Numeric
    • ๐Ÿ“‡ Renamed fmt argument of Address().country_code() to code

    ๐Ÿ›  Fixed:

    • ๐Ÿ›  Fix inheritance issues for Generic, now it inherits BaseProvider instead of BaseDataProvider
    • ๐Ÿ›  Fix locale-independent provider to make them accepts keyword-only arguments
    • ๐Ÿ›  Fix DenmarkSpecProvider CPR to generate valid CPR numbers.
    • ๐Ÿ›  Fix .cvv() to make it return string
    • ๐Ÿ›  Fix .cid() to make it return string
    • ๐Ÿ›  Fix .price() of Finance to make it return float.

    โž• Added:

    • โž• Added method hostname() for Internet data provider
    • Added support of **kwargs for a method add_provider of Generic() provider
    • โž• Added enum Locale to mimesis.enums and mimesis.locales
    • Added measure_unit and metric_prefix methods for the Science provider.
    • โž• Added .iterator() for schema.Schema
    • Added methods .slug() and ip_v4_with_port() for Internet()
    • โž• Added increment() method for Numbers()
    • Added methods .stock_ticker(), .stock_name() and .stock_exchange() for Finance()
    • โž• Added BinaryFile data provider which provides binary data files, such as .mp3, .mp4, .png, etc.

    โœ‚ Removed:

    • โœ‚ Removed module decorators. Use shortcuts.romanize to romanize Cyrillic strings.
    • 0๏ธโƒฃ Removed as_object parameter for .uuid(). Now it returns string by default, if you need uuid4 object then use .uuid_object()
    • โœ‚ Removed invalid names and surnames from person.json for ru locale
    • โœ‚ Removed data provider UnitSystem(), use Science() instead
    • โœ‚ Removed data provider Structure(), use schema.Schema instead
    • โœ‚ Removed builtin provider GermanySpecProvider
    • โœ‚ Removed data provider Clothing, use Numbers instead
    • โœ‚ Removed method copyright() of Finance()
    • โœ‚ Removed method network_protocol() of Internet()
    • Removed params with_port and port_range for ip_v4() of Internet(). Use ip_v4_with_port() instead.
    • Removed methods sexual_orientation, social_media_profile and avatar of the Person() provider.
    • โœ‚ Removed a bunch of useless custom exceptions and replaced them with FieldError.
    • Removed completely useless chemical_element and atomic_number methods of Science data provider and made it locale-independent.