Repository: joke2k/faker
Pull request #1267 (2020-09-21 14:55:23)

Use non-zero number for first digit of Swedish postal codes.
### What does this changes

This change corrects the postal code format in the Swedish locale of the address faker.

### What was wrong

The Swedish locale of the address faker generated postal codes that did not comply to the real format of Swedish postal codes.

See https://sv.wikipedia.org/wiki/Postnummer_i_Sverige and 2nd chapter of https://www.postnord.se/siteassets/pdf/faktablad/postnummersystemet-i-sverige-171213.pdf.
### How this fixes it

By changing the postal code format of the Swedish locale of the address faker to generate a leading non-zero digit the faker generates correct Swedish postal codes.

fcurella: > See https://sv.wikipedia.org/wiki/Postnummer_i_Sverige and 2nd chapter of https://www.postnord.se/siteassets/pdf/faktablad/postnummersystemet-i-sverige-171213.pdf.

Could include those 2 links as comments in the code?

Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 591aeafb..da69ad21 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,8 +1,8 @@
 Changelog
 =========
 
-`4.1.3 - 14-September-2020 <https://github.com/joke2k/faker/compare/v4.1.2...v4.1.3>`__
----------------------------------------------------------------------------------------
+`4.1.3 - 2020-09-14 <https://github.com/joke2k/faker/compare/v4.1.2...v4.1.3>`_
+-------------------------------------------------------------------------------
 
 * Add ``es_ES`` autonomous communities (Spanish regions). Thanks @mondeja.
 * Add JSON and Fixed Width argument group and parser support. Thanks @johnbrandborg.
@@ -11,8 +11,8 @@ Changelog
 * ``or_IN`` Odia person's name added. Thanks @soumendrak.
 * Remove ``datetime_safe`` shim subclass in favor of native Python ``datetime.datetime``. Thanks @samcrang.
 
-`4.1.2 - 17-August-2020 <https://github.com/joke2k/faker/compare/v4.1.1...v4.1.2>`__
-------------------------------------------------------------------------------------
+`4.1.2 - 2020-08-17 <https://github.com/joke2k/faker/compare/v4.1.1...v4.1.2>`_
+-------------------------------------------------------------------------------
 
 * Extend Person Provider to support non-binary suffixes and prefixes. Thank you @crd.
 * Add ``safe_domain_name`` generator. Thanks @crd.
@@ -27,8 +27,8 @@ Changelog
 * Add ``es_ES`` ``barcode`` provider. Thanks @mondeja.
 * Add parser argument support. Thanks @johnbrandborg.
 
-`4.1.1 - 15-June-2020 <https://github.com/joke2k/faker/compare/v4.1.0...v4.1.1>`__
-----------------------------------------------------------------------------------
+`4.1.1 - 2020-06-15 <https://github.com/joke2k/faker/compare/v4.1.0...v4.1.1>`_
+-------------------------------------------------------------------------------
 
 * Add ``date_time`` providers for ``cs_CZ``, ``de_AT``, ``es_ES``, ``it_IT``, ``sk_SK``,
   ``tr_TR``. Thanks @eumiro.
@@ -39,8 +39,8 @@ Changelog
 * Add ``pytimezone`` generator returning ``tzinfo`` objects. Thanks @OJFord.
 * Add ``es_ES`` currency provider. Thanks @mondeja.
 
-`4.1.0 - 12-May-2020 <https://github.com/joke2k/faker/compare/v4.0.3...v4.1.0>`__
----------------------------------------------------------------------------------
+`4.1.0 - 2020-05-12 <https://github.com/joke2k/faker/compare/v4.0.3...v4.1.0>`_
+-------------------------------------------------------------------------------
 
 * Add ``pytest`` plugin. Thanks @malefice.
 * Fix phone numbers for ``es_ES``. Thanks @pablofm.
@@ -49,8 +49,8 @@ Changelog
 * Add provider for ``sk_SK`` ``birth_number``. Thanks @eumiro.
 * Add ``day_of_week`` and ``month_name`` for ``de_DE`` provider. Thanks @eumiro.
 
-`4.0.3 - 13-April-2020 <https://github.com/joke2k/faker/compare/v4.0.2...v4.0.3>`__
------------------------------------------------------------------------------------
+`4.0.3 - 2020-04-13 <https://github.com/joke2k/faker/compare/v4.0.2...v4.0.3>`_
+-------------------------------------------------------------------------------
 
 * Fixed ``MSISDN`` for ``pt_BR``  to return only mobile numbers. Thanks @rodrigondec.
 * Added Domain Generator Algorithm by date. Thanks @pishchalnikov.
@@ -66,8 +66,8 @@ Changelog
 * Added color provider for ``no_NO`` license plates. Thanks @bjorskog.
 * Made ``value_types`` a keyword argument in ``python`` provider. Thanks @slafs.
 
-`4.0.2 - 11-March-2020 <https://github.com/joke2k/faker/compare/v4.0.1...v4.0.2>`__
------------------------------------------------------------------------------------
+`4.0.2 - 2020-03-11 <https://github.com/joke2k/faker/compare/v4.0.1...v4.0.2>`_
+-------------------------------------------------------------------------------
 
 * Add more data for ``ko_KR`` address provider. Thanks @alstn2468.
 * Improved ``pt_PT`` locale for address and bank. Thanks @mustakarhu.
@@ -79,8 +79,8 @@ Changelog
 * Add ``AutomotiveProvider`` for ``fr_FR`` locale. Thanks @clarissedescamps and @perssonsimon1.
 * Fix ``cellphone_formats`` in ``pt_BR`` ``PhoneNumberProvider``. Thanks @rodrigondec.
 
-`4.0.1 - 17-February-2020 <https://github.com/joke2k/faker/compare/v4.0.0...v4.0.1>`__
---------------------------------------------------------------------------------------
+`4.0.1 - 2020-02-17 <https://github.com/joke2k/faker/compare/v4.0.0...v4.0.1>`_
+-------------------------------------------------------------------------------
 
 * Provider improvements for Russian locale:
     * added city suffixes, regions and country list
@@ -102,13 +102,13 @@ Changelog
 * Add Birth Number to czech locale. Thanks @Jengah.
 * Add persons provider for ``fr_QC``. Thanks @Lionesk.
 
-`4.0.0 - 14-January-2020 <https://github.com/joke2k/faker/compare/v3.0.1...v4.0.0>`__
--------------------------------------------------------------------------------------
+`4.0.0 - 2020-01-14 <https://github.com/joke2k/faker/compare/v3.0.1...v4.0.0>`_
+-------------------------------------------------------------------------------
 
 * Breaking change: Remove support for end-of-life Python 2.7.
 
-`3.0.1 - 14-January-2020 <https://github.com/joke2k/faker/compare/v3.0.0...v3.0.1>`__
--------------------------------------------------------------------------------------
+`3.0.1 - 2020-01-14 <https://github.com/joke2k/faker/compare/v3.0.0...v3.0.1>`_
+-------------------------------------------------------------------------------
 
 **NOTE**: This is the last release to support Python 2.7.x.
 
@@ -124,14 +124,14 @@ Changelog
 * Fix ``Faker.random_number`` intermittent exceptions. Thanks @Jengah.
 
 
