Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
822069cc
Commit
822069cc
authored
3 months ago
by
I. Nüske
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Support separate connect/read timeouts and timeout None in pylinkahead.ini
parent
6f276cc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!175
BUG: Request responses without the "Set-Cookie" header no longer overwrite the...
,
!167
Separate connect/read timeouts in pylinkahead.ini
Pipeline
#58637
failed
3 months ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/linkahead/configuration.py
+5
-2
5 additions, 2 deletions
src/linkahead/configuration.py
with
5 additions
and
2 deletions
src/linkahead/configuration.py
+
5
−
2
View file @
822069cc
...
...
@@ -33,9 +33,10 @@ try:
# Adapted from https://github.com/python-jsonschema/jsonschema/issues/148
# Defines Validator to allow parsing of all iterables as array in jsonschema
# CustomValidator can be removed if/once jsonschema allows tuples for arrays
from
collections.abc
import
Iterable
from
jsonschema
import
validators
default
=
validators
.
_LATEST_VERSION
default
=
validators
.
validator_for
(
True
)
# Returns latest supported draft
t_c
=
(
default
.
TYPE_CHECKER
.
redefine
(
'
array
'
,
lambda
x
,
y
:
isinstance
(
y
,
Iterable
)))
CustomValidator
=
validators
.
extend
(
default
,
type_checker
=
t_c
)
except
ImportError
:
...
...
@@ -86,7 +87,9 @@ def config_to_yaml(config: ConfigParser) -> dict[str, dict[str, Union[int, str,
valobj
[
s
]
=
{}
for
key
,
value
in
config
[
s
].
items
():
# TODO: Can the type be inferred from the config object?
if
key
in
[
"
timeout
"
,
"
debug
"
]:
if
key
in
[
"
debug
"
]:
valobj
[
s
][
key
]
=
int
(
value
)
if
key
in
[
"
timeout
"
]:
if
str
(
value
).
lower
()
in
[
"
none
"
,
"
null
"
]:
valobj
[
s
][
key
]
=
None
elif
value
.
startswith
(
'
(
'
)
and
value
.
endswith
(
'
)
'
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment