switch to py3 on docs job (#4230)

* switch to py3 on docs job

* somehow unicode isn't a word
diff --git a/docs/hazmat/primitives/aead.rst b/docs/hazmat/primitives/aead.rst
index 7b01f74..ee4214a 100644
--- a/docs/hazmat/primitives/aead.rst
+++ b/docs/hazmat/primitives/aead.rst
@@ -34,7 +34,7 @@
         >>> nonce = os.urandom(12)
         >>> ct = chacha.encrypt(nonce, data, aad)
         >>> chacha.decrypt(nonce, ct, aad)
-        'a secret message'
+        b'a secret message'
 
     .. classmethod:: generate_key()
 
@@ -99,7 +99,7 @@
         >>> nonce = os.urandom(12)
         >>> ct = aesgcm.encrypt(nonce, data, aad)
         >>> aesgcm.decrypt(nonce, ct, aad)
-        'a secret message'
+        b'a secret message'
 
     .. classmethod:: generate_key(bit_length)
 
@@ -181,7 +181,7 @@
         >>> nonce = os.urandom(13)
         >>> ct = aesccm.encrypt(nonce, data, aad)
         >>> aesccm.decrypt(nonce, ct, aad)
-        'a secret message'
+        b'a secret message'
 
     .. classmethod:: generate_key(bit_length)
 
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index edcfdfc..bbab224 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -669,7 +669,7 @@
     ...     encryption_algorithm=serialization.BestAvailableEncryption(b'testpassword')
     ... )
     >>> serialized_private.splitlines()[0]
-    '-----BEGIN ENCRYPTED PRIVATE KEY-----'
+    b'-----BEGIN ENCRYPTED PRIVATE KEY-----'
 
 You can also serialize the key without a password, by relying on
 :class:`~cryptography.hazmat.primitives.serialization.NoEncryption`.
@@ -685,7 +685,7 @@
     ...     format=serialization.PublicFormat.SubjectPublicKeyInfo
     ... )
     >>> serialized_public.splitlines()[0]
-    '-----BEGIN PUBLIC KEY-----'
+    b'-----BEGIN PUBLIC KEY-----'
 
 This is the part that you would normally share with the rest of the world.
 
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 46cc30a..635a462 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -100,7 +100,7 @@
     ...    encryption_algorithm=serialization.BestAvailableEncryption(b'mypassword')
     ... )
     >>> pem.splitlines()[0]
-    '-----BEGIN ENCRYPTED PRIVATE KEY-----'
+    b'-----BEGIN ENCRYPTED PRIVATE KEY-----'
 
 It is also possible to serialize without encryption using
 :class:`~cryptography.hazmat.primitives.serialization.NoEncryption`.
@@ -113,7 +113,7 @@
     ...    encryption_algorithm=serialization.NoEncryption()
     ... )
     >>> pem.splitlines()[0]