-`3.0.0 - 04-December-2019 <https://github.com/joke2k/faker/compare/v2.0.5...v3.0.0>`__
---------------------------------------------------------------------------------------
+`3.0.0 - 2019-12-04 <https://github.com/joke2k/faker/compare/v2.0.5...v3.0.0>`_
+-------------------------------------------------------------------------------
 
 * Breaking change: Add support for multiple locale data generation.
   Thanks @malefice.
 
-`2.0.5 - 03-December-2019 <https://github.com/joke2k/faker/compare/v2.0.4...v2.0.5>`__
---------------------------------------------------------------------------------------
+`2.0.5 - 2019-12-03 <https://github.com/joke2k/faker/compare/v2.0.4...v2.0.5>`_
+-------------------------------------------------------------------------------
 
 * Add Iranian credit card. Thanks @abtinmo.
 * Improve color provider. Thanks @malefice.
@@ -139,8 +139,8 @@ Changelog
 * Change NY zipcode range. Thanks @arielkaluzhny.
 * Fix pyfloat out of min/max range. Thanks @bryan-brancotte.
 
-`2.0.4 - 12-November-2019 <https://github.com/joke2k/faker/compare/v2.0.3...v2.0.4>`__
---------------------------------------------------------------------------------------
+`2.0.4 - 2019-11-12 <https://github.com/joke2k/faker/compare/v2.0.3...v2.0.4>`_
+-------------------------------------------------------------------------------
 
 * Drop python 3.4.
 * Fix master card number generator. Thanks @nkthanh98.
@@ -160,8 +160,8 @@ Changelog
 * Improve barcode provider. Thanks @malefice.
 * Fix for pyfloat empty randrange. Thanks @jcardali.
 
-`2.0.3 - 14-October-2019 <https://github.com/joke2k/faker/compare/v2.0.2...v2.0.3>`__
--------------------------------------------------------------------------------------
+`2.0.3 - 2019-10-14 <https://github.com/joke2k/faker/compare/v2.0.2...v2.0.3>`_
+-------------------------------------------------------------------------------
 
 * Use the provider's RNG instead of the random module in ``invalid_ssn``. Thanks @luser.
 * Fix ``randomize_nb_elements`` ``max`` argument. Thanks @jorrit-wehelp.
@@ -171,26 +171,26 @@ Changelog
 * Add police id for ``el_GR``. Thanks @athaks.
 * Add jobs for for ``pt_PT``. Thanks @rubenandre.
 
-`2.0.2 - 17-September-2019 <https://github.com/joke2k/faker/compare/v2.0.1...v2.0.2>`__
----------------------------------------------------------------------------------------
+`2.0.2 - 2019-09-17 <https://github.com/joke2k/faker/compare/v2.0.1...v2.0.2>`_
+-------------------------------------------------------------------------------
 
 * Fix typos, misspellings. Add locations, names, dates in ``hi_IN`` providers. Thanks @kathawala.
 * Bump required version ``text-unidecode`` to 1.3. Thanks @moggers87.
 * Bug fix for ``pyfloat`` going over ``max_value``. Thanks @fgs-dbudwin.
 
-`2.0.1 - 20-August-2019 <https://github.com/joke2k/faker/compare/v2.0.0...v2.0.1>`__
-------------------------------------------------------------------------------------
+`2.0.1 - 2019-08-20 <https://github.com/joke2k/faker/compare/v2.0.0...v2.0.1>`_
+-------------------------------------------------------------------------------
 
 * Add nationalities for locale ``pt_PT``. Thanks @tng10.
 * Add ``ios()`` and ``android()`` to ``user_agent`` provider. Thanks @gsilvan.
 * Update ``zh_CN`` provinces. Thanks @casen27.
 
-`2.0.0 - 15-July-2019 <https://github.com/joke2k/faker/compare/v1.0.8...v2.0.0>`__
-----------------------------------------------------------------------------------
+`2.0.0 - 2019-07-15 <https://github.com/joke2k/faker/compare/v1.0.8...v2.0.0>`_
+-------------------------------------------------------------------------------
 * Breaking change: Only allow providers to use ``OrderedDict`` s, to avoid any more ``PYTHONHASHSEED`` problems. Thanks @adamchainz.
 
-`1.0.8 - 15-July-2019 <https://github.com/joke2k/faker/compare/v1.0.7...v1.0.8>`__
-----------------------------------------------------------------------------------
+`1.0.8 - 2019-06-15 <https://github.com/joke2k/faker/compare/v1.0.7...v1.0.8>`_
+-------------------------------------------------------------------------------
 
 * Rename ``pyint`` ``min`` and ``max`` to ``min_value`` and ``max_value``.
   Thanks @francoisfreitag.
@@ -209,8 +209,8 @@ Changelog
 * Fix datetime parsing on environments with negative offsets.
   Thanks @bluesheeptoken.
 
-`1.0.7 - 14-May-2019 <https://github.com/joke2k/faker/compare/v1.0.6...v1.0.7>`__
----------------------------------------------------------------------------------
+`1.0.7 - 2019-05-14 <https://github.com/joke2k/faker/compare/v1.0.6...v1.0.7>`_
+-------------------------------------------------------------------------------
 
 * Remove dead url from ``image_placeholder_services``. Thanks @Monstrofil.
 * Fix missing ``first_names`` in Romanian person provider. Thanks @xlotlu.
@@ -220,15 +220,15 @@ Changelog
   Thanks @adwojak.
 * Corrected behavior for ``pyfloat``. Thanks @ariksu.
 
-`1.0.6 - 26-April-2019 <https://github.com/joke2k/faker/compare/v1.0.5...v1.0.6>`__
------------------------------------------------------------------------------------
+`1.0.6 - 2019-04-26 <https://github.com/joke2k/faker/compare/v1.0.5...v1.0.6>`_
+-------------------------------------------------------------------------------
 
 * Add missing commas to company/nl_NL provider. Thanks @francoisfreitag.
 * Add bounds to ``pyint``. Thanks @francoisfreitag.
 * Accept step argument in ``random_int()``. Thanks @francoisfreitag.
 
-`1.0.5 - 12-April-2019 <https://github.com/joke2k/faker/compare/v1.0.4...v1.0.5>`__
------------------------------------------------------------------------------------
+`1.0.5 - 2019-04-12 <https://github.com/joke2k/faker/compare/v1.0.4...v1.0.5>`_
+-------------------------------------------------------------------------------
 
 * Add min and max values for ``pyfloat`` and ``pydecimal``. Thanks @Lrcezimbra.
 * Add ``months`` and ``M`` to the syntax for ``start_date`` and ``end_date``.
@@ -239,13 +239,13 @@ Changelog
   Thanks @stephane.
 * Add Armenian locale ``hy_AM``. Thanks @hovikman.
 
-`1.0.4 - 12-March-2019 <https://github.com/joke2k/faker/compare/v1.0.3...v1.0.4>`__
------------------------------------------------------------------------------------
+`1.0.4 - 12-March-2019 <https://github.com/joke2k/faker/compare/v1.0.3...v1.0.4>`_
+----------------------------------------------------------------------------------
 
 * Fix erratic test.
 
-`1.0.3 - 12-March-2019 <https://github.com/joke2k/faker/compare/v1.0.2...v1.0.3>`__
------------------------------------------------------------------------------------
+`1.0.3 - 2019-03-12 <https://github.com/joke2k/faker/compare/v1.0.2...v1.0.3>`_
+-------------------------------------------------------------------------------
 
 * Fix ``AttributeError`` in ``user_Agent`` provider. Thanks @Mattwmaster58 for
   the report.
@@ -263,8 +263,8 @@ Changelog
 * Add Brazilian RG (identity card). Thanks @davizucon.
 * Allow overriding of random generator class.
 
-`1.0.2 - 22-January-2019 <https://github.com/joke2k/faker/compare/v1.0.1...v1.0.2>`__
--------------------------------------------------------------------------------------
+`1.0.2 - 2019-01-22 <https://github.com/joke2k/faker/compare/v1.0.1...v1.0.2>`_
+-------------------------------------------------------------------------------
 
 * Fix state abbreviations for ``id_ID`` to be 2-letters. Thanks @dt-ap.
 * Fix format for ``city_with_postcode`` on ``de_DE`` locale. Thanks @TZanke.
@@ -273,24 +273,24 @@ Changelog
   a zipcode for a specified state. Thanks @mattyg.
 * Group first names by gender on ``zh_CN`` provider. Thanks @TimeFinger.
 
-`1.0.1 - 12-December-2018 <https://github.com/joke2k/faker/compare/v1.0.0...v1.0.1>`__
---------------------------------------------------------------------------------------
+`1.0.1 - 2018-12-12 <https://github.com/joke2k/faker/compare/v1.0.0...v1.0.1>`_
+-------------------------------------------------------------------------------
 
 * Fix number of digits in ``phone_number`` provider for ``no_NO``.
   Thanks @aleksanb.
 * Add categories to ``jp_JP`` company provider. Thanks @shirakia.
 * Add trunk prefix for ``ru_RU`` phone numbers. thanks @pishchalnikov.
 
-`1.0.0 - 13-November-2018 <https://github.com/joke2k/faker/compare/v0.9.3...v1.0.0>`__
---------------------------------------------------------------------------------------
+`1.0.0 - 2018-11-13 <https://github.com/joke2k/faker/compare/v0.9.3...v1.0.0>`_
+-------------------------------------------------------------------------------
 
 * Breaking change: ``latlng``, ``latitude`` and ``longitude`` no longer return
   coordinates that are close the locale's country. Use the ``local_latlng``,
   ``local_latitude`` and ``local_longitude`` instead.
 * Add ``location_on_land`` provider. Thanks @shacker.
 
-`0.9.3 - 13-November-2018 <https://github.com/joke2k/faker/compare/v0.9.2...v0.9.3>`__
---------------------------------------------------------------------------------------
+`0.9.3 - 2018-11-13 <https://github.com/joke2k/faker/compare/v0.9.2...v0.9.3>`_
+-------------------------------------------------------------------------------
 
 * Add ``cellphone_number`` method for ``pt_BR``. Thanks @Newman101.
 * Fix urls generated by from `image_url`. Thanks @tsiaGeorge.
@@ -314,8 +314,8 @@ Changelog
 * Add license plates for ``sv_SE``. Thanks @vilhelmmelkstam.
 * Allow ``uuid4`` to return a ``UUID`` object. Thanks @ediblesushi.
 
-`0.9.2 - 12-October-2018 <https://github.com/joke2k/faker/compare/v0.9.1...v0.9.2>`__
--------------------------------------------------------------------------------------
+`0.9.2 - 2018-10-12 <https://github.com/joke2k/faker/compare/v0.9.1...v0.9.2>`_
+-------------------------------------------------------------------------------
 
 * Add company names to ``pl_PL`` provider. Thanks @@twkrol.
 * Add replacements for non-ascii characters in ``pt_BR``. Thanks @clarmso.
@@ -328,8 +328,8 @@ Changelog
 * Lots of work on internal cleanup and optimizing the CI. Thanks @jdufresne.
 * Add ``flake8`` to the CI. Thanks @andrzej3393.
 
-`0.9.1 - 13-September-2018 <https://github.com/joke2k/faker/compare/v0.9.0...v0.9.1>`__
----------------------------------------------------------------------------------------
+`0.9.1 - 2018-09-13 <https://github.com/joke2k/faker/compare/v0.9.0...v0.9.1>`_
+-------------------------------------------------------------------------------
 
 * Fix missing and misplaced comma's in many providers. Thanks @153957.
 * Refactor IPv4 address generation to leverage ``ipaddress`` module.
@@ -342,8 +342,8 @@ Changelog
   provider. Thanks @micahstrube.
 * Add support for Python 3.7. Thanks @michael-k.
 
-`0.9.0 - 13-August-2018 <https://github.com/joke2k/faker/compare/v0.8.18...v0.9.0>`__
--------------------------------------------------------------------------------------
+`0.9.0 - 2018-08-13 <https://github.com/joke2k/faker/compare/v0.8.18...v0.9.0>`_
+--------------------------------------------------------------------------------
 
 * ``.random_sample()`` now returns a list of unique elements instead of a set.
 * ``.random_sample_unique()`` is removed in favor of ``.random_sample()``.
@@ -352,8 +352,8 @@ Changelog
 * ``words()``, ``password()``, ``uri_path`` and ``pystr()`` now use the new the
   ``random_choices()`` method.
 
-`0.8.18 - 13-August-2018 <https://github.com/joke2k/faker/compare/v0.8.17...v0.8.18>`__
----------------------------------------------------------------------------------------
+`0.8.18 - 2018-08-13 <https://github.com/joke2k/faker/compare/v0.8.17...v0.8.18>`_
+----------------------------------------------------------------------------------
 
 * Change blood group from ``0`` (zero) to ``O`` (capital letter O). Some
   locales do use 'zero', but ``O`` is more common and it is the medical
@@ -368,8 +368,8 @@ Changelog
 * Use tzinfo when provided in ``date_of_birth``. Thanks @Kelledin.
 
 
-`0.8.17 - 12-July-2018 <https://github.com/joke2k/faker/compare/v0.8.16...v0.8.17>`__
--------------------------------------------------------------------------------------
+`0.8.17 - 2018-07-12 <https://github.com/joke2k/faker/compare/v0.8.16...v0.8.17>`_
+----------------------------------------------------------------------------------
 
 * Add ``ein``, ``itin`` and refactored ``ssn`` Provider for ``en_US``.
   Thanks @crd.
@@ -377,29 +377,29 @@ Changelog
 * Add ``date_of_birth`` provider. Thanks @cdr.
 * Add alpha-3 representation option for ``country-code`` provider. Thanks @cdr.
 
-`0.8.16 - 15-June-2018 <https://github.com/joke2k/faker/compare/v0.8.15...v0.8.16>`__
--------------------------------------------------------------------------------------
+`0.8.16 - 2018-06-15 <https://github.com/joke2k/faker/compare/v0.8.15...v0.8.16>`_
+----------------------------------------------------------------------------------
 
 * Fix test for CPF (Brazilian SSN). Thanks Rubens Takiguti Ribeiro.
 * Fix Canadian SIN generation. Thanks @crd.
 * Fix Norwegian SSN date portion. Thanks @frangiz.
 * Add ``start_datetime`` argument for ``unix_time()``. Thanks @crd.
 
