Greg Hogan
6c51d1563d
URLFile: add typing and internalize pool manager ( #31466 )
...
* URLFile: add typing and internalize pool manager
* cleanup
old-commit-hash: e59fe0014a
2024-02-14 14:09:01 -08:00
Greg Hogan
cb6a47c6bf
simplify URLFile ( #31365 )
...
* simplify URLFile
* more space
old-commit-hash: ec9f3dcef3
2024-02-08 10:24:45 -08:00
Greg Hogan
54dc43fe14
make URLFile safe after fork() ( #31309 )
...
* make URLFile safe after fork()
* cache the pool manager in each instance
* type hints
old-commit-hash: a8aa04e6bd
2024-02-05 18:07:48 -08:00
Justin Newberry
0fb7448a9d
LogReader: remove redirect message for internal data ( #31088 )
...
fix logging
old-commit-hash: 0234cadec3
2024-01-23 12:55:50 -08:00
Justin Newberry
7aecd2f91d
url_file: fix non-200 files being cached ( #30886 )
...
* fix + test
* fix unclosed
* easier to read
Co-authored-by: Shane Smiskol <shane@smiskol.com >
* fix that
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com >
old-commit-hash: fba521ecc6
2024-01-02 12:42:08 -08:00
Adeeb Shihadeh
207073dc4c
fix unused
...
old-commit-hash: 51a93cf9aa
2023-12-17 16:32:56 -08:00
royjr
d41f215df8
dependency: remove pycurl package ( #30771 )
...
* Update qcomgpsd.py
* Update url_file.py
* remove pycurl
* requests -> urllib3
* unused
* redundant
* fix import
* Revert "requests -> urllib3"
This reverts commit 7ca39e618917986f50356519d2795a432e3a5280.
* headless
* fix trail
* use requests.exceptions.RequestException
* use fp.tell
* fix indents
* reorder imports
* change timeout
* fix debug timing
* remove exception
* add timeout
* missing headers
* move to constructor
* move import
* unused import
* fix debug
* try
* no retries
old-commit-hash: 70624ffc81
2023-12-17 16:25:25 -08:00
Greg Hogan
e91032efb3
replace common.file_helpers.mkdirs_exists_ok with python os.makedirs funtion ( #30618 )
...
replace common.file_helpers.mkdirs_exists_ok with python os.makedirs function
old-commit-hash: db35dcd0b5
2023-12-06 09:55:29 -08:00
Kacper Rączy
6f51ee8267
URLFile: exception type for failed requests ( #30330 )
...
URLFileException for URLFile request errors
old-commit-hash: c27e977475
2023-10-25 16:20:12 -07:00
Greg Hogan
e0469bdde6
filereader cleanup ( #30191 )
...
* filereader cleanup
* make name return url
* remove unused imports
old-commit-hash: 86b90a8ba2
2023-10-05 19:45:46 -07:00
Justin Newberry
a9153302a3
URLFile: don't cache non-existent file's lengths ( #30071 )
...
* urlfile empty
* simplify with mock
* better test name
* PR cleanup
* cleanup the length file
old-commit-hash: fa51bbc236
2023-10-04 12:57:56 -07:00
Justin Newberry
dc6078a6c3
System: use paths for download folders too ( #29818 )
...
* use paths for download folders too
* trailing slash
* reset that
old-commit-hash: 73eda51a11
2023-09-07 12:49:03 -07:00
Justin Newberry
c4f322ce2d
Linter: remove pylint ( #29611 )
...
remove pylint
old-commit-hash: 1ee6ed4b16
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
16ec56398c
add openpilot prefix to imports ( #29498 )
...
* add openpilot prefix to imports
* more
* more
* fix docs
* fix linter
* bump submodules
* fix patched tests
* update dynamic imports
* debug
* Revert "debug"
This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.
* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Shane Smiskol
cf0c8aac08
URLFile: raise exception if remote URL doesn't exist when using cache ( #24432 )
...
* URLFile returns empty bytes if using cache and remote file doesn't exist
* better exception
* assert on cached files
old-commit-hash: 6163dd5ca0
2022-05-09 13:31:55 -07:00
Ewout ter Hoeven
f206ebd054
Pyupgrade 3.6: Update syntax with Python 3.6+ features ( #23305 )
...
Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default
Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com >
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com >
Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com >
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com >
old-commit-hash: 332f568a82
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven
a962365292
Convert format strings strings to f-strings ( #23241 )
...
* Convert all text strings to f-strings
Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.
Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.
F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale
* revert pyextra changes
* revert ublox.py
Co-authored-by: Willem Melching <willem.melching@gmail.com >
old-commit-hash: 55390d273f
2021-12-16 14:58:17 +01:00
Willem Melching
6f92abc815
Less open file permissions ( #21922 )
...
* Less open file permissions
* add test back
* remove params test for permissions
* remove umask
* bump cereal
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: dddab597bc
2021-08-28 18:25:05 -07:00
arfy slowy
63b3d6024b
fix: spelling typos ( #21861 )
...
* fix: typo spelling grammar
* revert
* Update selfdrive/locationd/calibrationd.py
* more revert
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com >
old-commit-hash: d74def61f8
2021-08-05 12:05:49 -07:00
Greg Hogan
eca265120f
FrameIterator that uses 1+ GB less RAM ( #21687 )
...
old-commit-hash: 8f1806602c
2021-07-22 12:08:56 -07:00
Adeeb Shihadeh
c64a8356fe
move to github container registry + CI speedup ( #19621 )
...
old-commit-hash: 59d7c5e64a
2020-12-31 14:57:01 -08:00
Willem Melching
1a2893345a
add check for partial response code ( #2282 )
...
old-commit-hash: 529e9a23ea
2020-10-07 12:14:22 +02:00
Greg Hogan
3ea69f614e
eliminate round-trip reading entire file ( #2275 )
...
* eliminate round-trip reading entire file
* only if reading entire file
* print headers in errors
* fix end
old-commit-hash: 2293a6a36c
2020-10-05 16:59:19 -07:00
grekiki
398796a010
FileReader: cache files locally ( #2170 )
...
* framework for updates
* File caching
* update .gitignore
* update .gitignore
* Store in home tmp directory
* fix bugs in old code, add tests
* add test
* revert bug
* Fixed some bugs, more testing
* doing some style fixes
* Update caching with lenghts
* doing some style fixes
* doing some style fixes
* doing some style fixes
* subrepositories
* try to fix the tests
* change submodules back
* doing some style fixes
* if we don't cache, we don't cache length either
* fix curls
* make sure tests run in ci
* Cleanup tests
* Use int for cache flag
* fix linter
Co-authored-by: Willem Melching <willem.melching@gmail.com >
old-commit-hash: 05b64257df
2020-09-17 13:03:34 +02:00
Willem Melching
9c291968f6
Speedup URLFile ( #1888 )
...
* add parallel download support to URLFile
* make python 3.8 happy
* Fix chunk size
* Automatic number of threads
* No daemon threads in unlogger
* Cache length
* dont touch old filereader
* Remove debug info
* remove debug script
* Ignore type
old-commit-hash: c70700758d
2020-07-20 17:10:08 +02:00