[issue20898] Missing 507 response description
Filip Malczak added the comment: If we're getting out of original scope, then I wonder... Maybe we should keep only standard status codes here? If not, which should we support, and which not? What about custom Spring 420 Method Failure? One way to clean up mess here is to create some dictionaries called Http09, Http10, Http11, but also Nginx, Spring, InternetDraft, etc - they would hold codes specific to some standard or extension (and they should be incremental, so Http11 would hold only those codes that came with HTTP 1.1, not any of HTTP 1.0 codes). Also, we should provide function responses_mapping which should take dictionaries with code mappings, so one may use it like responses_mapping(Http09, Http10, Http11, Spring). Module attribute responses should be initialized to responses_mapping(Http09, Http10, Http11), so it would contain standard codes only. responses_mapping (we should probably consider different name) should take any number of dicts, merge them and return merging result. Additionally, I think it should overwrite merged values, so if we call it with two dicts, which hold the same key - value from last dict with this key should be used. Essentially, it is just: def responses_mapping(*dicts): out = {} for d in dicts: out.update(d) return out Now, we would have clean responses dictionary (mentioned in first comment, one that started this issue), and possibility to extend responses set with different protocol and extension versions. There may be one problem - many apps and libs (possibly standard python library too) may use keys from out of HTTP standard, so this change could break backwards compability. -- ___ Python tracker <http://bugs.python.org/issue20898> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19989] Error while sending function code over queue (multiprocessing)
New submission from Filip Malczak: Ive been using YAPSY to load plugins in one process. In this process I tried to put them in queue, and in another process I read them from queue. There was a problem with non-existing type of plugin in consumer process, so I tried to serialize plugin instance by hand and deserialize by hand in consumer. Both processes were created and started from main process, which passed them both the same queue. Law forbids me from showing the whole code, but I'm attaching file with code pieces that generate error below: Process ConsumerProcess-2: Traceback (most recent call last): File "/usr/lib/python3.3/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python3.3/multiprocessing/process.py", line 95, in run self._target(*self._args, **self._kwargs) File "//consumer_stub.py", line 27, in _consumer result = foo() File "//loader_process.py", line 90, in x val = (kind, plugin, meta) SystemError: ../Objects/cellobject.c:24: bad argument to internal function -- components: Build files: pythonbug.txt messages: 206239 nosy: Filip.Malczak priority: normal severity: normal status: open title: Error while sending function code over queue (multiprocessing) type: crash versions: Python 3.3 Added file: http://bugs.python.org/file33149/pythonbug.txt ___ Python tracker <http://bugs.python.org/issue19989> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20898] Missin 507 response description
New submission from Filip Malczak: I find it strange, that in http.client module we have variable: INSUFFICIENT_STORAGE = 507 yet in responses (dict mapping int codes to descriptions) 507 is missing. It's probably just mistake caused by short dev memory, fix is easy: add line: 507: 'Insufficient storage', between lines 208 and 209 (just after mapping for 505). Sorry, if this isn't well formatted issue, or if I specified wrong metadata. I'm working on Python 3.3.2+ (automatically installed in LUbuntu 13.10), and I don't know whether it was fixed in later versions. -- components: IO messages: 213266 nosy: Filip.Malczak priority: normal severity: normal status: open title: Missin 507 response description type: behavior ___ Python tracker <http://bugs.python.org/issue20898> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20898] Missing 507 response description
Changes by Filip Malczak : -- title: Missin 507 response description -> Missing 507 response description ___ Python tracker <http://bugs.python.org/issue20898> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com