Skip to content

Commit 8d8439f

Browse files
authored
Merge v7 Feature Branch (#900)
* change(fcm): Remove deprecated FCM APIs (#890) * chore(deps): Bump minimum supported Python version to 3.9 and add 3.13 to CIs (#892) * chore(deps): Bump minimum supported Python version to 3.9 and add 3.13 to CIs * fix deprecation warnings * fix GHA build status svg * fix: Correctly scope async eventloop * fix: Bump pylint to v2.7.4 and astroid to v2.5.8 to fix lint issues * fix ml tests * fix lint * fix: remove commented code * change(ml): Drop AutoML model support (#894) * chore: Bump `pylint` to v3.3.7 and `astroid` to v3.3.10 (#895) * chore: Bump pylint to v3 * chore: fix src lint * chore: fix unit test lint * chore: fix integration test lint * chore: fix snippets lint * chore: 2nd pass for errors * fix: corrected use of the `bad-functions` config * fix: add EoF newline * chore: Upgraded Google API Core, Cloud Firestore, and Cloud Storage dependencies (#897) * chore: Bump dependencies * fix: Also update setup.py * fix(functions): Remove usage of deprecated `datetime.utcnow() and fix flaky unit test` (#896)
1 parent 339452e commit 8d8439f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+773
-2005
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9']
11+
python: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.9']
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -35,10 +35,10 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@v4
38-
- name: Set up Python 3.8
38+
- name: Set up Python 3.9
3939
uses: actions/setup-python@v5
4040
with:
41-
python-version: 3.8
41+
python-version: 3.9
4242
- name: Install dependencies
4343
run: |
4444
python -m pip install --upgrade pip

.github/workflows/nightly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Python
3737
uses: actions/setup-python@v5
3838
with:
39-
python-version: 3.8
39+
python-version: 3.9
4040

4141
- name: Install dependencies
4242
run: |
@@ -45,6 +45,7 @@ jobs:
4545
pip install setuptools wheel
4646
pip install tensorflow
4747
pip install keras
48+
pip install build
4849
4950
- name: Run unit tests
5051
run: pytest
@@ -57,7 +58,7 @@ jobs:
5758

5859
# Build the Python Wheel and the source distribution.
5960
- name: Package release artifacts
60-
run: python setup.py bdist_wheel sdist
61+
run: python -m build
6162

6263
# Attach the packaged artifacts to the workflow output. These can be manually
6364
# downloaded for later inspection if necessary.

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Python
4848
uses: actions/setup-python@v5
4949
with:
50-
python-version: 3.8
50+
python-version: 3.9
5151

5252
- name: Install dependencies
5353
run: |
@@ -56,6 +56,7 @@ jobs:
5656
pip install setuptools wheel
5757
pip install tensorflow
5858
pip install keras
59+
pip install build
5960
6061
- name: Run unit tests
6162
run: pytest
@@ -68,7 +69,7 @@ jobs:
6869

6970
# Build the Python Wheel and the source distribution.
7071
- name: Package release artifacts
71-
run: python setup.py bdist_wheel sdist
72+
run: python -m build
7273

7374
# Attach the packaged artifacts to the workflow output. These can be manually
7475
# downloaded for later inspection if necessary.

.pylintrc

Lines changed: 40 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[MASTER]
1+
[MAIN]
22

33
# Specify a configuration file.
44
#rcfile=
@@ -20,7 +20,9 @@ persistent=no
2020

2121
# List of plugins (as comma separated values of python modules names) to load,
2222
# usually to register additional checkers.
23-
load-plugins=pylint.extensions.docparams,pylint.extensions.docstyle
23+
load-plugins=pylint.extensions.docparams,
24+
pylint.extensions.docstyle,
25+
pylint.extensions.bad_builtin,
2426

2527
# Use multiple processes to speed up Pylint.
2628
jobs=1
@@ -34,15 +36,6 @@ unsafe-load-any-extension=no
3436
# run arbitrary code
3537
extension-pkg-whitelist=
3638

37-
# Allow optimization of some AST trees. This will activate a peephole AST
38-
# optimizer, which will apply various small optimizations. For instance, it can
39-
# be used to obtain the result of joining multiple strings with the addition
40-
# operator. Joining a lot of strings can lead to a maximum recursion error in
41-
# Pylint and this flag can prevent that. It has one side effect, the resulting
42-
# AST will be different than the one from reality. This option is deprecated
43-
# and it will be removed in Pylint 2.0.
44-
optimize-ast=no
45-
4639

4740
[MESSAGES CONTROL]
4841

@@ -65,21 +58,31 @@ enable=indexing-exception,old-raise-syntax
6558
# --enable=similarities". If you want to run only the classes checker, but have
6659
# no Warning level messages displayed, use"--disable=all --enable=classes
6760
# --disable=W"
68-
disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,file-ignored,missing-type-doc
61+
disable=design,
62+
similarities,
63+
no-self-use,
64+
attribute-defined-outside-init,
65+
locally-disabled,
66+
star-args,
67+
pointless-except,
68+
bad-option-value,
69+
lobal-statement,
70+
fixme,
71+
suppressed-message,
72+
useless-suppression,
73+
locally-enabled,
74+
file-ignored,
75+
missing-type-doc,
76+
c-extension-no-member,
6977

7078

7179
[REPORTS]
7280

73-
# Set the output format. Available formats are text, parseable, colorized, msvs
74-
# (visual studio) and html. You can also give a reporter class, eg
75-
# mypackage.mymodule.MyReporterClass.
76-
output-format=text
77-
78-
# Put messages in a separate file for each module / package specified on the
79-
# command line instead of printing them on stdout. Reports (if any) will be
80-
# written in a file name "pylint_global.[txt|html]". This option is deprecated
81-
# and it will be removed in Pylint 2.0.
82-
files-output=no
81+
# Set the output format. Available formats are: 'text', 'parseable',
82+
# 'colorized', 'json2' (improved json format), 'json' (old json format), msvs
83+
# (visual studio) and 'github' (GitHub actions). You can also give a reporter
84+
# class, e.g. mypackage.mymodule.MyReporterClass.
85+
output-format=colorized
8386

8487
# Tells whether to display a full report or only the messages
8588
reports=no
@@ -176,9 +179,12 @@ logging-modules=logging
176179
good-names=main,_
177180

178181
# Bad variable names which should always be refused, separated by a comma
179-
bad-names=
180-
181-
bad-functions=input,apply,reduce
182+
bad-names=foo,
183+
bar,
184+
baz,
185+
toto,
186+
tutu,
187+
tata
182188

183189
# Colon-delimited sets of names that determine each other's naming style when
184190
# the name regexes allow several styles.
@@ -194,64 +200,33 @@ property-classes=abc.abstractproperty
194200
# Regular expression matching correct function names
195201
function-rgx=[a-z_][a-z0-9_]*$
196202

197-
# Naming hint for function names
198-
function-name-hint=[a-z_][a-z0-9_]*$
199-
200203
# Regular expression matching correct variable names
201204
variable-rgx=[a-z_][a-z0-9_]{2,30}$
202205

203-
# Naming hint for variable names
204-
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
205-
206206
# Regular expression matching correct constant names
207207
const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
208208

209-
210-
# Naming hint for constant names
211-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
212-
213209
# Regular expression matching correct attribute names
214210
attr-rgx=[a-z_][a-z0-9_]{2,30}$
215211

216-
# Naming hint for attribute names
217-
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
218-
219212
# Regular expression matching correct argument names
220213
argument-rgx=[a-z_][a-z0-9_]{2,30}$
221214

222-
# Naming hint for argument names
223-
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
224-
225215
# Regular expression matching correct class attribute names
226216
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
227217

228-
# Naming hint for class attribute names
229-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
230-
231218
# Regular expression matching correct inline iteration names
232219
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
233220

234-
# Naming hint for inline iteration names
235-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
236-
237221
# Regular expression matching correct class names
238222
class-rgx=[A-Z_][a-zA-Z0-9]+$
239223

240-
# Naming hint for class names
241-
class-name-hint=[A-Z_][a-zA-Z0-9]+$
242-
243224
# Regular expression matching correct module names
244225
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
245226

246-
# Naming hint for module names
247-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
248-
249227
# Regular expression matching correct method names
250228
method-rgx=[a-z_][a-z0-9_]*$
251229

252-
# Naming hint for method names
253-
method-name-hint=[a-z_][a-z0-9_]*$
254-
255230
# Regular expression which should only match function or class names that do
256231
# not require a docstring.
257232
no-docstring-rgx=(__.*__|main)
@@ -294,12 +269,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
294269
# else.
295270
single-line-if-stmt=no
296271

297-
# List of optional constructs for which whitespace checking is disabled. `dict-
298-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
299-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
300-
# `empty-line` allows space-only lines.
301-
no-space-check=trailing-comma,dict-separator
302-
303272
# Maximum number of lines in a module
304273
max-module-lines=1000
305274

@@ -405,6 +374,12 @@ exclude-protected=_asdict,_fields,_replace,_source,_make
405374

406375
[EXCEPTIONS]
407376

408-
# Exceptions that will emit a warning when being caught. Defaults to
409-
# "Exception"
410-
overgeneral-exceptions=Exception
377+
# Exceptions that will emit a warning when caught.
378+
overgeneral-exceptions=builtins.BaseException,builtins.Exception
379+
380+
[DEPRECATED_BUILTINS]
381+
382+
# List of builtins function names that should not be used, separated by a comma
383+
bad-functions=input,
384+
apply,
385+
reduce

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ information on using pull requests.
8585

8686
### Initial Setup
8787

88-
You need Python 3.8+ to build and test the code in this repo.
88+
You need Python 3.9+ to build and test the code in this repo.
8989

9090
We recommend using [pip](https://pypi.python.org/pypi/pip) for installing the necessary tools and
9191
project dependencies. Most recent versions of Python ship with pip. If your development environment

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/firebase/firebase-admin-python.svg?branch=master)](https://travis-ci.org/firebase/firebase-admin-python)
1+
[![Nightly Builds](https://github.com/firebase/firebase-admin-python/actions/workflows/nightly.yml/badge.svg)](https://github.com/firebase/firebase-admin-python/actions/workflows/nightly.yml)
22
[![Python](https://img.shields.io/pypi/pyversions/firebase-admin.svg)](https://pypi.org/project/firebase-admin/)
33
[![Version](https://img.shields.io/pypi/v/firebase-admin.svg)](https://pypi.org/project/firebase-admin/)
44

@@ -43,8 +43,8 @@ requests, code review feedback, and also pull requests.
4343

4444
## Supported Python Versions
4545

46-
We currently support Python 3.7+. However, Python 3.7 and Python 3.8 support is deprecated,
47-
and developers are strongly advised to use Python 3.9 or higher. Firebase
46+
We currently support Python 3.9+. However, Python 3.9 support is deprecated,
47+
and developers are strongly advised to use Python 3.10 or higher. Firebase
4848
Admin Python SDK is also tested on PyPy and
4949
[Google App Engine](https://cloud.google.com/appengine/) environments.
5050

0 commit comments

Comments
 (0)