You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/02/02 16:37:51 UTC

[GitHub] [qpid-dispatch] ChugR opened a new pull request #1013: DISPATCH-1946: Ensure that router schema is presented to json as a string

ChugR opened a new pull request #1013:
URL: https://github.com/apache/qpid-dispatch/pull/1013


   On some platforms the result of get_data is 'bytes' not 'str'.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1013: DISPATCH-1946: Ensure that router schema is presented to json as a string

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #1013:
URL: https://github.com/apache/qpid-dispatch/pull/1013#discussion_r568804795



##########
File path: python/qpid_dispatch_internal/management/qdrouter.py
##########
@@ -40,7 +40,7 @@ class QdSchema(schema.Schema):
 
     def __init__(self):
         """Load schema."""
-        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
+        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json').decode('utf8')

Review comment:
       This is always supposed to produce `bytes`. Weird that it ever worked on Python 3. https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data.

##########
File path: python/qpid_dispatch_internal/management/qdrouter.py
##########
@@ -40,7 +40,7 @@ class QdSchema(schema.Schema):
 
     def __init__(self):
         """Load schema."""
-        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
+        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json').decode('utf8')

Review comment:
       ```python
   def get_data(package: str, resource: str) -> Optional[bytes]: ...
   ```
   https://github.com/python/typeshed/blob/0afc2f9f437e3f20a8109884baf43eac9b848aca/stdlib/pkgutil.pyi#L38




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-dispatch] asfgit closed pull request #1013: DISPATCH-1946: Ensure that router schema is presented to json as a string

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1013:
URL: https://github.com/apache/qpid-dispatch/pull/1013


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1013: DISPATCH-1946: Ensure that router schema is presented to json as a string

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #1013:
URL: https://github.com/apache/qpid-dispatch/pull/1013#discussion_r568809504



##########
File path: python/qpid_dispatch_internal/management/qdrouter.py
##########
@@ -40,7 +40,7 @@ class QdSchema(schema.Schema):
 
     def __init__(self):
         """Load schema."""
-        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
+        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json').decode('utf8')

Review comment:
       ```python
   def get_data(package: str, resource: str) -> Optional[bytes]: ...
   ```
   https://github.com/python/typeshed/blob/0afc2f9f437e3f20a8109884baf43eac9b848aca/stdlib/pkgutil.pyi#L38




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1013: DISPATCH-1946: Ensure that router schema is presented to json as a string

Posted by GitBox <gi...@apache.org>.
jiridanek commented on a change in pull request #1013:
URL: https://github.com/apache/qpid-dispatch/pull/1013#discussion_r568804795



##########
File path: python/qpid_dispatch_internal/management/qdrouter.py
##########
@@ -40,7 +40,7 @@ class QdSchema(schema.Schema):
 
     def __init__(self):
         """Load schema."""
-        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
+        qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json').decode('utf8')

Review comment:
       This is always supposed to produce `bytes`. Weird that it ever worked on Python 3. https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org