-    '-----BEGIN RSA PRIVATE KEY-----'
+    b'-----BEGIN RSA PRIVATE KEY-----'
 
 For public keys you can use
 :meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey.public_bytes`
@@ -128,7 +128,7 @@
     ...    format=serialization.PublicFormat.SubjectPublicKeyInfo
     ... )
     >>> pem.splitlines()[0]
-    '-----BEGIN PUBLIC KEY-----'
+    b'-----BEGIN PUBLIC KEY-----'
 
 Signing
 ~~~~~~~
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index 7e23ce9..021e433 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -26,7 +26,7 @@
         >>> digest.update(b"abc")
         >>> digest.update(b"123")
         >>> digest.finalize()
-        'l\xa1=R\xcap\xc8\x83\xe0\xf0\xbb\x10\x1eBZ\x89\xe8bM\xe5\x1d\xb2\xd29%\x93\xafj\x84\x11\x80\x90'
+        b'l\xa1=R\xcap\xc8\x83\xe0\xf0\xbb\x10\x1eBZ\x89\xe8bM\xe5\x1d\xb2\xd29%\x93\xafj\x84\x11\x80\x90'
 
     If the backend doesn't support the requested ``algorithm`` an
     :class:`~cryptography.exceptions.UnsupportedAlgorithm` exception will be
diff --git a/docs/hazmat/primitives/mac/cmac.rst b/docs/hazmat/primitives/mac/cmac.rst
index b316e4c..a5b13ca 100644
--- a/docs/hazmat/primitives/mac/cmac.rst
+++ b/docs/hazmat/primitives/mac/cmac.rst
@@ -32,7 +32,7 @@
         >>> c = cmac.CMAC(algorithms.AES(key), backend=default_backend())
         >>> c.update(b"message to authenticate")
         >>> c.finalize()
-        'CT\x1d\xc8\x0e\x15\xbe4e\xdb\xb6\x84\xca\xd9Xk'
+        b'CT\x1d\xc8\x0e\x15\xbe4e\xdb\xb6\x84\xca\xd9Xk'
 
     If the backend doesn't support the requested ``algorithm`` an
     :class:`~cryptography.exceptions.UnsupportedAlgorithm` exception will be
diff --git a/docs/hazmat/primitives/mac/hmac.rst b/docs/hazmat/primitives/mac/hmac.rst
index a0e2014..c605e58 100644
--- a/docs/hazmat/primitives/mac/hmac.rst
+++ b/docs/hazmat/primitives/mac/hmac.rst
@@ -32,7 +32,7 @@
         >>> h = hmac.HMAC(key, hashes.SHA256(), backend=default_backend())
         >>> h.update(b"message to hash")
         >>> h.finalize()
-        '#F\xdaI\x8b"e\xc4\xf1\xbb\x9a\x8fc\xff\xf5\xdex.\xbc\xcd/+\x8a\x86\x1d\x84\'\xc3\xa6\x1d\xd8J'
+        b'#F\xdaI\x8b"e\xc4\xf1\xbb\x9a\x8fc\xff\xf5\xdex.\xbc\xcd/+\x8a\x86\x1d\x84\'\xc3\xa6\x1d\xd8J'
 
     If the backend doesn't support the requested ``algorithm`` an
     :class:`~cryptography.exceptions.UnsupportedAlgorithm` exception will be
diff --git a/docs/hazmat/primitives/padding.rst b/docs/hazmat/primitives/padding.rst
index e49fc49..245b554 100644
--- a/docs/hazmat/primitives/padding.rst
+++ b/docs/hazmat/primitives/padding.rst
@@ -25,16 +25,16 @@
         >>> padder = padding.PKCS7(128).padder()
         >>> padded_data = padder.update(b"11111111111111112222222222")
         >>> padded_data
-        '1111111111111111'
+        b'1111111111111111'
         >>> padded_data += padder.finalize()
         >>> padded_data
-        '11111111111111112222222222\x06\x06\x06\x06\x06\x06'
+        b'11111111111111112222222222\x06\x06\x06\x06\x06\x06'
         >>> unpadder = padding.PKCS7(128).unpadder()
         >>> data = unpadder.update(padded_data)
         >>> data
-        '1111111111111111'
+        b'1111111111111111'
         >>> data + unpadder.finalize()
-        '11111111111111112222222222'
+        b'11111111111111112222222222'
 
     :param block_size: The size of the block in :term:`bits` that the data is
         being padded to.
@@ -68,16 +68,16 @@
         >>> padder = padding.ANSIX923(128).padder()
         >>> padded_data = padder.update(b"11111111111111112222222222")
         >>> padded_data
-        '1111111111111111'
+        b'1111111111111111'
         >>> padded_data += padder.finalize()
         >>> padded_data
-        '11111111111111112222222222\x00\x00\x00\x00\x00\x06'
+        b'11111111111111112222222222\x00\x00\x00\x00\x00\x06'
         >>> unpadder = padding.ANSIX923(128).unpadder()
         >>> data = unpadder.update(padded_data)
         >>> data
-        '1111111111111111'
+        b'1111111111111111'
         >>> data + unpadder.finalize()
-        '11111111111111112222222222'
+        b'11111111111111112222222222'
 
     :param block_size: The size of the block in :term:`bits` that the data is
         being padded to.
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index 126a918..593b880 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -42,7 +42,7 @@
         >>> ct = encryptor.update(b"a secret message") + encryptor.finalize()
         >>> decryptor = cipher.decryptor()
         >>> decryptor.update(ct) + decryptor.finalize()
-        'a secret message'
+        b'a secret message'
 
     :param algorithms: A
         :class:`~cryptography.hazmat.primitives.ciphers.CipherAlgorithm`
@@ -151,7 +151,7 @@
         >>> ct = encryptor.update(b"a secret message")
         >>> decryptor = cipher.decryptor()
         >>> decryptor.update(ct)
-        'a secret message'
+        b'a secret message'
 
 .. class:: TripleDES(key)
 
@@ -229,7 +229,7 @@
         >>> ct = encryptor.update(b"a secret message")
         >>> decryptor = cipher.decryptor()
         >>> decryptor.update(ct)
-        'a secret message'
+        b'a secret message'
 
 .. class:: IDEA(key)
 
@@ -278,7 +278,7 @@
     .. doctest::
 
         >>> from cryptography.hazmat.primitives.ciphers.modes import CBC
-        >>> iv = "a" * 16
+        >>> iv = b"a" * 16
         >>> mode = CBC(iv)
 
 
@@ -471,7 +471,7 @@
 
     .. testoutput::
 
-        a secret message!
+        b'a secret message!'
 
 .. class:: XTS(tweak)
 
@@ -594,7 +594,7 @@
             >>> len_decrypted = decryptor.update_into(ct, buf)
             >>> # get the plaintext from the buffer reading only the bytes written (len_decrypted)
             >>> bytes(buf[:len_decrypted]) + decryptor.finalize()
-            'a secret message'
+            b'a secret message'
 
     .. method:: finalize()