Skip to content

Commit 83bc37d

Browse files
author
Bilal Al
committed
moved spec to separate file.
1 parent 2adfb50 commit 83bc37d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

splitio/api/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from splitio.api import APIException
77
from splitio.api.commons import headers_from_metadata, record_telemetry
8-
from splitio.api.commons import _SPEC_VERSION
8+
from splitio.spec import SPEC_VERSION
99
from splitio.util.time import get_current_epoch_time_ms
1010
from splitio.api.client import HttpClientException
1111
from splitio.models.token import from_raw
@@ -44,7 +44,7 @@ def authenticate(self):
4444
try:
4545
response = self._client.get(
4646
'auth',
47-
'/v2/auth?s=' + _SPEC_VERSION,
47+
'/v2/auth?s=' + SPEC_VERSION,
4848
self._sdk_key,
4949
extra_headers=self._metadata,
5050
)

splitio/api/commons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Commons module."""
22
from splitio.util.time import get_current_epoch_time_ms
3+
from splitio.spec import SPEC_VERSION
34

45
_CACHE_CONTROL = 'Cache-Control'
56
_CACHE_CONTROL_NO_CACHE = 'no-cache'
6-
_SPEC_VERSION = '1.1'
77

88
def headers_from_metadata(sdk_metadata, client_key=None):
99
"""
@@ -57,7 +57,7 @@ def record_telemetry(status_code, elapsed, metric_name, telemetry_runtime_produc
5757
class FetchOptions(object):
5858
"""Fetch Options object."""
5959

60-
def __init__(self, cache_control_headers=False, change_number=None, sets=None, spec=_SPEC_VERSION):
60+
def __init__(self, cache_control_headers=False, change_number=None, sets=None, spec=SPEC_VERSION):
6161
"""
6262
Class constructor.
6363

splitio/spec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SPEC_VERSION = '1.1'

0 commit comments

Comments
 (0)