-`0.8.15 - 14-May-2018 <https://github.com/joke2k/faker/compare/v0.8.14...v0.8.15>`__
-------------------------------------------------------------------------------------
+`0.8.15 - 2018-05-14 <https://github.com/joke2k/faker/compare/v0.8.14...v0.8.15>`_
+----------------------------------------------------------------------------------
 
 * Change logging level to ``DEBUG``.
 
-`0.8.14 - 11-May-2018 <https://github.com/joke2k/faker/compare/v0.8.13...v0.8.14>`__
-------------------------------------------------------------------------------------
+`0.8.14 - 2018-05-11 <https://github.com/joke2k/faker/compare/v0.8.13...v0.8.14>`_
+----------------------------------------------------------------------------------
 
 * Add possibility to make artificial ssn numbers for ``FI_fi``. Thanks @kivipe.
 * Update ``ko_KR`` person data based on statistics. Thanks @unace.
 * Improved logging. Thanks @confirmationbias616.
 
 
-`0.8.13 - 12-April-2018 <https://github.com/joke2k/faker/compare/v0.8.12...v0.8.13>`__
---------------------------------------------------------------------------------------
+`0.8.13 - 2018-04-12 <https://github.com/joke2k/faker/compare/v0.8.12...v0.8.13>`_
+----------------------------------------------------------------------------------
 
 * Add ``no_NO`` bank provider. Thanks @cloveras.
 * Add ``ipv4_network_class``, ``ipv4_private``, ``ipv4_public`` providers.
@@ -419,8 +419,8 @@ Changelog
 * Clarify CLI help. Thanks @confirmationbias616.
 
 
-`0.8.12 - 12-March-2018 <https://github.com/joke2k/faker/compare/v0.8.11...v0.8.12>`__
---------------------------------------------------------------------------------------
+`0.8.12 - 2018-03-12 <https://github.com/joke2k/faker/compare/v0.8.11...v0.8.12>`_
+----------------------------------------------------------------------------------
 
 * Fix issue with ``cx_Freeze``. Thanks @sedominik.
 * Add dutch ``nl_NL`` bank provider. Thanks @PatSousa.
@@ -438,22 +438,22 @@ Changelog
 * Fix incorrect value in list of middle name for locale ``ru_RU``.
   Thanks @damirazo.
 
-`0.8.11 - 12-February-2018 <https://github.com/joke2k/faker/compare/v0.8.10...v0.8.11>`__
------------------------------------------------------------------------------------------
+`0.8.11 - 2018-02-12 <https://github.com/joke2k/faker/compare/v0.8.10...v0.8.11>`_
+----------------------------------------------------------------------------------
 
 * Add scheme selection for internet ``url`` provider. Thanks @ProvoK.
 * Increase lower bound on AD date generation. Thanks @prophile.
 * Add the ability to specify the min and max age for some ssn locales.
   Thanks @frangiz.
 
-`0.8.10 - 16-January-2018 <https://github.com/joke2k/faker/compare/v0.8.9...v0.8.10>`__
----------------------------------------------------------------------------------------
+`0.8.10 - 2018-01-16 <https://github.com/joke2k/faker/compare/v0.8.9...v0.8.10>`_
+---------------------------------------------------------------------------------
 
 * Pass ``python_requires`` argument to ``setuptools``. Thanks @jdufresne.
 * Remove some words from ``en_US`` lorem ipsum provider. Thanks @Pomax.
 
-`0.8.9 - 12-January-2018 <https://github.com/joke2k/faker/compare/v0.8.8...v0.8.9>`__
--------------------------------------------------------------------------------------
+`0.8.9 - 2018-01-12 <https://github.com/joke2k/faker/compare/v0.8.8...v0.8.9>`_
+-------------------------------------------------------------------------------
 
 * Remove support for Python 3.3. Thanks @jdufresne.
 * Allow past dates within a second. Thanks @DanEEstar.
@@ -465,8 +465,8 @@ Changelog
 * Added ``domain`` argument to ``email`` provider. Thanks @lcd1232.
 
 
-`0.8.8 - 19-December-2017 <https://github.com/joke2k/faker/compare/v0.8.7...v0.8.8>`__
---------------------------------------------------------------------------------------
+`0.8.8 - 2017-12-19 <https://github.com/joke2k/faker/compare/v0.8.7...v0.8.8>`_
+-------------------------------------------------------------------------------
 
 * made ``seed_instance`` return ``self`` for chainability.
 * Add ``en_US`` locale for ``lorem``. Thanks @shacker.
@@ -474,8 +474,8 @@ Changelog
 * ``fi_FI`` address and job lists updated. Thanks @mikkhola.
 * Add ``iban`` provider. Thanks @cdaller.
 
-`0.8.7 - 14-November-2017 <https://github.com/joke2k/faker/compare/v0.8.6...v0.8.7>`__
---------------------------------------------------------------------------------------
+`0.8.7 - 2017-11-14 <https://github.com/joke2k/faker/compare/v0.8.6...v0.8.7>`_
+-------------------------------------------------------------------------------
 
 * Corrected some issues with the Hungarian (``hu_HU``) providers, such as
   incorrectly capitalized company suffixes, street/road type names and place
@@ -490,14 +490,14 @@ Changelog
 * Fix ResourceWarning in ``setup.py``. Thanks @jdufresne.
 * Update test requirements.
 
-`0.8.6 - 16-October-2017 <https://github.com/joke2k/faker/compare/v0.8.5...v0.8.6>`__
--------------------------------------------------------------------------------------
+`0.8.6 - 2017-10-16 <https://github.com/joke2k/faker/compare/v0.8.5...v0.8.6>`_
+-------------------------------------------------------------------------------
 
 * Replace ``unidecode`` dependency in favor of ``text-unidecode``. Faker now
   requires `text-unidecode <https://pypi.org/project/text-unidecode/>`_.
 
-`0.8.5 - 13-October-2017 <https://github.com/joke2k/faker/compare/v0.8.4...v0.8.5>`__
--------------------------------------------------------------------------------------
+`0.8.5 - 2017-10-13 <https://github.com/joke2k/faker/compare/v0.8.4...v0.8.5>`_
+-------------------------------------------------------------------------------
 
 * Add ASCII emails. Thanks @barseghyanartur.
 * Add ``id_ID`` Providers. Thanks Sidi Ahmad.
@@ -510,8 +510,8 @@ Changelog
 
 .. _Unidecode: https://pypi.org/project/Unidecode/
 
-`0.8.4 - 22-September-2017 <https://github.com/joke2k/faker/compare/v0.8.3...v0.8.4>`__
----------------------------------------------------------------------------------------
+`0.8.4 - 2017-09-22 <https://github.com/joke2k/faker/compare/v0.8.3...v0.8.4>`_
+-------------------------------------------------------------------------------
 
 * Move ``email_validator`` to ``test_requires`` and unpinned the
   version number.
@@ -520,25 +520,25 @@ Changelog
 * Add Arabic locales. Thanks @ahmedaljazzar.
 * Fix datetime issue on Windows. Thanks @kungfu71186.
 
