1
0
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:
Jeremy Stretch
2020-11-05 16:08:04 -05:00
parent 23cce55246
commit 39b322ae6b
4 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.")