Compare commits

...

28 Commits

Author SHA1 Message Date
Luciano Ramalho
612c145ac9
Merge pull request #51 from fluentpython/dependabot/pip/21-async/mojifinder/pydantic-1.10.13
build(deps): bump pydantic from 1.8.2 to 1.10.13 in /21-async/mojifinder
2025-05-19 16:55:45 -03:00
dependabot[bot]
ab8a774924
build(deps): bump pydantic from 1.8.2 to 1.10.13 in /21-async/mojifinder
Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.8.2 to 1.10.13.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v1.8.2...v1.10.13)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 1.10.13
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:55:09 +00:00
Luciano Ramalho
802c353075
Merge pull request #52 from fluentpython/dependabot/pip/21-async/mojifinder/starlette-0.40.0
build(deps): bump starlette from 0.25.0 to 0.40.0 in /21-async/mojifinder
2025-05-19 16:53:57 -03:00
Luciano Ramalho
243a02b766
Merge pull request #53 from fluentpython/dependabot/pip/20-executors/getflags/h11-0.16.0
build(deps): bump h11 from 0.12.0 to 0.16.0 in /20-executors/getflags
2025-05-19 16:53:42 -03:00
Luciano Ramalho
e06a925d2f
Merge pull request #50 from fluentpython/dependabot/pip/20-executors/getflags/idna-3.7
build(deps): bump idna from 3.2 to 3.7 in /20-executors/getflags
2025-05-19 16:53:20 -03:00
dependabot[bot]
74c52779b4
build(deps): bump h11 from 0.12.0 to 0.16.0 in /20-executors/getflags
Bumps [h11](https://github.com/python-hyper/h11) from 0.12.0 to 0.16.0.
- [Commits](https://github.com/python-hyper/h11/compare/v0.12.0...v0.16.0)

---
updated-dependencies:
- dependency-name: h11
  dependency-version: 0.16.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:53:20 +00:00
Luciano Ramalho
a4aea64dd1
Merge pull request #55 from fluentpython/dependabot/pip/08-def-type-hints/coordinates/future-0.18.3
build(deps): bump future from 0.18.2 to 0.18.3 in /08-def-type-hints/coordinates
2025-05-19 16:52:55 -03:00
Luciano Ramalho
bfedc4d6e6
Merge pull request #56 from fluentpython/dependabot/pip/20-executors/getflags/tqdm-4.66.3
build(deps): bump tqdm from 4.62.3 to 4.66.3 in /20-executors/getflags
2025-05-19 16:52:25 -03:00
Luciano Ramalho
41866ada97
Merge pull request #54 from fluentpython/dependabot/pip/20-executors/getflags/certifi-2024.7.4
build(deps): bump certifi from 2022.12.7 to 2024.7.4 in /20-executors/getflags
2025-05-19 16:52:05 -03:00
dependabot[bot]
68de220bd1
build(deps): bump future in /08-def-type-hints/coordinates
Bumps [future](https://github.com/PythonCharmers/python-future) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/PythonCharmers/python-future/releases)
- [Changelog](https://github.com/PythonCharmers/python-future/blob/master/docs/changelog.rst)
- [Commits](https://github.com/PythonCharmers/python-future/compare/v0.18.2...v0.18.3)

---
updated-dependencies:
- dependency-name: future
  dependency-version: 0.18.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:51:51 +00:00
dependabot[bot]
8e911b19be
build(deps): bump tqdm from 4.62.3 to 4.66.3 in /20-executors/getflags
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.62.3 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.62.3...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-version: 4.66.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:51:51 +00:00
Luciano Ramalho
f355aa37ed
Merge pull request #35 from charlielito/patch-1
Fix `error` variable not being reset when failure in a coroutine call in flags2_asyncio.py
2025-05-19 16:51:24 -03:00
dependabot[bot]
d14c7bed18
build(deps): bump certifi in /20-executors/getflags
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2024.7.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:51:11 +00:00
dependabot[bot]
1b44dfaf11
build(deps): bump starlette in /21-async/mojifinder
Bumps [starlette](https://github.com/encode/starlette) from 0.25.0 to 0.40.0.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.25.0...0.40.0)

---
updated-dependencies:
- dependency-name: starlette
  dependency-version: 0.40.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:51:09 +00:00
dependabot[bot]
74ee1d4915
build(deps): bump idna from 3.2 to 3.7 in /20-executors/getflags
Bumps [idna](https://github.com/kjd/idna) from 3.2 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.2...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.7'
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19 19:51:04 +00:00
Luciano Ramalho
1907aea700
Merge pull request #31 from fluentpython/dependabot/pip/20-executors/getflags/certifi-2022.12.7
build(deps): bump certifi from 2021.5.30 to 2022.12.7 in /20-executors/getflags
2025-05-19 16:50:26 -03:00
Luciano Ramalho
dfb8fce86e
Merge pull request #34 from fluentpython/dependabot/pip/21-async/mojifinder/starlette-0.25.0
build(deps): bump starlette from 0.13.6 to 0.25.0 in /21-async/mojifinder
2025-05-19 16:50:12 -03:00
Luciano Ramalho
abc03e728d
Merge pull request #24 from scartezini/scartezini-patch-1
Fix chapter number to 2ed edition
2025-05-19 16:49:19 -03:00
Luciano Ramalho
e7ecb9cff0
Merge pull request #26 from grinvlad/patch-1
Fix filename in script
2025-05-19 16:48:36 -03:00
Luciano Ramalho
7b13f5b8fd
Merge pull request #39 from abbassix/patch-1
using f-strings instead of % operator
2025-05-19 16:43:35 -03:00
Luciano Ramalho
e7c182d027
Merge pull request #45 from tudor38/fix-spelling
fix spelling
2025-05-19 16:42:43 -03:00
Tudor Capusan
567f3529e3 fix spelling
change from 'reminder' to 'remainder' to match intent
2024-06-16 11:37:29 -04:00
Mehdi Abbassi
166a388ac8
using f-strings instead of % operator 2023-09-29 07:46:37 +03:30
Carlos Andrés Álvarez Restrepo
51055887dd
Update flags2_asyncio.py
Fix `error` variable not being reset when a successful coroutine call
2023-03-26 17:28:08 -05:00
dependabot[bot]
d3309f03e8
build(deps): bump starlette in /21-async/mojifinder
Bumps [starlette](https://github.com/encode/starlette) from 0.13.6 to 0.25.0.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.13.6...0.25.0)

---
updated-dependencies:
- dependency-name: starlette
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 22:09:42 +00:00
dependabot[bot]
3f9c89554a
build(deps): bump certifi in /20-executors/getflags
Bumps [certifi](https://github.com/certifi/python-certifi) from 2021.5.30 to 2022.12.7.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2021.05.30...2022.12.07)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 05:48:20 +00:00
Vlad Grin
d00908d553
Fix filename in script 2022-07-31 18:41:59 +03:00
Eduardo Scartezini
08230737cc
Fix chapter number to 2ed edition
On 2ed the chapter "Object references, mutability and recycling" from 8 to 6
This commit fixes the readme with the new chapter number
2022-07-08 17:44:09 +01:00
8 changed files with 14 additions and 12 deletions

View File

@ -482,7 +482,7 @@
" self.y = y\n",
"\n",
" def __repr__(self):\n",
" return 'Vector(%r, %r)' % (self.x, self.y)\n",
" return f'Vector({self.x!r}, {self.y!r})'\n",
"\n",
" def __abs__(self):\n",
" return math.hypot(self.x, self.y)\n",

View File

@ -1,4 +1,4 @@
#!/bin/bash
python3 -m doctest bisect_demo.py
python3 -m doctest metro_lat_long.py
python3 -m doctest metro_lat_lon.py
pytest -q --nbval

View File

@ -1,4 +1,4 @@
Sample code for Chapter 8 - "Object references, mutability and recycling"
Sample code for Chapter 6 - "Object references, mutability and recycling"
From the book "Fluent Python" by Luciano Ramalho (O'Reilly, 2015)
http://shop.oreilly.com/product/0636920032519.do

View File

@ -1,2 +1,2 @@
geolib==1.0.7
future==0.18.2
future==0.18.3

View File

@ -6,8 +6,8 @@ def columnize(
) -> Iterator[tuple[str, ...]]: # <1>
if num_columns == 0:
num_columns = round(len(sequence) ** 0.5)
num_rows, reminder = divmod(len(sequence), num_columns)
num_rows += bool(reminder)
num_rows, remainder = divmod(len(sequence), num_columns)
num_rows += bool(remainder)
return (tuple(sequence[i::num_rows]) for i in range(num_rows)) # <2>
# end::COLUMNIZE[]

View File

@ -79,6 +79,8 @@ async def supervisor(cc_list: list[str],
error = exc # <10>
except KeyboardInterrupt:
break
else:
error = None
if error:
status = DownloadStatus.ERROR # <11>

View File

@ -1,10 +1,10 @@
anyio==3.3.2
certifi==2021.5.30
certifi==2024.7.4
charset-normalizer==2.0.6
h11==0.12.0
h11==0.16.0
httpcore==0.13.7
httpx==1.0.0b0
idna==3.2
idna==3.7
rfc3986==1.5.0
sniffio==1.2.0
tqdm==4.62.3
tqdm==4.66.3

View File

@ -1,7 +1,7 @@
click==7.1.2
fastapi==0.65.2
h11==0.12.0
pydantic==1.8.2
starlette==0.13.6
pydantic==1.10.13
starlette==0.40.0
typing-extensions==3.7.4.3
uvicorn==0.13.4