-`0.8.3 - 05-September-2017 <https://github.com/joke2k/faker/compare/v0.8.2...v0.8.3>`__
----------------------------------------------------------------------------------------
+`0.8.3 - 2017-09-05 <https://github.com/joke2k/faker/compare/v0.8.2...v0.8.3>`_
+-------------------------------------------------------------------------------
 
 * Fix release build.
 
-`0.8.2 - 05-September-2017 <https://github.com/joke2k/faker/compare/v0.8.1...v0.8.2>`__
----------------------------------------------------------------------------------------
+`0.8.2 - 2017-09-05 <https://github.com/joke2k/faker/compare/v0.8.1...v0.8.2>`_
+-------------------------------------------------------------------------------
 
 * Revert name change of ``faker.generator.random``. Thanks @adamchainz.
 * Document the global shared ``random.Random`` and ``seed_instance()``.
   Thanks @adamchainz.
 
-`0.8.1 - 28-August-2017 <https://github.com/joke2k/faker/compare/v0.8.0...v0.8.1>`__
-------------------------------------------------------------------------------------
+`0.8.1 - 2017-08-28 <https://github.com/joke2k/faker/compare/v0.8.0...v0.8.1>`_
+-------------------------------------------------------------------------------
 
 * Rolled back breaking change in ``randomize_nb_elements``.
 
-`0.8.0 - 28-August-2017 <https://github.com/joke2k/faker/compare/v0.7.18...v0.8.0>`__
--------------------------------------------------------------------------------------
+`0.8.0 - 2017-08-28 <https://github.com/joke2k/faker/compare/v0.7.18...v0.8.0>`_
+--------------------------------------------------------------------------------
 * Add ``identity_card_number`` for ``pl_PL`` ``person`` provider. Thanks @pdaw.
 * More descriptive error message when a formatter is not found.
   Thanks @fcurella.
@@ -546,8 +546,8 @@ Changelog
 * Add per-instance seeding via ``.seed_instance`` method. Thanks @reverbc.
 * Fix ``tz_TW`` ``address`` provider. Thanks @clarmso.
 
-`0.7.18 - 19-July-2017 <https://github.com/joke2k/faker/compare/v0.7.17...v0.7.18>`__
--------------------------------------------------------------------------------------
+`0.7.18 - 2017-07-19 <https://github.com/joke2k/faker/compare/v0.7.17...v0.7.18>`_
+----------------------------------------------------------------------------------
 
 * Generate proper dates before 1970. Thanks @kungfu71186.
 * Made it possible to seed ``.binary()``. Thanks @kungfu71186.
@@ -574,30 +574,30 @@ Changelog
   Thanks @catleeball.
 * Refactor RGB color methods. Thanks @catleeball.
 
-`0.7.17 - 12-June-2017 <https://github.com/joke2k/faker/compare/v0.7.16...v0.7.17>`__
--------------------------------------------------------------------------------------
+`0.7.17 - 2017-06-12 <https://github.com/joke2k/faker/compare/v0.7.16...v0.7.17>`_
+----------------------------------------------------------------------------------
 
 * Fix a timezone issue with the ``date_time_between_dates`` provider.
 
-`0.7.16 - 09-June-2017 <https://github.com/joke2k/faker/compare/v0.7.15...v0.7.16>`__
--------------------------------------------------------------------------------------
+`0.7.16 - 2017-06-09 <https://github.com/joke2k/faker/compare/v0.7.15...v0.7.16>`_
+----------------------------------------------------------------------------------
 
 * fix timezone issues with ``date_time_between`` provider.
-* Add ``ext_word_list`` parameter to methods in the `Lorem` generator.
+* Add ``ext_word_list`` parameter to methods in the ``Lorem`` generator.
   Thanks @guinslym.
 
-`0.7.15 - 02-June-2017 <https://github.com/joke2k/faker/compare/v0.7.14...v0.7.15>`__
--------------------------------------------------------------------------------------
+`0.7.15 - 2017-06-02 <https://github.com/joke2k/faker/compare/v0.7.14...v0.7.15>`_
+----------------------------------------------------------------------------------
 
 * fix start and end date for datetime provider methods.
 
-`0.7.14 - 02-June-2017 <https://github.com/joke2k/faker/compare/v0.7.13...v0.7.14>`__
--------------------------------------------------------------------------------------
+`0.7.14 - 2017-06-02 <https://github.com/joke2k/faker/compare/v0.7.13...v0.7.14>`_
+----------------------------------------------------------------------------------
 
 * fix ``future_date``, `and ``past_date`` bounds.
 
-`0.7.13 - 02-June-2017 <https://github.com/joke2k/faker/compare/v0.7.12...v0.7.13>`__
--------------------------------------------------------------------------------------
+`0.7.13 - 2017-06-02 <https://github.com/joke2k/faker/compare/v0.7.12...v0.7.13>`_
+----------------------------------------------------------------------------------
 
 * Remove capitalisation from ``hu_HU`` addresses. Thanks @Newman101.
 * Add ``et_EE`` (Estonian) provider: names and ssn. Thanks @trtd.
@@ -609,12 +609,12 @@ Changelog
   to DateTime Provider
 
 
-`0.7.12 - 10-May-2017 <https://github.com/joke2k/faker/compare/v0.7.11...v0.7.12>`__
-------------------------------------------------------------------------------------
+`0.7.12 - 2017-05-10 <https://github.com/joke2k/faker/compare/v0.7.11...v0.7.12>`_
+-----------------------------------------------------------------------------------
 
 * Add Japanese lorem provider. Thanks @richmondwang.
-* Add hr_HR names of month and names of days. Thanks @mislavcimpersak.
-* Add sl_SI names of month and names of days. Thanks @mislavcimpersak.
+* Add ``hr_HR`` names of month and names of days. Thanks @mislavcimpersak.
+* Add ``sl_SI`` names of month and names of days. Thanks @mislavcimpersak.
 * Update the provider ``user_agent``. Thanks @illia-v.
 * Add russian words for date_time. Thanks @iskhomutov.
 * Add Georgian (``ka_GE``) person and address providers.
@@ -622,61 +622,61 @@ Changelog
 * Add company provider to hu_HU locale. Thanks @Newman101.
 * Allow subdomains for ``domain_name`` provider. Thanks @hiagofigueiro.
 * Implement hu_HU months + days. Thanks @Newman101.
-* Replacement rules for emails à->a, è->e in `de_DE` internet provider.
+* Replacement rules for emails à->a, è->e in ``de_DE`` internet provider.
   Thanks @Bergil32.
 
 
-`0.7.11 - 09-April-2017 <https://github.com/joke2k/faker/compare/v0.7.10...v0.7.11>`__
---------------------------------------------------------------------------------------
+`0.7.11 - 2017-04-09 <https://github.com/joke2k/faker/compare/v0.7.10...v0.7.11>`_
+-----------------------------------------------------------------------------------
 
 * Added french words for days and months. Thanks @sblondon.
 * Reorganized tests. Thanks @grantbachman.
 * Added file path provider. Thanks @diegommarino.
 * Fixed packaging issue with tests module. Thanks @eukreign for the report.
 
-`0.7.10 - 13-March-2017 <https://github.com/joke2k/faker/compare/v0.7.9...v0.7.10>`__
--------------------------------------------------------------------------------------
+`0.7.10 - 2017-03-13 <https://github.com/joke2k/faker/compare/v0.7.9...v0.7.10>`_
+---------------------------------------------------------------------------------
 
 * Add ISBN-10 and ISBN-13. Thanks @grantbachman.
-* Add colors for `fr_FR`. Thanks @sblondon.
+* Add colors for ``fr_FR``. Thanks @sblondon.
 
-`0.7.9 - 24-February-2017 <https://github.com/joke2k/faker/compare/v0.7.8...v0.7.9>`__
---------------------------------------------------------------------------------------
+`0.7.9 - 2017-02-24 <https://github.com/joke2k/faker/compare/v0.7.8...v0.7.9>`_
+-------------------------------------------------------------------------------
 
-* Fix packaging isssue. Thanks @jorti.
+* Fix packaging issue. Thanks @jorti.
 
-`0.7.8 - 24-February-2017 <https://github.com/joke2k/faker/compare/v0.7.7...v0.7.8>`__
---------------------------------------------------------------------------------------
+`0.7.8 - 2017-02-24 <https://github.com/joke2k/faker/compare/v0.7.7...v0.7.8>`_
+-------------------------------------------------------------------------------
 
 * Add a Russian language to color provider. Thanks @kotyara1005.
 * Correct UnboundLocalError in Finnish SSN generator. Thanks @lamby.
 * Create internet IT provider. Thanks @GlassGruber.
-* Add `fix_len` parameter to 'random_number'. Thanks @vlad-ki.
+* Add ``fix_len`` parameter to ``random_number``. Thanks @vlad-ki.
 * Support zh_CN lorem. Thanks @yihuang.
 * Customize chinese word connector. Thanks @yihuang.
-* Add more company data to `fa_IR`. Thanks @aminalaee.
+* Add more company data to ``fa_IR``. Thanks @aminalaee.
 * Python 3.6 support. Thanks @stephane.
-* Add `hu_HU` providers. Thanks @chrisvoncsefalvay.
+* Add ``hu_HU`` providers. Thanks @chrisvoncsefalvay.
 * Fix tests failures.
 
-`0.7.7 - 20-December-2016 <https://github.com/joke2k/faker/compare/v0.7.6...v0.7.7>`__
---------------------------------------------------------------------------------------
+`0.7.7 - 2016-12-20 <https://github.com/joke2k/faker/compare/v0.7.6...v0.7.7>`_
+-------------------------------------------------------------------------------
 
-* Fix no_NO postcodes. Thanks @kdeldycke.
-* Fix fa_IR city generator. Thanks @kdeldycke.
+* Fix ``no_NO`` postcodes. Thanks @kdeldycke.
+* Fix ``fa_IR`` city generator. Thanks @kdeldycke.
 
-`0.7.6 - 19-December-2016 <https://github.com/joke2k/faker/compare/v0.7.5...v0.7.6>`__
---------------------------------------------------------------------------------------
+`0.7.6 - 2016-12-19 <https://github.com/joke2k/faker/compare/v0.7.5...v0.7.6>`_
+--------------------------------------------------------------------------------
 
-* Fix packaging issue with `docs` directory. Thanks @wyattanderson.
+* Fix packaging issue with ``docs`` directory. Thanks @wyattanderson.
 
-`0.7.5 - 16-December-2016 <https://github.com/joke2k/faker/compare/v0.7.4...v0.7.5>`__
---------------------------------------------------------------------------------------
+`0.7.5 - 2016-12-16 <https://github.com/joke2k/faker/compare/v0.7.4...v0.7.5>`_
+-------------------------------------------------------------------------------
 
-* Deprecate ``facke-factory`` package on PyPI.
+* Deprecate ``fake-factory`` package on PyPI.
 
-`0.7.4 - 16-December-2016 <https://github.com/joke2k/faker/compare/v0.7.3...v0.7.4>`__
---------------------------------------------------------------------------------------
+`0.7.4 - 2016-12-16 <https://github.com/joke2k/faker/compare/v0.7.3...v0.7.4>`_
+--------------------------------------------------------------------------------
 
 * Add Ukrainian ``address`` provider. Thanks @illia-v.
 * Add Ukrainian ``internet`` provider. Thanks @illia-v.
@@ -699,8 +699,8 @@ Changelog
 * Allow left/right_digits=0 for pyfloat. Thanks @mnalt.
 * update fa_IR person names and phone numbers. Thanks @aminalaee.
 
-`0.7.3 - 16-September-2016 <https://github.com/joke2k/faker/compare/v0.6.0...v0.7.3>`__
----------------------------------------------------------------------------------------
+`0.7.3 - 2016-09-16 <https://github.com/joke2k/faker/compare/v0.6.0...v0.7.3>`_
+-------------------------------------------------------------------------------
 
 * ``date_time_this_century`` now returns ``datetime`` s outside the current
   decade. Thanks @JarUrb.
@@ -708,14 +708,14 @@ Changelog
 * Adding support for Croatian ``hr_HR`` ssn (oib). Thanks @mislavcimpersak.
 * Rename PyPI package to ``Faker``.
 
-`0.6.0 - 09-August-2016 <https://github.com/joke2k/faker/compare/v0.5.11...v0.6.0>`__
--------------------------------------------------------------------------------------
+`0.6.0 - 2016-08-09 <https://github.com/joke2k/faker/compare/v0.5.11...v0.6.0>`_
+--------------------------------------------------------------------------------
 
 * Dropped Python 2.6 support
 
 
-`0.5.11 - 09-August-2016 <https://github.com/joke2k/faker/compare/v0.5.10...v0.5.11>`__
----------------------------------------------------------------------------------------
+`0.5.11 - 2016-08-09 <https://github.com/joke2k/faker/compare/v0.5.10...v0.5.11>`_
+----------------------------------------------------------------------------------
 
 * Add optional parameter `sex` to `profile` and `simple_profile`.
   Thanks @navyad.
@@ -723,21 +723,21 @@ Changelog
 * Fix utf8 coding issue with ``address/fi_FI`` provider. Thanks @delneg.
 * ! Latest version to support Python 2.6
 
-`0.5.10 - 01-August-2016 <https://github.com/joke2k/faker/compare/v0.5.9...v0.5.10>`__
---------------------------------------------------------------------------------------
+`0.5.10 - 2016-08-01 <https://github.com/joke2k/faker/compare/v0.5.9...v0.5.10>`_
+---------------------------------------------------------------------------------
 
 * Fix random_sample_unique. Thanks @cecedille1.
 
-`0.5.9 - 08-July-2016 <https://github.com/joke2k/faker/compare/v0.5.8...v0.5.9>`__
-----------------------------------------------------------------------------------
+`0.5.9 - 2016-06-08 <https://github.com/joke2k/faker/compare/v0.5.8...v0.5.9>`_
+-------------------------------------------------------------------------------
 
 * Add more ``pt_BR`` names. Thanks @cuducos.
 * Added ``en_GB`` names. Thanks @jonny5532.
 * Add romanized internet provider for ``zh_CN``.
 * Add ``fr_CH`` providers. Thanks @gfavre.
 
