GoogleCloudPlatform / python-compat-runtime

DEPRECATED: gcr.io/google_appengine/python-compat-multicore
Apache License 2.0
22 stars 31 forks source link

INSERT fails with '#' in ID #103

Closed tmst closed 8 years ago

tmst commented 8 years ago

The match() call in the method lookup_rest_method(self, path, http_method) in api_config_manager.py always returns False when # is used as the ID in the API Explorer.

theacodes commented 8 years ago

Can you give me a few more details? Is this an issue related to cloud endpoints?

On Thu, Sep 1, 2016, 11:44 PM Tom Russell notifications@github.com wrote:

The match() call in the method lookup_rest_method(self, path, http_method) in api_config_manager.py always returns False when # is used as the ID in the API Explorer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/python-compat-runtime/issues/103, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPUc2b0BGW2VzpoNpNWtmym_FApx_xyks5ql8XGgaJpZM4JzagJ .

tmst commented 8 years ago

Maybe. Not sure what else would be helpful. Here's the code block:

def lookup_rest_method(self, path, http_method): """Look up the rest method at call time.

The method is looked up in self._rest_methods, the list it is saved in for SaveRestMethod.

Args: path: A string containing the path from the URL of the request. http_method: A string containing HTTP method of the request.

Returns: Tuple of (, , ) Where:

is the string name of the method that was matched. is the descriptor as specified in the API configuration. -and- is a dict of path parameters matched in the rest request. """ with self._config_lock: for compiled_path_pattern, unused_path, methods in self._rest_methods: match = compiled_path_pattern.match(path) if match: params = self._get_path_params(match) method_key = http_method.lower() method_name, method = methods.get(method_key, (None, None)) if method: break else: logging.warn('No endpoint found for path: %s', path) method_name = None method = None params = None return method_name, method, params
theacodes commented 8 years ago

Okay, so this code is part of cloud endpoints. Unfortunately, the compat runtime does not currently support cloud endpoints.

On Thu, Sep 1, 2016, 11:47 PM Tom Russell notifications@github.com wrote:

Maybe. Not sure what else would be helpful. Here's the code block:

def lookup_rest_method(self, path, http_method): """Look up the rest method at call time.

The method is looked up in self._rest_methods, the list it is saved in for SaveRestMethod.

Args: path: A string containing the path from the URL of the request. http_method: A string containing HTTP method of the request.

Returns: Tuple of (, , ) Where: is the string name of the method that was matched. is the descriptor as specified in the API configuration. -and- is a dict of path parameters matched in the rest request. """ with self._config_lock: for compiled_path_pattern, unused_path, methods in self._rest_methods: match = compiled_path_pattern.match(path) if match: params = self._get_path_params(match) method_key = http_method.lower() method_name, method = methods.get(method_key, (None, None)) if method: break else: logging.warn('No endpoint found for path: %s', path) method_name = None method = None params = None return method_name, method, params

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/python-compat-runtime/issues/103#issuecomment-244296713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPUc2lVE-j4IDqebZZFR5ZEWwZ9YtWdks5ql8aSgaJpZM4JzagJ .

tmst commented 8 years ago

Sorry about that. I'll post this over there. Yes?

theacodes commented 8 years ago

No worries. :) Good luck!