instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
joke2k__django-environ-468 | [
{
"changes": {
"added_entities": [
"environ/environ.py:Env._get_value"
],
"added_modules": null,
"edited_entities": [
"environ/environ.py:Env.__init__",
"environ/environ.py:Env.get_value"
],
"edited_modules": [
"environ/environ.py:Env"
]
... | joke2k/django-environ | 69b4bc9a5aa855040ca9e8da19aea35a08dcd639 | Any plan to support embedded variables?
I was wondering if there has been discussions/plans to support embedded variables in .env file. For example,
```
# .env file with embedded variables
LIB_PATH=/home/username/.lib
GDAL_LIBRARY_PATH=${LIB_PATH}/osgeo/gdal304.dll
GEOS_LIBRARY_PATH=${LIB_PATH}/osgeo/geos_c.dll
... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 682b107..b8daeff 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,8 @@ Added
+++++
- Added support for secure Elasticsearch connections
`#463 <https://github.com/joke2k/django-environ/pull/463>`_.
+- Added variable expansion
+ `#468 <https://github.com/j... |
joke2k__django-environ-500 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "environ/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"environ/environ.... | joke2k/django-environ | 7b5d7f933dc91fd43d744f06d2282860ee53aa38 | Hash sign inside double quotes is interpreted as the start of a comment
Ran into this problem when updating to `0.11.2` for a project with an `.env` file like this:
```
SECRET_KEY="abc#def"
```
The `SECRET_KEY` used to be `abc#def` but now is read as `"abc`.
Apparently the `#` is interpreted as the start of ... | diff --git a/.gitignore b/.gitignore
index 5862901..0b4fa31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
# This file is part of the django-environ.
#
-# Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch>
+# Copyright (c) 2021-2023, Serghei Iakovlev <egrep@protonmail.ch>
# Copyright (c) 2013-2021,... |
joke2k__django-environ-520 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"environ/environ.py:Env.get_value"
],
"edited_modules": [
"environ/environ.py:Env"
]
},
"file": "environ/environ.py"
},
{
"changes": {
"added_entities": nu... | joke2k/django-environ | a1113e41f134d3a5b2b6f98c81539f07da2269a7 | Wrong missing environment variable name if using prefix
If setting a prefix, the name of a missing environment variable is incorrectly reported without it.
```python
# settings.py
env = environ.Env()
env.prefix = "DJANGO_"
SECRET_KEY = env.str("SECRET_KEY")
```
```sh
raise ImproperlyConfigured(error... | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4e28fa5..b5e76c0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,10 +26,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4.1.1
- - name: Set up Python 3.10
- uses: action... |
joke2k__django-environ-57 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"environ/environ.py:Env.db_url_config"
],
"edited_modules": [
"environ/environ.py:Env"
]
},
"file": "environ/environ.py"
}
] | joke2k/django-environ | 0033650843d1be51b4e05dc3ccb58bbfee44e42c | Unspecified database properties default to `None` rather than the empty string
Using django-environ v0.4.0 on Python v2.7.10.
**STR:**
```bash
$ DATABASE_URL='mysql://root@localhost/test_db'
$ python
>>> import json
>>> import environ
>>> env = environ.Env()
>>> print(json.dumps(env.db_url('DATABASE_URL'), in... | diff --git a/environ/environ.py b/environ/environ.py
index ca07f93..601523d 100644
--- a/environ/environ.py
+++ b/environ/environ.py
@@ -330,7 +330,7 @@ class Env(object):
>>> from environ import Env
>>> Env.db_url_config('sqlite:////full/path/to/your/file.sqlite')
- {'ENGINE': 'django.db.bac... |
joke2k__faker-1037 | [
{
"changes": {
"added_entities": [
"faker/build_docs.py:write_base_provider"
],
"added_modules": [
"faker/build_docs.py:write_base_provider"
],
"edited_entities": [
"faker/build_docs.py:write_docs"
],
"edited_modules": [
"faker/build_docs... | joke2k/faker | 8941a9f149405d0f7fedc509a8d54b3aec50e4a0 | ipv4 faker very slow
Hi! We updated from Faker 0.9.0 to 0.9.2 and noticed our tests speed decreased by 5X. We tracked the bug to the changes in the ipv4 faker done in commit 3b847f48bbfc33aed3e86cffcedbcfd1c0cccec5
### Steps to reproduce
1. checkout to commit 3b847f48bbfc33aed3e86cffcedbcfd1c0cccec5
1. run the f... | diff --git a/faker/build_docs.py b/faker/build_docs.py
index 3afc4714..17a96d3d 100644
--- a/faker/build_docs.py
+++ b/faker/build_docs.py
@@ -15,6 +15,12 @@ def write(fh, s):
return fh.write(s.encode('utf-8'))
+def write_base_provider(fh, doc, base_provider):
+ formatters = doc.get_provider_formatters(base... |
joke2k__faker-1043 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/bank/en_GB/__init__.py:Provider"
]
},
"file": "faker/providers/bank/en_GB/__init__.py"
}
] | joke2k/faker | e87a753f0463b259fffeacf2a33f0ed7f38ac023 | BBAN for en_GB too short
* Faker version: v2.0.3
* OS: linux
Numeric part of the en_GB BBAN needs to be 14 digits long, it currently only returns 13, failing further validation.
### Steps to reproduce
Invoke `fake.iban()` or `fake.bban()` with the en_GB locale, an IBAN or BBAN with 1 digit missing is returned... | diff --git a/faker/providers/bank/en_GB/__init__.py b/faker/providers/bank/en_GB/__init__.py
index 9486de78..75daaf2e 100644
--- a/faker/providers/bank/en_GB/__init__.py
+++ b/faker/providers/bank/en_GB/__init__.py
@@ -2,5 +2,5 @@ from .. import Provider as BankProvider
class Provider(BankProvider):
- bban_form... |
joke2k__faker-1045 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/generator.py:Generator.__format_token"
],
"edited_modules": [
"faker/generator.py:Generator"
]
},
"file": "faker/generator.py"
},
{
"changes": {
"ad... | joke2k/faker | c284aa604b0fb931bdb7533714fe1ee386b8cedc | EAN-13 starting with 0
ean13 function generates codes starting with zeroes.
According to http://www.barcodeisland.com/ean13.phtml ean13 has to duplicate the leading zero.
So basically UPC-A code "075678164125" in ean13 form should be "0075678164125". | diff --git a/build32bit.sh b/build32bit.sh
index c493d7f3..c9df66f0 100755
--- a/build32bit.sh
+++ b/build32bit.sh
@@ -10,6 +10,7 @@ docker run -v ${PWD}:/code -e INSTALL_REQUIREMENTS=${INSTALL_REQUIREMENTS} i386/
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq python3 locales python3-pip debianutils \
... |
joke2k__faker-1046 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/isbn/__init__.py:Provider._registrant_publication"
],
"edited_modules": [
"faker/providers/isbn/__init__.py:Provider"
]
},
"file": "faker/providers/isbn... | joke2k/faker | c284aa604b0fb931bdb7533714fe1ee386b8cedc | Fake ISBN10 causes "Registrant/Publication not found"
In rare cases the `fake.isbn10` method throws an exception with the following message: `Exception: Registrant/Publication not found in registrant rule list. `
A full exception message:
```
/usr/local/lib/python3.6/site-packages/faker/providers/isbn/__init__.py:... | diff --git a/faker/providers/isbn/__init__.py b/faker/providers/isbn/__init__.py
index ada84898..2d6ace9c 100644
--- a/faker/providers/isbn/__init__.py
+++ b/faker/providers/isbn/__init__.py
@@ -52,7 +52,7 @@ class Provider(BaseProvider):
:returns: A (registrant, publication) tuple of strings.
"""
... |
joke2k__faker-1047 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/generator.py:Generator.__format_token"
],
"edited_modules": [
"faker/generator.py:Generator"
]
},
"file": "faker/generator.py"
},
{
"changes": {
"ad... | joke2k/faker | c284aa604b0fb931bdb7533714fe1ee386b8cedc | Would a faker.format() method make sense?
It could enable the syntax:
`print(faker.format('{name} considers a {catch_phrase} in {country}'))`
A sample implementation show how simple it would be:
``` python
def fake_fmt(fmt="{first_name}'s favorite number: {random_int}", fake=None):
fake = fake or Faker()
fiel... | diff --git a/faker/generator.py b/faker/generator.py
index 40135a1b..b66b89bb 100644
--- a/faker/generator.py
+++ b/faker/generator.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
import random as random_module
import re
+import six
_re_token = re.compile(r'\{\{(\s?)(\w+)(\s?)\}\}')
random = random_m... |
joke2k__faker-1049 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/generator.py:Generator.__format_token"
],
"edited_modules": [
"faker/generator.py:Generator"
]
},
"file": "faker/generator.py"
},
{
"changes": {
"ad... | joke2k/faker | 97b553654a54c159ccf1ad07b5e0b4dde50b1c79 | Empty range bug with pyfloat
* Faker version: 2.0.3
* OS: macOS 10.14.6 (Mojave)
Calling `pyfloat` with `min_value` or `max_value` can result in both being set to the same thing, and causing errors. May have been introduced by #995.
### Steps to reproduce
```
for _ in range(1000):
faker.pyfloat(max_value=... | diff --git a/build32bit.sh b/build32bit.sh
index c493d7f3..c9df66f0 100755
--- a/build32bit.sh
+++ b/build32bit.sh
@@ -10,6 +10,7 @@ docker run -v ${PWD}:/code -e INSTALL_REQUIREMENTS=${INSTALL_REQUIREMENTS} i386/
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq python3 locales python3-pip debianutils \
... |
joke2k__faker-1069 | [
{
"changes": {
"added_entities": [
"faker/providers/misc/__init__.py:Provider.zip",
"faker/providers/misc/__init__.py:Provider.tar"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/misc/__init__.py:Provider"
]
... | joke2k/faker | 1ec4a6a9233431e8db3a6d9fc1e54ad76a8f95ca | Feature Request: Fake Binary Content
Let's say I want to write unit tests for my web service that has a file upload feature.
It would be great if I can fake random binary content of popular binary file types, especially images and documents, like:
- *.jpg
- *.pdf
- *.doc/docx
I think image uploading is probabl... | diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index 0e4030d3..0247ecdd 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -2,9 +2,14 @@
from __future__ import unicode_literals
import hashlib
+import io
import string
+import tarfile
import uui... |
joke2k__faker-1116 | [
{
"changes": {
"added_entities": [
"faker/providers/address/pt_BR/__init__.py:Provider.postcode"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/address/pt_BR/__init__.py:Provider"
]
},
"file": "faker/providers/a... | joke2k/faker | 9cbfd917bd0776ec894fb67d5bfd71366a520522 | Generation of Country Phone Code
I would like to generate random country phone prefix from here: https://en.wikipedia.org/wiki/List_of_country_calling_codes
Result should be: +213, +350, +56 etc.
Is there a way to do this?
Thanks | diff --git a/faker/providers/address/pt_BR/__init__.py b/faker/providers/address/pt_BR/__init__.py
index dacd633f..8b524801 100644
--- a/faker/providers/address/pt_BR/__init__.py
+++ b/faker/providers/address/pt_BR/__init__.py
@@ -99,7 +99,8 @@ class Provider(AddressProvider):
building_number_formats = ('%', '%#... |
joke2k__faker-1117 | [
{
"changes": {
"added_entities": [
"faker/providers/address/pt_BR/__init__.py:Provider.postcode"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/address/pt_BR/__init__.py:Provider"
]
},
"file": "faker/providers/a... | joke2k/faker | 9cbfd917bd0776ec894fb67d5bfd71366a520522 | Can we have a "non formatted" postcode for pt_BR localization?
* Faker version: 3.0.0
* OS: Windows 10 pro (x64)
I'm using Faker to generate postcode using the pt_BR localization. The example on [`address` section](https://faker.readthedocs.io/en/latest/locales/pt_BR.html#faker-providers-address) shows a numeric se... | diff --git a/faker/providers/address/pt_BR/__init__.py b/faker/providers/address/pt_BR/__init__.py
index dacd633f..8b524801 100644
--- a/faker/providers/address/pt_BR/__init__.py
+++ b/faker/providers/address/pt_BR/__init__.py
@@ -99,7 +99,8 @@ class Provider(AddressProvider):
building_number_formats = ('%', '%#... |
joke2k__faker-1137 | [
{
"changes": {
"added_entities": [
"faker/providers/internet/__init__.py:Provider.dga"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/internet/__init__.py:Provider"
]
},
"file": "faker/providers/internet/__init_... | joke2k/faker | d5123ba865cbcc89d82ee3a30992119f09c4e5b9 | pydict(variable_nb_elements=False) returns dicts with varying number of elements
* Faker version: 4.0.1
* OS: OS X 10.15.3
pydict with `variable_nb_elements=False` still has varying number of elements.
### Steps to reproduce
```
from faker import Faker
fake = Faker()
nb = 80
for _ in range(30): # nb ... | diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index 60dab824..e42ff0bd 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -222,6 +222,33 @@ class Provider(BaseProvider):
company = self._to_ascii(company_elements.pop(0))
... |
joke2k__faker-1164 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/misc/__init__.py:Provider.uuid4"
],
"edited_modules": [
"faker/providers/misc/__init__.py:Provider"
]
},
"file": "faker/providers/misc/__init__.py"
}
... | joke2k/faker | 9f48a5c6a251b2b8d9f84f65472f946b85b9a923 | Why does faker.misc.uuid has `cast_to=str` by default?
# I'm willing to open PR
should this issue be accepted
* Faker version: latest
* OS: N/A
`faker.misc.uuid` has a arg `cast_to` with `str` as default. So the returned value is always string.
https://github.com/joke2k/faker/blob/9f48a5c6a251b2b8d9f84f65472... | diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index c4906eff..39fb692f 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -87,12 +87,20 @@ class Provider(BaseProvider):
return res.hexdigest()
def uuid4(self, cast_to=str):
- "... |
joke2k__faker-1193 | [
{
"changes": {
"added_entities": [
"faker/providers/person/__init__.py:Provider.language_name"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/person/__init__.py:Provider"
]
},
"file": "faker/providers/person/__i... | joke2k/faker | 5b8105a7576114e9ec8e2da771dcadaf6453b33b | New feature: language_name
Hi. I want to add a new method that would return random language name (e.g. English, Spanish, Dutch). I'm not sure where I should place this method. Initially I wanted to add this to BaseProvider near the language_code method, but this provider has no locale support.
Any thoughts? | diff --git a/faker/providers/person/__init__.py b/faker/providers/person/__init__.py
index 05ecb61a..f19f9f71 100644
--- a/faker/providers/person/__init__.py
+++ b/faker/providers/person/__init__.py
@@ -10,6 +10,42 @@ class Provider(BaseProvider):
last_names = ['Doe']
+ # https://en.wikipedia.org/wiki/List_... |
joke2k__faker-1312 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 299f6b6bbc18fc576642069ccfbf279160b7be54 | Sometimes generated person names end with a space (in it_IT)
* Faker version: `Faker==4.14.0`
* OS: `Linux`
Sometimes the names it generates in Italian end with a space (e.g. `'Sig.ra Loretta Pagliaro '`), I suspect it's due to the fact that there are no suffixes defined.
Maybe the regression is introduced by ht... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 19c07de5..1b9927e0 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 4.14.0
+current_version = 4.14.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.rst b/CHANGE... |
joke2k__faker-1348 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 95d865fcaa9774b8d4ded7aa5f2ee5b7d78e6eeb | Performance Optimizations
* Faker version: Master branch
* OS: Mac OS
I am a Performance Engineer at Salesforce.org and I use Faker within my tool Snowfakery to generate hundreds of millions of rows of data. Some teams within my company have avoided Faker because they say it is too slow.
I'm a huge fan of Fak... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index ea106d8b..b2ec20af 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 5.4.0
+current_version = 5.4.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGELOG... |
joke2k__faker-1368 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/lorem/__init__.py:Provider.sentence"
],
"edited_modules": [
"faker/providers/lorem/__init__.py:Provider"
]
},
"file": "faker/providers/lorem/__init__.py... | joke2k/faker | 434457ea74daf0d9c3c7380eb91af4ae34936725 | Random sentence of length 1 fails
* Faker version: 5.5.0
* OS: Ubuntu 20.04.1
Creating a random sentence of length 1 fails because it attempts to titleize the first word of the sentence, but `random_choices` is returning a tuple which is immutable.
This also occurs sometimes with 2 or 3 length sentences, altho... | diff --git a/faker/providers/lorem/__init__.py b/faker/providers/lorem/__init__.py
index cc17fa47..42c4030f 100644
--- a/faker/providers/lorem/__init__.py
+++ b/faker/providers/lorem/__init__.py
@@ -22,7 +22,7 @@ class Provider(BaseProvider):
sentence_punctuation = '.'
def words(self, nb=3, ext_word_list=No... |
joke2k__faker-1370 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 434457ea74daf0d9c3c7380eb91af4ae34936725 | Documentation mistype
* Faker version:5.5.0
* OS: NA
In [Multiple Locale Mode](https://faker.readthedocs.io/en/stable/fakerclass.html#multiple-locale-mode) session
```
from collections import OrderedDict
from faker import Faker
locale_list = ['en-US', 'ja-JP', 'en_US']
fake1 = Faker(locale_list)
# Will re... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index cd0db80d..8c5bff51 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 5.5.0
+current_version = 5.5.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGELOG... |
joke2k__faker-1393 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pyfloat"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.... | joke2k/faker | b2f787c669abcb6beeaea1b034109b90721195fa | pyfloat provider with positive=True sometimes returns zero
* Faker version: 5.8.0
* OS: macOS 11.1
Call pyfloat with positive=True, and it will sometimes return a zero.
### Steps to reproduce
Here's an example:
```
import faker
f=faker.Faker()
are_zero = [f.pyfloat(positive=True, max_value=10)==0 for _... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 3f470e07..1febbeac 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -66,9 +66,9 @@ class Provider(BaseProvider):
raise ValueError('Min value cannot be greater than max value... |
joke2k__faker-1416 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pytuple"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.... | joke2k/faker | 56e777f1ba0bab25bbd5049b56805bc89ac1d39a | pytuple can occassionally return fewer than expected elements
* Faker version: 6.1.1
* OS: Mac OSX 10.15.5
Sporadically using pytuple may result in the tuple having less than the requested elements (`nb_elements`) even when `variable_nb_elements` is set to False.
This happens because pytuple relies on pyset, ret... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 2a0a4cc1..e6b2391f 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -123,7 +123,7 @@ class Provider(BaseProvider):
def pytuple(self, nb_elements=10, variable_nb_elements=True, val... |
joke2k__faker-1443 | [
{
"changes": {
"added_entities": [
"faker/providers/bank/__init__.py:Provider.aba"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/bank/__init__.py:Provider"
]
},
"file": "faker/providers/bank/__init__.py"
}
] | joke2k/faker | 6a213584de86e8338468c7daa789df1be5be73c5 | Adding ABA Routing Number to Bank Provider
* Faker version:8.1.2
Is there any interest in adding ABA routing numbers to the Bank provider? https://en.wikipedia.org/wiki/ABA_routing_transit_number
This would be helpful for my use case and have code to generate but wanted to check before putting more effort in. | diff --git a/faker/providers/bank/__init__.py b/faker/providers/bank/__init__.py
index ee46e800..9c7407b3 100644
--- a/faker/providers/bank/__init__.py
+++ b/faker/providers/bank/__init__.py
@@ -1,6 +1,7 @@
import re
import string
+from math import ceil
from string import ascii_uppercase
from .. import BaseProv... |
joke2k__faker-1453 | [
{
"changes": {
"added_entities": [
"faker/proxy.py:Faker.__deepcopy__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/proxy.py:Faker"
]
},
"file": "faker/proxy.py"
}
] | joke2k/faker | ca43530c384807393bf2812ea86a16978738b2af | Raises RecursionError under certain conditions
* Faker version: 8.4.0
* OS: Arch Linux with kernel 5.12.6
Certain conditions can trigger a `RecursionError: maximum recursion depth exceeded`. I encountered this error in a django project, see below the steps to reproduce this error.
### Steps to reproduce
1. `p... | diff --git a/faker/proxy.py b/faker/proxy.py
index bed7316e..4fd7f220 100644
--- a/faker/proxy.py
+++ b/faker/proxy.py
@@ -1,3 +1,4 @@
+import copy
import functools
import random
import re
@@ -100,7 +101,6 @@ class Faker:
:param attr: attribute name
:return: the appropriate attribute
"""
-... |
joke2k__faker-1461 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pyfloat"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.... | joke2k/faker | 6428fb541cf4e84b809c684c31d59ac088102aa4 | pydecimal left_digits ignored if min_value or max_value is specified
`max_value` should be set to `10 ** (left_digits -1) - epsilon` before this:
https://github.com/joke2k/faker/blob/d9f4b00b9134e6dfbb09cc1caa81c912b79c3c7c/faker/providers/python/__init__.py#L92-L102
Use cases for using both include:
- `min_va... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 7823f592..ec28ddc0 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -1,3 +1,4 @@
+import math
import string
import sys
import warnings
@@ -69,10 +70,15 @@ class Provider(BaseProvider)... |
joke2k__faker-1475 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/cli.py:print_doc"
],
"edited_modules": [
"faker/cli.py:print_doc"
]
},
"file": "faker/cli.py"
},
{
"changes": {
"added_entities": [
"faker/e... | joke2k/faker | 22017a42b36751b210b0d9b323d738d6fc091bc4 | faker command line fails with "faker.exceptions.UnsupportedFeature: `image` requires the `Pillow` python library."
* Faker version: 8.8.2
* OS: Ubuntu
It looks like the image faker added in #1254 / 8.5.0 broke the faker command line?
is the fix to catch `UnsupportedFeature` in cli.py, and maybe print a warning?
... | diff --git a/faker/cli.py b/faker/cli.py
index 786060a3..cef26c7e 100644
--- a/faker/cli.py
+++ b/faker/cli.py
@@ -7,7 +7,7 @@ import sys
from pathlib import Path
from typing import Any, Dict, List, Optional, TextIO
-from faker import VERSION, Faker, documentor
+from faker import VERSION, Faker, documentor, excepti... |
joke2k__faker-1480 | [
{
"changes": {
"added_entities": [
"faker/proxy.py:Faker.__setstate__",
"faker/proxy.py:UniqueProxy.__getstate__",
"faker/proxy.py:UniqueProxy.__setstate__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/proxy.py:Faker"... | joke2k/faker | 62644271b395881073461283baa59164148b6983 | RecursionError with spark udf
* Faker version: 8.10.0
* OS: Ubuntu 18.04.5 LTS
I have covered the [issue in presidio library](https://github.com/microsoft/presidio/issues/741) but some time later I realized that the problem may lay here. I am trying to use the Faker inside the function which is converted to pyspark... | diff --git a/faker/proxy.py b/faker/proxy.py
index 4fd7f220..25d29525 100644
--- a/faker/proxy.py
+++ b/faker/proxy.py
@@ -127,6 +127,9 @@ class Faker:
}
return result
+ def __setstate__(self, state):
+ self.__dict__.update(state)
+
@property
def unique(self):
return sel... |
joke2k__faker-1509 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 2a8b097e35f2ac69743eb1bed44c3324c93ebe8c | Bug in `mac_platform_token`
* Faker version: Latest
* OS: Any
`mac_platform_token` generates a MacOS platform token used in user agent strings. However, during https://github.com/joke2k/faker/commit/da1ae11a06a8f64bd4b0f7d1391d7661521e4caf#diff-7d7f34af58b0ae686b413e6ed3463229243aacfb0891fbc544cb951224c5af97L220, l... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 5044895e..3782252e 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 8.12.1
+current_version = 8.12.2
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1520 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pydecimal"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init_... | joke2k/faker | 948461af5094e9a2de1bd3357e715981490264a1 | pydecimal unnecessarily limited by float's max digits
* Faker version: master at time of writing https://github.com/joke2k/faker/commit/d9f4b00b9134e6dfbb09cc1caa81c912b79c3c7c
* OS: Linux
Python's `Decimal` can be arbitrarily many digits; with default precision 28. Faker's `pydecimal` uses `pyfloat`, and so gets l... | diff --git a/README.rst b/README.rst
index 572a393d..559de2fc 100644
--- a/README.rst
+++ b/README.rst
@@ -230,7 +230,7 @@ Examples:
94812 Biedenkopf
$ faker profile ssn,birthdate
- {'ssn': u'628-10-1085', 'birthdate': '2008-03-29'}
+ {'ssn': '628-10-1085', 'birthdate': '2008-03-29'}
$ faker -r... |
joke2k__faker-1567 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 7093e5ab9b5e894e04807130b75dc940c7a9d53a | `ElementsType` requires `Sequence[T]`, not just `Iterable[T]`?
The definition for `ElementsType` currently requires a sequence, or dict keys:
https://github.com/joke2k/faker/blob/7093e5ab9b5e894e04807130b75dc940c7a9d53a/faker/providers/__init__.py#L18
I can't see why it needs to be a _sequence_ though, i.e. havin... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index b511b0b9..538a3a02 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 9.8.0
+current_version = 9.8.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGELOG... |
joke2k__faker-1569 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/bank/pl_PL/__init__.py:Provider"
]
},
"file": "faker/providers/bank/pl_PL/__init__.py"
}
] | joke2k/faker | e46676c5b2ec9a57f778a4f62cad0b9f21d4e444 | too long iban generated for pl-PL locale
* Faker version: 9.8.2
* OS: MacOs 12.0.1
IBANs generated for pl_PL locales are 30 characters long. This is too many. Valid PL IBAN should have 28 characters (including country code).
### Steps to reproduce
Generate a Polish IBAN with:
```
from faker import Faker
fa... | diff --git a/faker/providers/bank/pl_PL/__init__.py b/faker/providers/bank/pl_PL/__init__.py
index 9d9b8f64..9cf6624d 100644
--- a/faker/providers/bank/pl_PL/__init__.py
+++ b/faker/providers/bank/pl_PL/__init__.py
@@ -4,5 +4,5 @@ from .. import Provider as BankProvider
class Provider(BankProvider):
"""Implement ... |
joke2k__faker-1600 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/documentor.py:Documentor.get_formatters"
],
"edited_modules": [
"faker/documentor.py:Documentor"
]
},
"file": "faker/documentor.py"
},
{
"changes": {
... | joke2k/faker | d1b3b83fe04ed6cf7be52ff50a8ecd99b3e67df8 | Incorrect language set on Provider during locale fallback
* Faker version: 11.3.0
When faker is initialised with a locale not implemented by some of the built-in providers, it falls back to the DEFAULT_LOCALE for these providers. However, the language set on the provider’s instance in `__lang__` is still the request... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3a5d9a99..1762e314 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -128,9 +128,16 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: python -m pip install ... |
joke2k__faker-1607 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | fc127fa65b7d16817b1fcea6f4186ef417ed4fcc | es_ES postalcode is not generating valid codes
* Faker version: 11.3
* OS: Any
When using postcode for es_ES and using it with a field that requires a valid Postal Code, it fails sometimes.
I will assume that there is no logic with postal code generation for Spain.
### Steps to reproduce
Generate postal code... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 46e7beeb..cd3658e5 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 12.1.0
+current_version = 12.3.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/.github/workflows/gh-r... |
joke2k__faker-1609 | [
{
"changes": {
"added_entities": [
"faker/providers/address/de_CH/__init__.py:Provider.city_name"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/address/de_CH/__init__.py:Provider"
]
},
"file": "faker/providers/... | joke2k/faker | fc127fa65b7d16817b1fcea6f4186ef417ed4fcc | fake.address does not work properly for 'de-CH'
* Faker version: 9.8.3 build: pyhd8ed1ab_0 from: conda-forge
* OS: Windows 10 / anaconda
fake = Faker('de_CH')
fake.address()
does not work properly.
Instead of producing a city/village, it produces a Canton
### Steps to reproduce
from... | diff --git a/faker/providers/address/de_CH/__init__.py b/faker/providers/address/de_CH/__init__.py
index d0604d9d..3a096b65 100644
--- a/faker/providers/address/de_CH/__init__.py
+++ b/faker/providers/address/de_CH/__init__.py
@@ -4,7 +4,7 @@ from .. import Provider as AddressProvider
class Provider(AddressProvide... |
joke2k__faker-1616 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | ac03e74747a098b0ffce41b54a24e4e0404a85ed | Missing tests in various address providers
* Faker version: 5.0.2
* OS: Mac OS Big Sur
While creating another provider for a PR and doing it's necessary tests, I noticed that there are some address providers that don't have tests. I think that every provider should have it's test for uniformity and assurance that t... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index c15b26e2..0f724400 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 12.3.0
+current_version = 13.0.0
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/.github/PULL_REQUEST_T... |
joke2k__faker-1630 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/generator.py:Generator.seed"
],
"edited_modules": [
"faker/generator.py:Generator"
]
},
"file": "faker/generator.py"
},
{
"changes": {
"added_entiti... | joke2k/faker | 5b6ce484e20987dfae7f0e180bb85a55c0f498c3 | Faker changes data for same seed
* Faker version:4.17.1
* OS:mac OS Catalina
Brief summary of the issue goes here.
### Steps to reproduce
1. Initialize faker based on a constant: Faker.seed(int(constant_string))
2. Generate data such as faker.ssn(), faker.first_name() etc
3.
### Expected behavior
The... | diff --git a/faker/generator.py b/faker/generator.py
index f4950efe..613c44dc 100644
--- a/faker/generator.py
+++ b/faker/generator.py
@@ -11,6 +11,9 @@ random = random_module.Random()
mod_random = random # compat with name released in 0.8
+Sentinel = object()
+
+
class Generator:
__config: Dict[str, Dict... |
joke2k__faker-1660 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/user_agent/__init__.py:Provider.firefox"
],
"edited_modules": [
"faker/providers/user_agent/__init__.py:Provider"
]
},
"file": "faker/providers/user_age... | joke2k/faker | 827eea82685fde9377c2e4ba28dc0df7d3bf32f0 | Firefox user agents with fixed seed are non-deterministic
* Faker version: tested on 8.14.1
* OS: MacOS
Seeded calls to `user_agent.firefox()` do not produce deterministic results, dependening on *when* the code is executed.
### Steps to reproduce
1. Run
```python
from faker import Faker
faker = Faker()
f... | diff --git a/faker/providers/user_agent/__init__.py b/faker/providers/user_agent/__init__.py
index e49a113c..02bfd0ff 100644
--- a/faker/providers/user_agent/__init__.py
+++ b/faker/providers/user_agent/__init__.py
@@ -1,9 +1,11 @@
import string
-from datetime import datetime
+from datetime import datetime, timedelt... |
joke2k__faker-1711 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | e0c2d8f62e39ef7b8c4cee8ef0c681722e293b67 | Allow prefix and suffix values for pystr provider
* Faker version: 14.1.0
* OS: OpenSUSE Leap 15.3
I am trying to replace [`factory.fuzzy.FuzzyText`](https://factoryboy.readthedocs.io/en/stable/fuzzy.html#fuzzytext) with the *faker* equivalent, as the *fuzzy* implementations are going to be discontinued in the futu... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 3dcef7e4..baa45f0c 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 14.1.0
+current_version = 14.1.2
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/.github/workflows/ci.y... |
joke2k__faker-1741 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 919a26ee1f97cf0dd41bce39bee3729110c736c5 | ValueError: empty range for pyfloat
* Faker version: 14.0.0
* OS: macOS 12.5 (Monterey)
pyfloat throws ValueError when min_value and max_value have the same left digits.
### Steps to reproduce
```
from faker import Faker
fake = Faker()
fake.pyfloat(min_value=1.25, max_value=1.75)
```
### Expected ... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 6d2394f1..037b8645 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 15.1.1
+current_version = 15.1.2
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1754 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/proxy.py:Faker._select_factory"
],
"edited_modules": [
"faker/proxy.py:Faker"
]
},
"file": "faker/proxy.py"
}
] | joke2k/faker | 9fa601988065a902cc05076c3f8565ce33cb8c94 | Faker returns one value when using multiple locales
* Faker version: 13.11
* OS: Mac OS Monterey
Computer: MacBook Pro (14-inch, 2021)
Brief summary of the issue goes here.
If using multiple locales, faker only makes one choice. This only happens when you select multiple locales
### Steps to reproduce
```
... | diff --git a/faker/proxy.py b/faker/proxy.py
index eee266a4..421da0b4 100644
--- a/faker/proxy.py
+++ b/faker/proxy.py
@@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, List, Optional, Pattern, Sequence, Tuple
from .config import DEFAULT_LOCALE
from .exceptions import UniquenessException
from .factory import F... |
joke2k__faker-1800 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 47beb06773685c4bb8450a8abd231ac01fe8a778 | Latvian ssn generator is not correct
* Faker version: 17.0.0
* OS: Windows
Latvian ssn generator generates ssn in format 'ddd-dd-dddd', which is not correct.
### Steps to reproduce
```
from faker import Faker
fake = Faker('lv_LV')
fake.ssn()
```
### Expected behavior
It should be 12 characters ... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 5a7da4bc..26d4ff16 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 17.0.0
+current_version = 17.1.0
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1821 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/address/en_US/__init__.py:Provider.postcode_in_state"
],
"edited_modules": [
"faker/providers/address/en_US/__init__.py:Provider"
]
},
"file": "faker/pr... | joke2k/faker | 5de6bf3fb811272b7e13b6da6623ee1fdfa3efe3 | states_postcode fails with territories
* Faker version: since 15.1.2
* OS: All
Brief summary of the issue goes here.
en_US state fix in 15.1.2 added territories, which are not in states_postcode
Looking up postcode by state fails with territories enabled, but didn't fail prior to 15.1.2.
The fix made here:
... | diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py
index 4242e781..4bf14695 100644
--- a/faker/providers/address/en_US/__init__.py
+++ b/faker/providers/address/en_US/__init__.py
@@ -419,6 +419,15 @@ class Provider(AddressProvider):
"WV": (24701, 26886),
... |
joke2k__faker-1838 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 44d029939fa889eeb53c1a827e817a8a3e535d63 | Some currency symbols missing from currency provider
* Faker version: v4.0.1 onwards
* OS: Archlinux
Some currencies do not have any symbols associated with them.
### Steps to reproduce
```
from faker import Faker
fake = Faker()
currency = fake.currency() # returns ("GGP", "Guernsey pound")
currency = ("... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 02941076..00918578 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 18.3.2
+current_version = 18.3.4
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1869 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/address/fr_FR/__init__.py:Provider.postcode"
],
"edited_modules": [
"faker/providers/address/fr_FR/__init__.py:Provider"
]
},
"file": "faker/providers/a... | joke2k/faker | fa79c6b0c510274b08b46ad0f007fd1b517a9ab2 | fr_FR address provider generates less than 5 digits postcode
* Faker version: master (18.9.0), bug introduced by https://github.com/joke2k/faker/pull/1852
The new provider method can generate 4 or less digits values. But french postcodes must be 5 digits long (cf https://en.wikipedia.org/wiki/Postal_codes_in_France)... | diff --git a/faker/providers/address/fr_FR/__init__.py b/faker/providers/address/fr_FR/__init__.py
index 1125716e..2ee23305 100644
--- a/faker/providers/address/fr_FR/__init__.py
+++ b/faker/providers/address/fr_FR/__init__.py
@@ -469,10 +469,10 @@ class Provider(AddressProvider):
def postcode(self) -> str:
... |
joke2k__faker-1904 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 33e36b1b6cc9c6f039fe387988853771bab60624 | RGB/HSV/HSL color tuples from `color` provider
* Faker version: 19.3.1
* OS: any
With #104/#1055 the `color` provider learned how to generate colors with certain characteristics like "dark" or from a given hue.
As noted by @malefice in the previous PR, the faked values are only available as strings. Often a num... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index acd896e3..74b62a6e 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 19.3.1
+current_version = 19.4.0
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1937 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/geo/__init__.py:Provider"
]
},
"file": "faker/providers/geo/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_... | joke2k/faker | 3f9b0e9c771c4bacd4d50cb90c02a912cb8b7780 | When attempting to generate a Finnish ssn of a specific age the provider crashes
* Faker version: 19.11.0
* OS: Windows 10
When attempting to generate a Finnish ssn of a certain age the provider crashes because ``datetime.timedelta(days=self.generator.random.randrange(min_age * 365, max_age * 365))`` is always tryi... | diff --git a/faker/providers/geo/__init__.py b/faker/providers/geo/__init__.py
index 377ef7d0..0ccbbdc8 100644
--- a/faker/providers/geo/__init__.py
+++ b/faker/providers/geo/__init__.py
@@ -199,6 +199,18 @@ class Provider(BaseProvider):
("23.0072", "-82.4017", "Boyeros", "CU", "America/Havana"),
("50... |
joke2k__faker-1966 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 3cedfaff2afb39aa24ae2f95b53015732b11e53e | Feature request: file_path extension=False to generate a path without extension
```
faker.file_path(extension=None)
```
will generate something like `/event/amount.js`
### Actual behavior
There is no way to generate a path without an extension.
### Expected behavior
This is counter-intuitive - `exrtens... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index ad6f0b9f..fac9a4a5 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 21.0.0
+current_version = 21.0.1
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-1979 | [
{
"changes": {
"added_entities": [
"faker/providers/internet/__init__.py:Provider.http_status_code"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/internet/__init__.py:Provider"
]
},
"file": "faker/providers/int... | joke2k/faker | faa419b7af433c75253374c3d319ba5ffc3139cd | Idea: Add Http status codes
* Faker version: 22.2.0
* OS: all
Feature suggestion : add http status code to `providers.internet` as a random integer between 100 and 599
source: https://www.rfc-editor.org/rfc/rfc9110#name-status-codes
| diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d6c5e210..046cb1b3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup pip cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
... |
joke2k__faker-1991 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/proxy.py:Faker.__init__",
"faker/proxy.py:Faker.__getitem__",
"faker/proxy.py:Faker.factories",
"faker/proxy.py:Faker.items"
],
"edited_modules": [
"fak... | joke2k/faker | 17f22ba4cb5c158b63785c8e441597369dafdb61 | Unicity and localization
* Faker version: 17.4.0
* OS: Archlinux
It seems that uniqueness and localization cannot be used together:
```python
>>> from faker import Faker
... fake = Faker(['it_IT', 'en_US', 'ja_JP'])
>>> fake['it_IT'].name()
'Giuseppina Juvara'
>>> fake['it_IT'].unique.name()
Traceback (mos... | diff --git a/faker/proxy.py b/faker/proxy.py
index 653a5943..03a6e42e 100644
--- a/faker/proxy.py
+++ b/faker/proxy.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import copy
import functools
import re
@@ -35,7 +37,7 @@ class Faker:
use_weighting: bool = True,
**config: Any,
) -> Non... |
joke2k__faker-1994 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | 17f22ba4cb5c158b63785c8e441597369dafdb61 | `pydecimal(left_digits=14)` produced value with 13 left digits
* Faker version: 22.6.0
* OS: macOS, Linux
I've encountered a situation where `pydecimal` appears to not respect `left_digits`:
```python
from faker import Faker
fake = Faker()
Faker.seed(0)
fake.pydecimal(left_digits=14, right_digits=2) # D... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 9d3360e1..4b14f82c 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 23.1.0
+current_version = 23.2.0
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/CHANGELOG.md b/CHANGEL... |
joke2k__faker-2007 | [
{
"changes": {
"added_entities": [
"faker/providers/address/hu_HU/__init__.py:Provider.city"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/address/hu_HU/__init__.py:Provider"
]
},
"file": "faker/providers/addre... | joke2k/faker | 250fa19baf01aa2289afe44b07225f785cf536c5 | hu-Hu localization gives back non-capitalized city names
* Faker version: 23.2.1
* OS: Ubuntu 22.04.3 LTS
Faker with hu-HU localization gives back non-capitalized cities, when it has either a city_prefix or city_part used in its format.
### Steps to reproduce
1. `Faker.seed(1234)`
1. `Faker("hu-HU").city()`
... | diff --git a/faker/providers/address/hu_HU/__init__.py b/faker/providers/address/hu_HU/__init__.py
index 990f6379..54c7150d 100644
--- a/faker/providers/address/hu_HU/__init__.py
+++ b/faker/providers/address/hu_HU/__init__.py
@@ -467,3 +467,13 @@ class Provider(AddressProvider):
def building_number(self) -> str:
... |
joke2k__faker-2109 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null... | joke2k/faker | b25d2e8b2dd373f8e7888098c63bd4a273f87730 | Separate male and female names for `hi_IN` provider
* Faker version: `<= 29.0.0`
* OS: all
The `hi_IN` locale doesn't have separate male and female names along with prefixes
### Expected behavior
There should be separate male and female names for `hi_IN` locale
### Actual behavior
Male and female names ... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 65a0ebf5..e073e37a 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 30.1.0
+current_version = 30.3.0
files = VERSION faker/__init__.py docs/conf.py
commit = True
tag = True
diff --git a/.github/PULL_REQUEST_T... |
joke2k__faker-2151 | [
{
"changes": {
"added_entities": [
"faker/providers/date_time/__init__.py:get_now_date_time",
"faker/providers/date_time/__init__.py:get_now_date"
],
"added_modules": [
"faker/providers/date_time/__init__.py:get_now_date_time",
"faker/providers/date_time/__init_... | joke2k/faker | bbcab85add3f6bf52ae1e1862f5350622e425c51 | date_time_between does not generate same values on multiple runs with time passed between runs
* Faker version: 33.3.8
* OS: Sonoma 14.6.1
faker date_time_between does not reproduce the same date and time for a given seed.
### Steps to reproduce
Run the code:
```
fake = Faker()
seed_start = int(2595)
... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 0c67fb13..c9ef1dca 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -33,6 +33,28 @@ def timestamp_to_datetime(timestamp: Union[int, float], tzinfo: Optional[TzInfo]
retu... |
joke2k__faker-2155 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/date_time/__init__.py:Provider._parse_start_datetime",
"faker/providers/date_time/__init__.py:Provider._parse_end_datetime",
"faker/providers/date_time/__init__.py:Provid... | joke2k/faker | da39d8262b1b4a3d88c3bf934c047deca354b01e | 34.1 breaking change
For me this started breaking when using v34.0.1
```
self = <faker.providers.date_time.en_US.Provider object at 0x7f55c5ecf210>
start_datetime = 0, end_datetime = -604800
def _rand_seconds(self, start_datetime: int, end_datetime: int) -> float:
if start_datetime > end_datetime:
> ... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 3f1e5055..d18459b3 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -98,12 +98,12 @@ class Provider(BaseProvider):
# appropriate to generate random seconds with.
... |
joke2k__faker-2190 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/person/en_PK/__init__.py:Provider"
]
},
"file": "faker/providers/person/en_PK/__init__.py"
}
] | joke2k/faker | 2a1053c5ca995c30d52f60ae575f8bb2ef92b0d2 | All last names from en_PK provider are returned as individual characters
### Description
All last names from en_PK provider are only returned as individual characters.
Version: <=37.0.0
OS: All
### Steps to reproduce:
```python
from faker import Faker
fake = Faker(locale='en_PK')
fake.last_name()
# 't'
```
### Expec... | diff --git a/faker/providers/person/en_PK/__init__.py b/faker/providers/person/en_PK/__init__.py
index 38ee0a08..1b3511a3 100644
--- a/faker/providers/person/en_PK/__init__.py
+++ b/faker/providers/person/en_PK/__init__.py
@@ -115,7 +115,6 @@ class Provider(PersonProvider):
"Zewad",
"Zimran",
... |
joke2k__faker-314 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/misc/__init__.py:Provider.password"
],
"edited_modules": [
"faker/providers/misc/__init__.py:Provider"
]
},
"file": "faker/providers/misc/__init__.py"
... | joke2k/faker | 9f338881f582807fd9d1339b6148b039f8141bb3 | Param switches on faker.password() don't guarantee valid password
The format switches on `faker.password()` (`special_chars, digits, upper_case, lower_case`) don't always return passwords matching those rules.
This is problematic as when using generated passwords in unit tests, where passwords must conform to validi... | diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py
index 32531a60..9b318691 100644
--- a/faker/providers/misc/__init__.py
+++ b/faker/providers/misc/__init__.py
@@ -88,13 +88,33 @@ class Provider(BaseProvider):
@param lower_case: Boolean. Whether to use lower letters
@ret... |
joke2k__faker-318 | [
{
"changes": {
"added_entities": [
"faker/generator.py:Generator.random"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/generator.py:Generator"
]
},
"file": "faker/generator.py"
}
] | joke2k/faker | 807bf01588fd5dd9f680d69d1c6ddd13c255136f | Access to the Generator.random
It would be nice if one could gain access to the Generator.random variable so that one could save/set the state. I realize I can pass in the seed, but one currently has no way of gathering what the seed/state is if using the automatically generated seed. I don't want to use a fixed seed... | diff --git a/README.rst b/README.rst
index 4dc04a86..0941dbda 100644
--- a/README.rst
+++ b/README.rst
@@ -263,13 +263,26 @@ How to use with factory-boy
title = factory.LazyAttribute(lambda x: faker.sentence(nb_words=4))
author_name = factory.LazyAttribute(lambda x: faker.name())
+Accessing the `ran... |
joke2k__faker-325 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pystr"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.py... | joke2k/faker | 326e22d5752e0a28baee59c57ed0f49935de9059 | Add ability to generate lorem characters without punctuation
Sometimes I want to generate a string of characters of a specific length without any punctuation or capitalization but the lorem provider currently does not allow for this. | diff --git a/faker/providers/lorem/__init__.py b/faker/providers/lorem/__init__.py
index 5f07712d..dea4dd36 100644
--- a/faker/providers/lorem/__init__.py
+++ b/faker/providers/lorem/__init__.py
@@ -8,7 +8,8 @@ class Provider(BaseProvider):
@classmethod
def word(cls):
"""
- :example 'Lorem'
+ ... |
joke2k__faker-494 | [
{
"changes": {
"added_entities": [
"faker/providers/file/__init__.py:Provider.file_path"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/file/__init__.py:Provider"
]
},
"file": "faker/providers/file/__init__.py"
... | joke2k/faker | d06d05f415e97b15f21683c991511c24e12c8304 | Add a file path provider
In the file providers would be nice to have a file_path provider who would return a path like ```/lorem/ipsum/lorem.pdf```. | diff --git a/faker/providers/file/__init__.py b/faker/providers/file/__init__.py
index b19a3c56..4f4c14ce 100644
--- a/faker/providers/file/__init__.py
+++ b/faker/providers/file/__init__.py
@@ -201,3 +201,16 @@ class Provider(BaseProvider):
"""
category = category if category else cls.random_element(... |
joke2k__faker-568 | [
{
"changes": {
"added_entities": [
"faker/providers/date_time/__init__.py:timestamp_to_datetime",
"faker/providers/date_time/__init__.py:Provider._parse_date_string",
"faker/providers/date_time/__init__.py:Provider._parse_timedelta",
"faker/providers/date_time/__init__.py:P... | joke2k/faker | c12a23f112265bf051d720a3758f9919631734ab | is faking time series data in the scope of this project ?
I wanted some fake time series data for a project and couldn't find anything suitable for my needs.
Is something like [this](http://www.xaprb.com/blog/2014/01/24/methods-generate-realistic-time-series-data/) in the scope of this project ?
| diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index f4d2626b..3bb3c28b 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -26,6 +26,20 @@ def datetime_to_timestamp(dt):
return timegm(dt.timetuple())
+def timestamp_to_da... |
joke2k__faker-671 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/date_time/__init__.py:Provider.date_time_between"
],
"edited_modules": [
"faker/providers/date_time/__init__.py:Provider"
]
},
"file": "faker/providers/... | joke2k/faker | fc7bbc43efc9adf923b58b43db6c979a3c17ac86 | past_datetime() crashes when start_date is within one second of now
I ran into a problem while generating a bunch of fake dates where I was calling `fake.past_datetime()` with the start date using the result of a previous `fake.past_datetime()` call (simulating a bunch of files being created as part of a collection). T... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 8d1d8ff6..5df3c699 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -1342,7 +1342,10 @@ class Provider(BaseProvider):
"""
start_date = self._parse_date_time... |
joke2k__faker-678 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/internet/__init__.py:Provider.email"
],
"edited_modules": [
"faker/providers/internet/__init__.py:Provider"
]
},
"file": "faker/providers/internet/__ini... | joke2k/faker | 891e000f06fbc2f13b16331a5577a8d9952281c6 | NameError: name 'args' is not defined
I'm getting an error using the *args method.
```
fake.email(*args, **kwargs)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'args' is not defined
```
Also can I change the **kwargs with @gmail to get random@gmail.com?
| diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index acdda088..f357f2c7 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -75,9 +75,13 @@ class Provider(BaseProvider):
return string
@lowercase
- def email(self):
-... |
joke2k__faker-767 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/ssn/no_NO/__init__.py:Provider.ssn"
],
"edited_modules": [
"faker/providers/ssn/no_NO/__init__.py:Provider"
]
},
"file": "faker/providers/ssn/no_NO/__in... | joke2k/faker | 15a471fdbe357b80fa3baec8d14b646478b80a85 | Norwegian ssn returns the wrong format for the date part
SSN for no_NO returns the wrong format of the date part.
### Steps to reproduce
As @cloveras pointed out:
Using December 31 1999 as the date of birth (YYYYMMDD):
ssn('19991231','M')
This results in SSNs like these:
99123145123
99123108724
991231275... | diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py
index 207831b8..2f171d42 100644
--- a/faker/providers/ssn/no_NO/__init__.py
+++ b/faker/providers/ssn/no_NO/__init__.py
@@ -71,7 +71,7 @@ class Provider(SsnProvider):
gender_num = self.generator.random.choice((0,... |
joke2k__faker-772 | [
{
"changes": {
"added_entities": [
"faker/providers/ssn/en_US/__init__.py:Provider.itin",
"faker/providers/ssn/en_US/__init__.py:Provider.ein"
],
"added_modules": null,
"edited_entities": [
"faker/providers/ssn/en_US/__init__.py:Provider.ssn"
],
"edite... | joke2k/faker | da96379c07dbd22bea070db5a8a3e1ad85e4cf04 | Support United States ITIN and EIN tax identification numbers
While United States SSNs are used by naturalized aliens and citizens, but businesses are identified by EINs and IRS issues ITINs to foreign nationals and others who have federal tax reporting or filing requirements and do not qualify for SSNs.
Each type ... | diff --git a/faker/providers/ssn/en_US/__init__.py b/faker/providers/ssn/en_US/__init__.py
index 4357535c..a6930f4a 100644
--- a/faker/providers/ssn/en_US/__init__.py
+++ b/faker/providers/ssn/en_US/__init__.py
@@ -1,19 +1,169 @@
# coding=utf-8
from __future__ import unicode_literals
+
+import random
from .. import ... |
joke2k__faker-775 | [
{
"changes": {
"added_entities": [
"faker/providers/date_time/__init__.py:Provider.date_of_birth"
],
"added_modules": null,
"edited_entities": [
"faker/providers/date_time/__init__.py:Provider.date_time_ad"
],
"edited_modules": [
"faker/providers/date_... | joke2k/faker | 6c83a263a589c031ef68244fa81d21c03c620100 | Give the user the ability to generate adult vs. minor dates of birth
Presently, dates of birth in the Profile provider are chosen randomly between unix epoch timestamp 0 and the present date and time. This isn't particularly useful from a testing perspective, as `0 <= age <= 48 years` isn't the most useful range.
##... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 11c7b8fc..8b10d4c3 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -1203,15 +1203,24 @@ class Provider(BaseProvider):
return datetime(1970, 1, 1, tzinfo=tzinfo) + \... |
joke2k__faker-782 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/address/__init__.py:Provider.country_code"
],
"edited_modules": [
"faker/providers/address/__init__.py:Provider"
]
},
"file": "faker/providers/address/_... | joke2k/faker | dfa5c90a305625160331e137714b701d7e1cf2ed | Support ISO 3166-1 alpha-3 country codes
Presently, faker only supports alpha-2 (two character) country codes. I have a need for alpha-3 (three character) country codes.
See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 | diff --git a/faker/providers/address/__init__.py b/faker/providers/address/__init__.py
index d1ac15f2..d186b38d 100644
--- a/faker/providers/address/__init__.py
+++ b/faker/providers/address/__init__.py
@@ -18,7 +18,12 @@ class Provider(BaseProvider):
building_number_formats = ('##', )
postcode_formats = ('##... |
joke2k__faker-790 | [
{
"changes": {
"added_entities": [
"faker/providers/address/en_CA/__init__.py:Provider.postcode"
],
"added_modules": null,
"edited_entities": [
"faker/providers/address/en_CA/__init__.py:Provider.postalcode"
],
"edited_modules": [
"faker/providers/addr... | joke2k/faker | 29dff0a0f2a31edac21a18cfa50b5bc9206304b2 | en_CA should implement postcode, not postalcode
All of the address providers use `postcode` to generate post codes. This is misspelled as `postalcode` by the localization for `en_CA`.
### Expected behavior
It would be easier to use faker in a multilingual context if this were spelled consistently.
Recommend... | diff --git a/faker/providers/address/en_CA/__init__.py b/faker/providers/address/en_CA/__init__.py
index 4d8963ed..7e7e989a 100644
--- a/faker/providers/address/en_CA/__init__.py
+++ b/faker/providers/address/en_CA/__init__.py
@@ -316,7 +316,7 @@ class Provider(AddressProvider):
"""
return self.random... |
joke2k__faker-805 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/address/id_ID/__init__.py:Provider"
]
},
"file": "faker/providers/address/id_ID/__init__.py"
},
{
"changes": {
"added_entities":... | joke2k/faker | d01c29aade0a7ab4416875ae662d229fd9c55618 | Public IP blocks used with ipv4_public encompass reserved address namespaces
The `ipv4_public` faker generates IP addresses from public blocks, excluding private blocks configured in `IPV4_PUBLIC_NETS` and `IPV4_PRIVATE_NET_BLOCKS`, however it often results in addresses coming from reserved spaces.
One example is 19... | diff --git a/docs/communityproviders.rst b/docs/communityproviders.rst
index cd6cdfa5..08509a98 100644
--- a/docs/communityproviders.rst
+++ b/docs/communityproviders.rst
@@ -18,11 +18,7 @@ Here's a list of Providers written by the community:
+---------------+--------------------------+--------------------------------... |
joke2k__faker-808 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/lorem/__init__.py:Provider.words"
],
"edited_modules": [
"faker/providers/lorem/__init__.py:Provider"
]
},
"file": "faker/providers/lorem/__init__.py"
... | joke2k/faker | fc546bca9b4f411e8565aeb5ddd9ccee8de59494 | Ensure words() returns a unique list of words without duplicates
When calling `words(10)` there is no guarantee that the returned list of elements is unique. While I could do `set(words(10))`, this may only return 9 items when I am in need of 10.
If creating a list of words with potential duplicates is a useful fe... | diff --git a/faker/providers/lorem/__init__.py b/faker/providers/lorem/__init__.py
index 48276aa5..55d25543 100644
--- a/faker/providers/lorem/__init__.py
+++ b/faker/providers/lorem/__init__.py
@@ -26,7 +26,7 @@ class Provider(BaseProvider):
word_connector = ' '
sentence_punctuation = '.'
- def words(se... |
joke2k__faker-809 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/address/en_US/__init__.py:Provider.state_abbr"
],
"edited_modules": [
"faker/providers/address/en_US/__init__.py:Provider"
]
},
"file": "faker/providers... | joke2k/faker | fc546bca9b4f411e8565aeb5ddd9ccee8de59494 | State Abbreviations for en_US have too many
The output of the state provider in address only outputs the 50 states, but the state_abbr has 59 potential outputs
### Steps to reproduce
Generate a value using the state_abbr provider
### Expected behavior
The value should be one of the 50 US states abbreviation... | diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py
index 451d5d72..4d466336 100644
--- a/faker/providers/address/en_US/__init__.py
+++ b/faker/providers/address/en_US/__init__.py
@@ -272,13 +272,19 @@ class Provider(AddressProvider):
'West Virginia', 'Wisconsin',... |
joke2k__faker-836 | [
{
"changes": {
"added_entities": [
"faker/providers/phone_number/pt_BR/__init__.py:Provider.cellphone_number"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/phone_number/pt_BR/__init__.py:Provider"
]
},
"file": ... | joke2k/faker | ba4994a9c1f84bab3aa3b21c7cc2a1e0e76d3f1c | Add method to generate a cell phone number to pt-BR
Faker doesn't have a function to generate a cellphone to Brazilian.
Steps to reproduce
Create fake instance using localization "pt_BR"
Call fake.msisdn() or fake.phone_number()
Expected behavior
It should generate a cell phone number.
Actual behavior
Someti... | diff --git a/faker/providers/phone_number/pt_BR/__init__.py b/faker/providers/phone_number/pt_BR/__init__.py
index 95707ba6..ca3efbd3 100644
--- a/faker/providers/phone_number/pt_BR/__init__.py
+++ b/faker/providers/phone_number/pt_BR/__init__.py
@@ -71,6 +71,7 @@ class Provider(PhoneNumberProvider):
'#### ###... |
joke2k__faker-907 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/date_time/__init__.py:Provider.time_delta",
"faker/providers/date_time/__init__.py:Provider._parse_date_time",
"faker/providers/date_time/__init__.py:Provider._parse_date... | joke2k/faker | 4c9138f53b4a616f846900e87fa83fe0d309c613 | Can't produce a time_delta with a maximum value
When using time_delta from the date_time provider it doesn't seem possible to provide a maximum value.
The provider takes an `end_datetime` parameter but what it does with that is beyond me, certainly not what I'd expect.
### Steps to reproduce
```
>>> from faker ... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index f2048fa2..ed27c9f4 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -1379,8 +1379,11 @@ class Provider(BaseProvider):
"""
Get a timedelta object
""... |
joke2k__faker-924 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pyfloat",
"faker/providers/python/__init__.py:Provider.pydecimal"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provi... | joke2k/faker | 8fa3239b78cbdaac37ec478501571daa9dc55c29 | Enables min and max values for pydecimal
Currently is not possible to set min or max values to `pydecimal` or `pyfloat`. It would be nice if we could pass these parameters.
If it makes senses I can open a PR. | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index c59c2960..6b2b2d6d 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -32,7 +32,9 @@ class Provider(BaseProvider):
),
)
- def pyfloat(self, left_digits=N... |
joke2k__faker-956 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pyfloat"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.... | joke2k/faker | daf73fb675d5f3c2f583f2cacd649d4f429a9206 | pyfloat, pydecimal cannot be negative when left_digits=0
I am trying to fake random floats in the range `(-1, 1)`. Currently, `pyfloat` and `pydecimal` will never be negative as long as `left_digits=0`, even if `positive=False`.
This seems to be because [the `sign` (-1, 1) is multiplied by only the left digits](htt... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index ed9f9793..6b8d4bcf 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -53,8 +53,7 @@ class Provider(BaseProvider):
self.random_int(1, sys.float_info.dig))
right_digit... |
joke2k__faker-964 | [
{
"changes": {
"added_entities": [
"faker/providers/person/pl_PL/__init__.py:Provider.pesel_compute_check_digit",
"faker/providers/person/pl_PL/__init__.py:Provider.pwz_doctor_compute_check_digit",
"faker/providers/person/pl_PL/__init__.py:Provider.pwz_doctor",
"faker/provi... | joke2k/faker | 89eefd7962928b3150e72707fc8718613ab63e63 | pl_PL tasks - a lot of things to add
Hi,
I'm using faker quite often, but there is some missing functionalities for pl_PL, like e.g. PESEL generator (Polish id for every person), car plates or some more.
Can I contribute on my own branch (e.g. pl-PL-features or something), to add missing functionalities? | diff --git a/faker/providers/person/pl_PL/__init__.py b/faker/providers/person/pl_PL/__init__.py
index 49c622df..025b50f1 100644
--- a/faker/providers/person/pl_PL/__init__.py
+++ b/faker/providers/person/pl_PL/__init__.py
@@ -21,28 +21,6 @@ def checksum_identity_card_number(characters):
return check_digit
-de... |
joke2k__faker-989 | [
{
"changes": {
"added_entities": [
"faker/providers/date_time/__init__.py:Provider.pytimezone"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"faker/providers/date_time/__init__.py:Provider"
]
},
"file": "faker/providers/date_ti... | joke2k/faker | 46450c265271029b6cf0c5fa3c5c2e0d4508ca27 | suggestion: pytimezone
In addition to the currently available [timezone](), it would be very useful* to have a similar python object faker, something like:
```python
import pytz
class TheExistingPythonProvider:
def pytimezone(self, **kwargs):
return pytz.timezone(self.generator.timezone(**kwargs))
... | diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py
index 39dab838..529db175 100644
--- a/faker/providers/date_time/__init__.py
+++ b/faker/providers/date_time/__init__.py
@@ -4,7 +4,7 @@ from calendar import timegm
from datetime import MAXYEAR, timedelta
from dateutil import ... |
joke2k__faker-995 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"faker/providers/python/__init__.py:Provider.pyfloat"
],
"edited_modules": [
"faker/providers/python/__init__.py:Provider"
]
},
"file": "faker/providers/python/__init__.... | joke2k/faker | 78bf434d76d536553fb07777b41be0731d25b45e | pyfloat producing values above max_value
* Faker version: 2.0.1
* OS: Windows 10
Calling `pyfloat` with the `max_value` set can produce values above `max_value` leading to issues.
### Steps to reproduce
Run my example code below.
### Expected behavior
Given my following example, I would expect to _only_... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 7b1bd6f8..eb8a70a6 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -60,7 +60,7 @@ class Provider(BaseProvider):
if max_value is None:
max_value = min_value... |
jonathanhaigh__multiconfparse-79 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"multiconfparse/__init__.py:ConfigSpec.create"
],
"edited_modules": [
"multiconfparse/__init__.py:ConfigSpec"
]
},
"file": "multiconfparse/__init__.py"
}
] | jonathanhaigh/multiconfparse | fc1fbc926365e68cdd349fd8e634612d628f43a3 | Allow user-defined actions | diff --git a/multiconfparse/__init__.py b/multiconfparse/__init__.py
index 3df2e83..28427cf 100644
--- a/multiconfparse/__init__.py
+++ b/multiconfparse/__init__.py
@@ -904,6 +904,12 @@ class ConfigSpec(abc.ABC):
def create(cls, action="store", **kwargs):
# Factory to obtain ConfigSpec objects with the co... |
jonathanhaigh__multiconfparse-90 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"multiconfparse/__init__.py:ConfigParser.__init__",
"multiconfparse/__init__.py:ConfigParser.add_config",
"multiconfparse/__init__.py:ConfigParser.add_source",
"multiconfparse/__i... | jonathanhaigh/multiconfparse | ee64e03648d5306f3373c9f0b57d365177a15bd9 | Add check that config names don't clash | diff --git a/multiconfparse/__init__.py b/multiconfparse/__init__.py
index f1b5483..fe0f30f 100644
--- a/multiconfparse/__init__.py
+++ b/multiconfparse/__init__.py
@@ -5,7 +5,6 @@
import abc
import argparse
-import copy
import json
import operator
import os
@@ -1590,7 +1589,7 @@ class ConfigParser:
__r... |
jonathanhaigh__multiconfparse-93 | [
{
"changes": {
"added_entities": [
"docs/conf.py:autodoc_skip_member",
"docs/conf.py:setup"
],
"added_modules": [
"docs/conf.py:autodoc_skip_member",
"docs/conf.py:setup"
],
"edited_entities": null,
"edited_modules": null
},
"file": "do... | jonathanhaigh/multiconfparse | 8bd088e3b8a69d63170169618356074fb2c956fc | Add a "dest" option for configs | diff --git a/docs/conf.py b/docs/conf.py
index 87c3918..2c3a38e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -63,3 +63,10 @@ html_theme = "sphinx_rtd_theme"
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_... |
jonathanhaigh__multiconfparse-95 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"multiconfparse/__init__.py:Action._set_name",
"multiconfparse/__init__.py:Action._set_dest",
"multiconfparse/__init__.py:StoreAction._set_const",
"multiconfparse/__init__.py:Appe... | jonathanhaigh/multiconfparse | ba133027d4137490b83bf700438d53f3cadf53bd | Allow `SUPPRESS` value for `help` argument | diff --git a/multiconfparse/__init__.py b/multiconfparse/__init__.py
index 12e455d..0d0f524 100644
--- a/multiconfparse/__init__.py
+++ b/multiconfparse/__init__.py
@@ -542,9 +542,12 @@ class ArgparseSource(Source):
def __init__(self, option_strings, dest, action_obj, priority):
self._action = act... |
jonathanhaigh__multiconfparse-96 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"multiconfparse/__init__.py:EnvironmentSource.__init__",
"multiconfparse/__init__.py:EnvironmentSource._config_name_to_env_name"
],
"edited_modules": [
"multiconfparse/__init_... | jonathanhaigh/multiconfparse | 7a29d5c44311b7ec9015a772c4013824eae3c5a5 | Add option to turn off upper casing of env var names | diff --git a/multiconfparse/__init__.py b/multiconfparse/__init__.py
index 0d0f524..60aedc0 100644
--- a/multiconfparse/__init__.py
+++ b/multiconfparse/__init__.py
@@ -418,11 +418,10 @@ class EnvironmentSource(Source):
environment variable names that the source will look for. The default
value is ``""``... |
jonathanj__cacofonix-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/cacofonix/_app.py:Application.load_fragment",
"src/cacofonix/_app.py:Application.compile_fragment_files"
],
"edited_modules": [
"src/cacofonix/_app.py:Application"
... | jonathanj/cacofonix | 984d93c51f954266a82a4447a1a6b3cd5644d0f6 | Coerce issue keys to strings
Towncrier expects issues to be strings and throws an exception if this isn't the case:
```
Traceback (most recent call last): │ts after you do a transaction. It ta... | diff --git a/src/cacofonix/_app.py b/src/cacofonix/_app.py
index 6b1e7cd..5f867dc 100644
--- a/src/cacofonix/_app.py
+++ b/src/cacofonix/_app.py
@@ -37,7 +37,9 @@ class Application(object):
"""
Parse and validate a fragment from a stream.
"""
- return self.validate_fragment(_yaml.load(... |
jonathanj__eliottree-40 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"eliottree/_cli.py:_convert_timestamp",
"eliottree/_cli.py:build_task_nodes",
"eliottree/_cli.py:display_task_tree"
],
"edited_modules": [
"eliottree/_cli.py:_convert_... | jonathanj/eliottree | 4dae7890294edb4d845b00a8bb310bc08c555352 | Human-readable values should only be formatted when rendered instead of modifying the tree data
The problem with modifying the tree data is that it makes it very difficult to write queries against it if eliot-tree is changing it in undisclosed ways to suit it's renderer. | diff --git a/eliottree/_cli.py b/eliottree/_cli.py
index 6b0d24e..c333d8c 100644
--- a/eliottree/_cli.py
+++ b/eliottree/_cli.py
@@ -2,36 +2,20 @@ import argparse
import codecs
import json
import sys
-from datetime import datetime
from itertools import chain
from six import PY3
from six.moves import map
-from t... |
jonathanj__eliottree-86 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/eliottree/_cli.py:display_tasks",
"src/eliottree/_cli.py:main"
],
"edited_modules": [
"src/eliottree/_cli.py:display_tasks",
"src/eliottree/_cli.py:main"
]
... | jonathanj/eliottree | b7beb1c1ebccc7947089f86f5ec51dd5d8f878c0 | Support outputting timestamps in local timezone
UTC can sometimes be harder to interpret than local time, so would be nice if there was way to output in local timezone as well.
Original issue: https://github.com/itamarst/eliot/issues/428 | diff --git a/README.rst b/README.rst
index 8b656f0..4a581d4 100644
--- a/README.rst
+++ b/README.rst
@@ -97,6 +97,7 @@ Usage from the command-line
standard keys.
--raw Do not format some task values (such as UTC
timestamps) as human-readable
... |
jordaneremieff__mangum-182 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mangum/handlers/aws_alb.py:AwsAlb.body"
],
"edited_modules": [
"mangum/handlers/aws_alb.py:AwsAlb"
]
},
"file": "mangum/handlers/aws_alb.py"
},
{
"changes": {
... | jordaneremieff/mangum | 3f312acb67aac30c07dfb305d3cd1881c59755c4 | Bug - handler.body returns a str resulting in TypeError: a bytes-like object is required, not 'str'
First this bug was introduced post 0.11.0 when the handlers were refactored.
**Traceback**
```
Exception in 'http' protocol.
--
Traceback (most recent call last):
File "/function/src/mangum/mangum/protocols/http.... | diff --git a/mangum/handlers/aws_alb.py b/mangum/handlers/aws_alb.py
index b2c6470..33e0968 100644
--- a/mangum/handlers/aws_alb.py
+++ b/mangum/handlers/aws_alb.py
@@ -57,9 +57,13 @@ class AwsAlb(AbstractHandler):
@property
def body(self) -> bytes:
- body = self.trigger_event.get("body", b"")
+ ... |
jordaneremieff__mangum-186 | [
{
"changes": {
"added_entities": [
"mangum/handlers/aws_alb.py:all_casings",
"mangum/handlers/aws_alb.py:AwsAlb.handle_headers"
],
"added_modules": [
"mangum/handlers/aws_alb.py:all_casings"
],
"edited_entities": [
"mangum/handlers/aws_alb.py:AwsAlb.... | jordaneremieff/mangum | 619790e206be2d4d1e27e878a803e1d33429eea6 | 0.11.0 Regression - ALB/ELB - Properly handle multiple set cookies in output when multiValueHeaders is not set
This is a regression from 0.11.0.
The 0.11.0 ALB/ELB code handled when there were multiple set-cookies headers in the response, but multiValueHeaders was not set on the load balancer.
```python
if "el... | diff --git a/mangum/handlers/aws_alb.py b/mangum/handlers/aws_alb.py
index 33e0968..6fef8b5 100644
--- a/mangum/handlers/aws_alb.py
+++ b/mangum/handlers/aws_alb.py
@@ -1,11 +1,30 @@
import base64
import urllib.parse
-from typing import Dict, Any
+from typing import Any, Dict, Generator, List, Tuple
from .abstract... |
jordaneremieff__mangum-280 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mangum/adapter.py:Mangum.__init__"
],
"edited_modules": [
"mangum/adapter.py:Mangum"
]
},
"file": "mangum/adapter.py"
},
{
"changes": {
"added_entities": ... | jordaneremieff/mangum | 20653dc0dddb6eecfe4a8cef8ad3edcdc174d4b4 | Allow Mangum to remove certain aws reponse headers from api gateway response
Problem:
Currently `Mangum` injects the following headers in the api gateway response for an aws lambda integration
```
x-amz-apigw-id
x-amzn-requestid
x-amzn-trace-id
```
This exposes additional information that the client doesn't... | diff --git a/docs/external-links.md b/docs/external-links.md
index fab77ec..2dc4f91 100644
--- a/docs/external-links.md
+++ b/docs/external-links.md
@@ -2,6 +2,7 @@
External links related to using Mangum.
-- [Deploying Python web apps as AWS Lambda functions](https://til.simonwillison.net/awslambda/asgi-mangum) is... |
jorenham__optype-29 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "optype/__init__.py"
},
{
"changes": {
"added_entities": [
"optype/_can.py:CanCopy.__copy__",
"optype/_can.py:CanDeepcopy.__deepc... | jorenham/optype | 4d3e3765a206e98df244e33b95a3c29175ed121c | stdlib `copy` integration
Add protocols:
- `CanCopy`
- `CanDeepCopy`
- `CanReplace` | diff --git a/README.md b/README.md
index 8b5bbb8..458affa 100644
--- a/README.md
+++ b/README.md
@@ -1244,11 +1244,53 @@ Interfaces for emulating buffer types using the [buffer protocol][BP].
[BP]: https://docs.python.org/3/reference/datamodel.html#python-buffer-protocol
+### `copy`
+
+For the [`copy`][CP] standar... |
joshtemple__lkml-55 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/simple.py:DictParser.is_plural_key"
],
"edited_modules": [
"lkml/simple.py:DictParser"
]
},
"file": "lkml/simple.py"
}
] | joshtemple/lkml | 9e00addabc9cf62b767157af653f00b4a7967199 | Simple Parser unnests `dimensions` and `measures` in `query` fields
For [query](https://docs.looker.com/reference/explore-params/query) fields, the dimensions and measures keys are special - they are kept in plural form, with a list as the value.
When the simple parser parses this field, it sees that it's a pluraliz... | diff --git a/lkml/simple.py b/lkml/simple.py
index 1ad2c77..39031ca 100644
--- a/lkml/simple.py
+++ b/lkml/simple.py
@@ -210,14 +210,21 @@ class DictParser:
parent key. If its parent key is `access_grant`, it is a list and cannot be
repeated. Otherwise, it can be repeated.
+ The parent key `q... |
joshtemple__lkml-74 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/simple.py:DictParser.parse_any"
],
"edited_modules": [
"lkml/simple.py:DictParser"
]
},
"file": "lkml/simple.py"
},
{
"changes": {
"added_entities": ... | joshtemple/lkml | e5c33fd9de8ee5c0961978651686ee1eef58fe11 | lkml.dump deletes "name" key from dict
[dump](https://github.com/joshtemple/lkml/blob/3d629172bbc97a93f1d5f5af0cf4f219752a1ca8/lkml/__init__.py#L56) function mutates input dict by removing all "name" fields in the dict.
Looks like it is caused by a `.pop` call on [this line](https://github.com/joshtemple/lkml/blob/3d6... | diff --git a/lkml/simple.py b/lkml/simple.py
index 096a966..0d3b651 100644
--- a/lkml/simple.py
+++ b/lkml/simple.py
@@ -6,6 +6,7 @@ to interact with the parse tree.
"""
+import copy
import logging
from typing import Any, Dict, List, Optional, Sequence, Type, Union, cast
@@ -306,6 +307,7 @@ class DictParser:
... |
joshtemple__lkml-83 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "lkml/keys.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/lexer.py:Lexer.sca... | joshtemple/lkml | c7545dc0567589b2e11a4d759ec66fcdd5969c5a | Support parsing datagroup interval_trigger
Hey, thanks for this library!
I'm parsing Looker datagroups and it seems the [`interval_trigger` subparameter](https://cloud.google.com/looker/docs/reference/param-model-datagroup#interval_trigger) isn't supported. Here's an example:
```
>>> datagroup_dict = {"datagroup... | diff --git a/.readthedocs.yml b/.readthedocs.yml
index b8a9237..6806601 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -1,5 +1,10 @@
version: 2
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.9"
+
sphinx:
configuration: docs/source/conf.py
diff --git a/lkml/keys.py b/lkml/keys.py
index 1f86f91..... |
joshtemple__lkml-85 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/parser.py:Parser.parse_key"
],
"edited_modules": [
"lkml/parser.py:Parser"
]
},
"file": "lkml/parser.py"
}
] | joshtemple/lkml | 873271a88d3ba4652f997c9a8dd1c15ebe976b04 | Multiple colons
This is a fun one - turns out Looker is accepting of lkml code that has multiple colon (`:`) characters in a row, possibly with spaces between.
This works in both measure/dimension definitions and in value_format, and probably in other places too.
```
view: my_view {
# other stuff
measure... | diff --git a/lkml/parser.py b/lkml/parser.py
index c6cdc43..cbf25ca 100644
--- a/lkml/parser.py
+++ b/lkml/parser.py
@@ -371,13 +371,15 @@ class Parser:
return None
prefix = self.consume_trivia()
- if self.check(tokens.ValueToken):
+
+ colon = None
+ while self.check(tokens.... |
joshtemple__lkml-87 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/parser.py:Parser.parse_value"
],
"edited_modules": [
"lkml/parser.py:Parser"
]
},
"file": "lkml/parser.py"
},
{
"changes": {
"added_entities": null,
... | joshtemple/lkml | 9133f9a54bbae9d7ad0baab969eeb73301a9ebcb | Failure to parse sets with space-delimited leading hypens
lkml can't parse, this, which is valid lkml:
```lookml
fields: [- view.dimension_name]
```
The issue seems to be with the space between the hyphen and the field name. | diff --git a/lkml/parser.py b/lkml/parser.py
index cbf25ca..3a69dbb 100644
--- a/lkml/parser.py
+++ b/lkml/parser.py
@@ -406,6 +406,13 @@ class Parser:
if self.check(tokens.LiteralToken):
token = self.consume()
+ # Handle special case where a hyphen can be preceded by whitspace
+ ... |
joshtemple__lkml-97 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lkml/simple.py:DictParser.is_plural_key"
],
"edited_modules": [
"lkml/simple.py:DictParser"
]
},
"file": "lkml/simple.py"
}
] | joshtemple/lkml | 3b08d65c6d083dc44648735e96f14a796a84ba13 | Simple Parser unnests `dimensions` and `measures` in `query` fields
For [query](https://docs.looker.com/reference/explore-params/query) fields, the dimensions and measures keys are special - they are kept in plural form, with a list as the value.
When the simple parser parses this field, it sees that it's a pluraliz... | diff --git a/lkml/simple.py b/lkml/simple.py
index 0d3b651..275b85c 100644
--- a/lkml/simple.py
+++ b/lkml/simple.py
@@ -226,7 +226,7 @@ class DictParser:
singular_key == "allowed_value"
and self.parent_key.rstrip("s") == "access_grant"
)
- and not (self.parent_... |
joshuadavidthomas__django-bird-102 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/templatetags/tags/bird.py:do_bird",
"src/django_bird/templatetags/tags/bird.py:BirdNode.__init__",
"src/django_bird/templatetags/tags/bird.py:BirdNode.get_component_conte... | joshuadavidthomas/django-bird | 4a76afba85e56af92c4a9f5bc62205ffc85b8cb2 | Components cannot take outside template context variables
Was playing around with moving some of my base templates to bird components, one of which set's the CSRF Token in the body tag like so:
```htmldjango
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
...
</body>
```
But when rendered, it comes... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc506d2..8c3c252 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,14 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+### Added
+
+- Added `only` keyword to `{% bird %}` tag for isolating component context t... |
joshuadavidthomas__django-bird-119 | [
{
"changes": {
"added_entities": [
"src/django_bird/staticfiles.py:AssetType.from_tag_name",
"src/django_bird/staticfiles.py:Asset.render"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"src/django_bird/staticfiles.py:AssetType",
... | joshuadavidthomas/django-bird | f59a4412433bb58b93b06068f277725f719834b1 | Assets not deduped when using asset tags | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c559bbb..6563c8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,14 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+### Fixed
+
+- Fixed the potential for duplicate asset tags in the `{% bird:css %}` and `... |
joshuadavidthomas__django-bird-143 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/components.py:Component.from_name",
"src/django_bird/components.py:ComponentRegistry.get_dirs",
"src/django_bird/components.py:ComponentRegistry.discover_components",
... | joshuadavidthomas/django-bird | e839ddec98be63847c9e44cb22699997af466773 | Create staticfiles finder to integrate competent assets with `django.contrib.staticfiles` | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f8d15d..32b712c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,14 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+### Added
+
+- Added `BirdAssetFinder`, a custom staticfiles finder to serve component as... |
joshuadavidthomas__django-bird-153 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/conf.py:AutoConfigurator.configure_templates",
"src/django_bird/conf.py:AutoConfigurator.configure_loaders"
],
"edited_modules": [
"src/django_bird/conf.py:Au... | joshuadavidthomas/django-bird | 39bccebe702973eb38f3010c8e4bf1c0dc60f2f7 | Deprecate and remove `BirdLoader` and `Compiler`
Given the recent changes to `ComponentRegistry.discover_components` in #148 and how I'm leaning about using dj-angles for #15, I don't think the custom template loader is really need anymore.
Initially I added the custom template loader to be able to be able to use cust... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ebb60b..7bd236d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
### Deprecated
- The built-in asset serving view (`asset_view`) is deprecated and will be removed in the nex... |
joshuadavidthomas__django-bird-40 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/templatetags/django_bird.py:BirdNode.get_template_names"
],
"edited_modules": [
"src/django_bird/templatetags/django_bird.py:BirdNode"
]
},
"file": "src... | joshuadavidthomas/django-bird | 468417c783eaf0fa553a008209136f74645da557 | Template resolution inconsistent with documentation
In the docs, I have the template resolution for components written down as:
> When using {% bird accordion %}, the library will look for components in the following order:
>
> 1. accordion/accordion.html
> 2. accordion/index.html
> 3. accordion.html
[Link](... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9070125..d3daf03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,24 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+🚨 This release contains a breaking change. See the Changed section for more information.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.