-`0.5.8 - 28-June-2016 <https://github.com/joke2k/faker/compare/v0.5.7...v0.5.8>`__
-----------------------------------------------------------------------------------
+`0.5.8 - 2016-06-28 <https://github.com/joke2k/faker/compare/v0.5.7...v0.5.8>`_
+-------------------------------------------------------------------------------
 
 * Improve CLI output and help. Thanks @cbaines.
 * Update ``en_US`` anmes to be more realistic. Thanks @dethpickle.
@@ -748,24 +748,24 @@ Changelog
 * Reduce the maximum value of start timestamps. Thanks @cbaines.
 * Add `random_sample` and `random_sample_unique`. Thanks @bengolder.
 
-`0.5.7 - 07-March-2016 <https://github.com/joke2k/faker/compare/v0.5.6...v0.5.7>`__
------------------------------------------------------------------------------------
+`0.5.7 - 2016-03-07 <https://github.com/joke2k/faker/compare/v0.5.6...v0.5.7>`_
+-------------------------------------------------------------------------------
 
 * Repackage to resolve PyPI issue.
 
-`0.5.6 - 07-March-2016 <https://github.com/joke2k/faker/compare/v0.5.5...v0.5.6>`__
------------------------------------------------------------------------------------
+`0.5.6 - 2016-03-07 <https://github.com/joke2k/faker/compare/v0.5.5...v0.5.6>`_
+-------------------------------------------------------------------------------
 
 * Add date handling for datetime functions. Thanks @rpkilby.
 * Discern male and female first names in pt_BR. Thanks @gabrielusvicente.
 
-`0.5.5 - 29-February-2016 <https://github.com/joke2k/faker/compare/v0.5.4...v0.5.5>`__
---------------------------------------------------------------------------------------
+`0.5.5 - 2016-02-29 <https://github.com/joke2k/faker/compare/v0.5.4...v0.5.5>`_
+-------------------------------------------------------------------------------
 
 * Specify help text for command line. Thanks @cbaines.
 
-`0.5.4 - 29-February-2016 <https://github.com/joke2k/faker/compare/v0.5.3...v0.5.4>`__
---------------------------------------------------------------------------------------
+`0.5.4 - 2016-02-29 <https://github.com/joke2k/faker/compare/v0.5.3...v0.5.4>`_
+-------------------------------------------------------------------------------
 
 * Expose Provider's random instance. Thank @gsingers for the suggestion.
 * Make sure required characters are in the password. Thanks @craig552uk.
@@ -797,8 +797,8 @@ Changelog
 * Fix chinese random language code. Thanks @kdeldycke.
 * Remove duplicate words from Lorem provider. Thanks @jeffwidman.
 
-`0.5.3 - 21-September-2015 <https://github.com/joke2k/faker/compare/v0.5.2...v0.5.3>`__
----------------------------------------------------------------------------------------
+`0.5.3 - 2015-09-21 <https://github.com/joke2k/faker/compare/v0.5.2...v0.5.3>`_
+-------------------------------------------------------------------------------
 
 * Added ``company_vat`` to company ``fi_FI`` provider. Thanks @kivipe.
 * Seed a Random instance instead of the module. Thanks Amy Hanlon.
@@ -818,8 +818,8 @@ Changelog
 * Fixed provider's example formatting in documentation.
 * Added en_AU provider. Thanks @xfxf.
 
-`0.5.2 - 11-June-2015 <https://github.com/joke2k/faker/compare/v0.5.1...v0.5.2>`__
-----------------------------------------------------------------------------------
+`0.5.2 - 2015-06-11 <https://github.com/joke2k/faker/compare/v0.5.1...v0.5.2>`_
+--------------------------------------------------------------------------------
 
 * Added ``uuid4`` to ``misc`` provider. Thanks Jared Culp.
 * Fixed ``jcb15`` and ``jcb16`` in ``credit_card`` provider.
@@ -830,8 +830,8 @@ Changelog
 * Added ``country_code`` to `address`` provider. Thanks @elad101 and Tobin Brown.
 
 
-`0.5.1 - 21-May-2015 <https://github.com/joke2k/faker/compare/v0.5...v0.5.1>`__
--------------------------------------------------------------------------------
+`0.5.1 - 2015-05-21 <https://github.com/joke2k/faker/compare/v0.5...v0.5.1>`_
+-----------------------------------------------------------------------------
 
 * Fixed egg installation. Thanks David R. MacIver, @kecaps
 * Updated person names for ``ru_RU``. Thanks @mousebaiker.
@@ -860,8 +860,8 @@ Changelog
 * Removed ``miscelleneous`` provider. It is superceded by the
   ``misc`` provider.
 
-`0.5.0 - 16-Feb-2015 <https://github.com/joke2k/faker/compare/v0.4.2...v0.5>`__
--------------------------------------------------------------------------------
+`0.5.0 - 2015-02-16 <https://github.com/joke2k/faker/compare/v0.4.2...v0.5>`_
+------------------------------------------------------------------------------
 
 * Localized providers
 * Updated ``ko_KR`` provider. Thanks Lee Yeonjae.
@@ -876,13 +876,13 @@ Changelog
 * Added ``ne_NP`` provider. Thanks Sudip Kafle.
 * Added provider for Austrian ``de_AT``. Thanks Bernhard Essl.
 
-`0.4.2 - 20-Aug-2014 <https://github.com/joke2k/faker/compare/v0.4.1...v0.4.2>`__
----------------------------------------------------------------------------------
+`0.4.2 - 2014-08-20 <https://github.com/joke2k/faker/compare/v0.4.1...v0.4.2>`_
+-------------------------------------------------------------------------------
 
 * Fixed setup
 
-`0.4.1 - 20-Aug-2014 <https://github.com/joke2k/faker/compare/v0.4...v0.4.1>`__
--------------------------------------------------------------------------------
+`0.4.1 - 2014-08-20 <https://github.com/joke2k/faker/compare/v0.4...v0.4.1>`_
+-----------------------------------------------------------------------------
 
 * Added MAC address provider. Thanks Sébastien Béal.
 * Added ``lt_LT`` and ``lv_LV`` localized providers. Thanks Edgar Gavrik.
@@ -894,8 +894,8 @@ Changelog
 * Fixed ``date_time_ad`` on 32bit Linux. Thanks @mdxs.
 * Fixed ``domain_word`` to output slugified strings.
 
-`0.4 - 30-Mar-2014 <https://github.com/joke2k/faker/compare/v0.3.2...v0.4>`__
------------------------------------------------------------------------------
+`0.4 - 2014-03-30 <https://github.com/joke2k/faker/compare/v0.3.2...v0.4>`_
+---------------------------------------------------------------------------
 
 * Modified en_US ``person.py`` to ouput female and male names.
   Thanks Adrian Klaver.
@@ -903,21 +903,21 @@ Changelog
 * Added ``hi_IN`` localized provider. Thanks Pratik Kabra.
 * Refactoring of command line
 
-0.3.2 - 11-Nov-2013
--------------------
+0.3.2 - 2013-11-11
+------------------
 
 * New provider: Credit card generator
 * Improved Documentor
 
 
