ソースを参照

Closes #5313: Denote official support for Python 3.8

Jeremy Stretch 5 年 前
コミット
39b322ae6b
4 ファイル変更5 行追加4 行削除
  1. 1 0
      .travis.yml
  2. 1 1
      docs/index.md
  3. 1 1
      docs/installation/3-netbox.md
  4. 2 2
      netbox/netbox/api/fields.py

+ 1 - 0
.travis.yml

@@ -8,6 +8,7 @@ language: python
 python:
   - "3.6"
   - "3.7"
+  - "3.8"
 install:
   - pip install -r requirements.txt
   - pip install pycodestyle

+ 1 - 1
docs/index.md

@@ -55,7 +55,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and
 
 ## 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
 

+ 1 - 1
docs/installation/3-netbox.md

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

+ 2 - 2
netbox/netbox/api/fields.py

@@ -40,7 +40,7 @@ class ChoiceField(serializers.Field):
         return super().validate_empty_values(data)
 
     def to_representation(self, obj):
-        if obj is '':
+        if obj == '':
             return None
         return OrderedDict([
             ('value', obj),
@@ -48,7 +48,7 @@ class ChoiceField(serializers.Field):
         ])
 
     def to_internal_value(self, data):
-        if data is '':
+        if data == '':
             if self.allow_blank:
                 return data
             raise ValidationError("This field may not be blank.")