[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-07-22 Thread Graham Dumpleton
Graham Dumpleton added the comment: The workaround of using: #if defined(WIN32) && PY_MAJOR_VERSION >= 3 _wputenv(L"PYTHONIOENCODING=cp1252:backslashreplace"); #endif Py_Initialize(); gets around the crash on startup. I haven't done sufficient t

[issue6501] Fatal LookupError: unknown encoding: cp0 on Windows embedded startup.

2009-08-05 Thread Graham Dumpleton
Graham Dumpleton added the comment: Python should be as robust as possible and thus should be fixed, but I am happy with using the workaround so if this is more a question of what priority to mark this, I wouldn't see it as being u

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-02-18 Thread Graham Dumpleton
New submission from Graham Dumpleton : In multiprocessing.process it contains the code: def _bootstrap(self): if sys.stdin is not None: try: os.close(sys.stdin.fileno()) except (OSError, ValueError

[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-06-10 Thread Graham Dumpleton
Graham Dumpleton added the comment: Worth noting is that Python documentation in: http://docs.python.org/library/stdtypes.html says: """ file.fileno() Return the integer “file descriptor” that is used by the underlying implementation to request I/O operations from the operati

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-12 Thread Graham Dumpleton
Graham Dumpleton added the comment: Nick, there is no main module in the same way there is when using the Python command line. Ie., there is no module that has __name__ being __main__. The closest thing is the WSGI script file which holds the application object for the WSGI application

[issue9260] A finer grained import lock

2010-07-14 Thread Graham Dumpleton
Graham Dumpleton added the comment: How is this going to deal with cyclical imports where different threads could import at the same time different modules within that cycle? I need to look through the proposed patch and work out exactly what it does, but am concerned about whether this

[issue1758146] Crash in PyObject_Malloc

2010-08-03 Thread Graham Dumpleton
Graham Dumpleton added the comment: The actual reported problem was likely because of known issues with running subversion Python wrappers in a sub interpreter. The rest of the conversation was for a completely different issue which relates to mod_python not using thread APIs in Python in

[issue10496] Python startup should not require passwd entry

2016-12-05 Thread Graham Dumpleton
Graham Dumpleton added the comment: @surajd Why aren't you using the Python S2I builders for OpenShift? When you run anything under OpenShift, it will assign your project a UID which any containers are forced to run under. The OpenShift containers include a mechanism using a package

[issue18020] html.escape 10x slower than cgi.escape

2013-05-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: Importing the cgi module the first time even in Python 2.X was always very expensive. I would suggest you redo the test using timing done inside of the script after modules have been imported so as to properly separate module import time in both cases from

[issue18020] html.escape 10x slower than cgi.escape

2013-05-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: Whoops. Missed the quoting. -- ___ Python tracker <http://bugs.python.org/issue18020> ___ ___ Python-bugs-list mailin

[issue10496] Python startup should not require passwd entry

2014-10-11 Thread Graham Dumpleton
Changes by Graham Dumpleton : -- nosy: +grahamd ___ Python tracker <http://bugs.python.org/issue10496> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24554] GC should happen when a subinterpreter is destroyed

2015-07-03 Thread Graham Dumpleton
Graham Dumpleton added the comment: That GC happens on an object in the wrong interpreter in this case is the problem as it can result in used code execution against the wrong interpreter context. If you are saying this can happen anytime in the life of a sub interpreter and not just in this

[issue24554] GC should happen when a subinterpreter is destroyed

2015-07-03 Thread Graham Dumpleton
Graham Dumpleton added the comment: If this issue with GC can't be addressed and sub interpreters isolated better, then there is no point pursing then the idea that has been raised at the language summit of giving each sub interpreter its own GIL and then provide mechanisms to allow

[issue24554] GC should happen when a subinterpreter is destroyed

2015-07-03 Thread Graham Dumpleton
Graham Dumpleton added the comment: Right now mod_wsgi is the main user of sub interpreters. I wasn't even aware of this issue until Jesse found it. Thus in 7+ years, it never presented a problem in practice, possibly because in mod_wsgi sub interpreters are only ever destroyed on pr

[issue23990] Callable builtin doesn't respect descriptors

2016-01-13 Thread Graham Dumpleton
Changes by Graham Dumpleton : -- nosy: +grahamd ___ Python tracker <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: Your code should be written as: res = """\ e: {} pi: {} qs: {} """.format( pprint.pformat(e), urllib.parse.unquote(e['PATH_INFO'].encode('Latin-1').decode('UTF-8')),

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: There does appear to be something wrong with wsgiref, because with that rewritten code you should for: curl http://127.0.0.1:8000/тест get: pi: /тест qs: {} and for: curl http://127.0.0.1:8000/?a=тест get: pi: / qs: {'a': ['тест']}

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: As I commented on Issue 26808, it actually looks to me like the QUERY_STRING is processed fine and it is actually PATH_INFO that is not. I am confused at this point. I hate dealing with these WSGI level details now

[issue26808] wsgiref.simple_server breaks unicode in URIs

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: This gets even weirder. Gunicorn behaves same as wsgiref. However, it turns out they both only show the unexpected result if using curl. If you use safari they are both fine. Waitress blows up altogether on it with an exception when you use curl as client

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-20 Thread Graham Dumpleton
Graham Dumpleton added the comment: What I get in Apache for: http://127.0.0.1:8000/a=тест in Safari browser is: 'REQUEST_URI': '/a=%D1%82%D0%B5%D1%81%D1%82', 'PATH_INFO': '/a=\xc3\x91\\x82\xc3\x90\xc2\xb5\xc3\x91\\x81\xc3\x91\\x82', Where as for cur

[issue16679] Add advice about non-ASCII wsgiref PATH_INFO

2016-04-21 Thread Graham Dumpleton
Graham Dumpleton added the comment: Double back slashes would possibly be an artefact of the some mess that happens when logging out through the Apache error log. -- ___ Python tracker <http://bugs.python.org/issue16

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Graham Dumpleton
Graham Dumpleton added the comment: If someone is going to try and do anything in the area of better proxy object support, I hope you will also look at all the work I have done on that before for wrapt (https://github.com/GrahamDumpleton/wrapt). Two related issue this has already found are

[issue28411] Eliminate PyInterpreterState.modules.

2016-10-10 Thread Graham Dumpleton
Graham Dumpleton added the comment: I always use PyImport_GetModuleDict(). So long as that isn't going away I should be good. -- ___ Python tracker <http://bugs.python.org/is

<    1   2