mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #5313: Denote official support for Python 3.8
This commit is contained in:
@ -8,6 +8,7 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- "3.6"
|
- "3.6"
|
||||||
- "3.7"
|
- "3.7"
|
||||||
|
- "3.8"
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install pycodestyle
|
- pip install pycodestyle
|
||||||
|
@ -55,7 +55,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and
|
|||||||
|
|
||||||
## Supported Python Versions
|
## Supported Python Versions
|
||||||
|
|
||||||
NetBox supports Python 3.6 and 3.7 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)
|
NetBox supports Python 3.6, 3.7, and 3.8 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.)
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ This section of the documentation discusses installing and configuring the NetBo
|
|||||||
Begin by installing all system packages required by NetBox and its dependencies.
|
Begin by installing all system packages required by NetBox and its dependencies.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
NetBox v2.8.0 and later require Python 3.6 or 3.7. This documentation assumes Python 3.6.
|
NetBox v2.8.0 and later require Python 3.6, 3.7, or 3.8. This documentation assumes Python 3.6.
|
||||||
|
|
||||||
### Ubuntu
|
### Ubuntu
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class ChoiceField(serializers.Field):
|
|||||||
return super().validate_empty_values(data)
|
return super().validate_empty_values(data)
|
||||||
|
|
||||||
def to_representation(self, obj):
|
def to_representation(self, obj):
|
||||||
if obj is '':
|
if obj == '':
|
||||||
return None
|
return None
|
||||||
return OrderedDict([
|
return OrderedDict([
|
||||||
('value', obj),
|
('value', obj),
|
||||||
@ -48,7 +48,7 @@ class ChoiceField(serializers.Field):
|
|||||||
])
|
])
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
if data is '':
|
if data == '':
|
||||||
if self.allow_blank:
|
if self.allow_blank:
|
||||||
return data
|
return data
|
||||||
raise ValidationError("This field may not be blank.")
|
raise ValidationError("This field may not be blank.")
|
||||||
|
Reference in New Issue
Block a user