-0.3.1
------
+0.3.1 - 2013-10-18
+------------------
 
 * FIX setup.py
 
 
-0.3 - 18-Oct-2013
------------------
+0.3 - 2013-10-18
+----------------
 
 * PEP8 style conversion (old camelCased methods are deprecated!)
 * New language: ``pt_BR`` (thanks to @rvnovaes)
@@ -926,8 +926,8 @@ Changelog
 * FIX tests for python 2.6
 
 
-0.2 - 01-Dec-2012
------------------
+0.2 - 2010-12-01
+----------------
 
 * New providers: ``Python``, ``File``
 * Providers imported with ``__import__``
@@ -936,7 +936,7 @@ Changelog
 * New language: French
 * Rewrite module ``__main__`` and new Documentor class
 
-0.1 - 13-Nov-2012
------------------
+0.1 - 2012-11-13
+----------------
 
 * First release
diff --git a/faker/providers/address/sv_SE/__init__.py b/faker/providers/address/sv_SE/__init__.py
index 9c1c1c9c..1db0c75e 100644
--- a/faker/providers/address/sv_SE/__init__.py
+++ b/faker/providers/address/sv_SE/__init__.py
@@ -21,7 +21,10 @@ class Provider(AddressProvider):
 
     address_formats = ("{{street_address}}\n{{postcode}} {{city}}", )
 
-    postcode_formats = ('#####', )
+    # Postcode should be formatted as described in
+    # https://sv.wikipedia.org/wiki/Postnummer_i_Sverige and
+    # in 2nd chapter of https://www.postnord.se/siteassets/pdf/faktablad/postnummersystemet-i-sverige-171213.pdf.
+    postcode_formats = ('%####', )
 
     city_formats = ('{{city_name}}', )
 
diff --git a/faker/providers/bank/tr_TR/__init__.py b/faker/providers/bank/tr_TR/__init__.py
new file mode 100644
index 00000000..e89db54f
--- /dev/null
+++ b/faker/providers/bank/tr_TR/__init__.py
@@ -0,0 +1,8 @@
+from .. import Provider as BankProvider
+
+
+class Provider(BankProvider):
+    """Implement bank provider for ``tr_TR`` locale."""
+
+    bban_format = '######################'
+    country_code = 'TR'
diff --git a/faker/providers/company/it_IT/__init__.py b/faker/providers/company/it_IT/__init__.py
index 8addb8be..4b2bbd0b 100644
--- a/faker/providers/company/it_IT/__init__.py
+++ b/faker/providers/company/it_IT/__init__.py
@@ -352,10 +352,30 @@ class Provider(CompanyProvider):
 
         return " ".join(result)
 
+    def _random_vat_office(self):
+        """
+        Returns a random code identifying the VAT office needed to build a valid VAT with company_vat.
+
+        See https://it.wikipedia.org/wiki/Partita_IVA#Tabella_degli_Uffici_IVA
+        """
+        val = self.random_int(1, 104)
+
+        # handle special cases
+        if val == 101:
+            return 120
+        elif val == 102:
+            return 121
+        elif val == 103:
+            return 888
+        elif val == 104:
+            return 999
+        # else: between 1 and 100 are all valid
+        return val
+
     def company_vat(self):
         """
         Returns Italian VAT identification number (Partita IVA).
         """
-        code = "0" + self.bothify('######') + str(self.generator.random.randrange(1, 121)).zfill(3)
+        code = self.bothify('#######') + str(self._random_vat_office()).zfill(3)
         luhn_checksum = str(calculate_luhn(code))
         return 'IT{}{}'.format(code, luhn_checksum)


Test patch:
diff --git a/tests/providers/test_bank.py b/tests/providers/test_bank.py
index 46f710ec..2ce36aff 100644
--- a/tests/providers/test_bank.py
+++ b/tests/providers/test_bank.py
@@ -11,6 +11,7 @@ from faker.providers.bank.fr_FR import Provider as FrFrBankProvider
 from faker.providers.bank.no_NO import Provider as NoNoBankProvider
 from faker.providers.bank.pl_PL import Provider as PlPlBankProvider
 from faker.providers.bank.pt_PT import Provider as PtPtBankProvider
+from faker.providers.bank.tr_TR import Provider as TrTrBankProvider
 
 
 def is_valid_iban(iban):
@@ -191,3 +192,18 @@ class TestFilPh(TestEnPh):
 class TestTlPh(TestEnPh):
     """Test tl_PH bank provider"""
     pass
+
+
+class TestTrTr:
+    """Test tr_TR bank provider"""
+
+    def test_bban(self, faker, num_samples):
+        for _ in range(num_samples):
+            assert re.fullmatch(r"\d{22}", faker.bban())
+
+    def test_iban(self, faker, num_samples):
+        for _ in range(num_samples):
+            iban = faker.iban()
+            assert is_valid_iban(iban)
+            assert iban[:2] == TrTrBankProvider.country_code
+            assert re.fullmatch(r"\d{2}\d{22}", iban[2:])
diff --git a/tests/providers/test_company.py b/tests/providers/test_company.py
index fb386714..0ba51c06 100644
--- a/tests/providers/test_company.py
+++ b/tests/providers/test_company.py
@@ -1,11 +1,15 @@
 import re
 
 from datetime import datetime
+from unittest.mock import patch
+
+import pytest
 
 from faker.providers.company.en_PH import Provider as EnPhCompanyProvider
 from faker.providers.company.fil_PH import Provider as FilPhCompanyProvider
 from faker.providers.company.hu_HU import Provider as HuHuCompanyProvider
 from faker.providers.company.hy_AM import Provider as HyAmCompanyProvider
+from faker.providers.company.it_IT import Provider as ItItCompanyProvider
 from faker.providers.company.ja_JP import Provider as JaJpCompanyProvider
 from faker.providers.company.nl_NL import Provider as NlNlCompanyProvider
 from faker.providers.company.pl_PL import Provider as PlPlCompanyProvider
@@ -322,3 +326,30 @@ class TestRuRu:
             bs_words = bs.split()
             assert isinstance(bs, str)
             assert bs_words[0] in RuRuCompanyProvider.bsWords[0]
+
+
+class TestItIt:
+    """Test it_IT company provider methods"""
+
+    vat_regex = re.compile(r"^IT\d{7}(0\d{2}|100|120|121|888|999)\d$", flags=re.ASCII)
+
+    def test_company_vat(self, faker, num_samples):
+        for _ in range(num_samples):
+            company_vat = faker.company_vat()
+            assert self.vat_regex.match(company_vat)
+
+    @pytest.mark.parametrize("value, expected", (
+        (100, "100"),
+        (101, "120"),
+        (102, "121"),
+        (103, "888"),
+        (104, "999"),
+    ))
+    def test_company_vat_special_cases(self, faker, value, expected):
+        # this test allows to get full code coverage for company_vat fixing the internal state of the random generator
+        fake = ItItCompanyProvider(generator=faker)
+
+        with patch.object(fake, "random_int", return_value=value, autospec=True):
+            company_vat = fake.company_vat()
+            assert self.vat_regex.match(company_vat)
+            assert company_vat[9:12] == expected