[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-13 Thread Kevin Chen
Kevin Chen added the comment: Awesome thanks! Does the rewrite fix the issue with creating negated flags as well? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42915] enum.Flag ~ bitwise negation is very slow and can't be defined as a Flag value

2021-01-12 Thread Kevin Chen
New submission from Kevin Chen : Here's a code sample: ``` import time from enum import Flag, auto class MyFlag(Flag): NONE = 0 FLAG_1 = auto() FLAG_2 = auto() FLAG_3 = auto() FLAG_4 = auto() FLAG_5 = auto() FLAG_6 = auto() # # NOT_FLAG_1_OR_2 = ~FLAG_1

[issue42912] enum.Flag ~ bitwise negation is very slow

2021-01-12 Thread Kevin Chen
New submission from Kevin Chen : Ignore this, opened issue by accident -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue42912] enum.Flag ~ bitwise negation is very slow

2021-01-12 Thread Kevin Chen
Change by Kevin Chen : -- nosy: aspin2 priority: normal severity: normal status: open title: enum.Flag ~ bitwise negation is very slow versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue42

[issue38571] Segfault with StopIteration

2019-10-25 Thread Kevin Chen
Kevin Chen added the comment: Sorry for the noise. I upgraded my gevent (1.3.5 to 1.4.0) and greenlet (0.4.13 to 0.4.15) libraries, and that appears to have resolved the issue. I assume there was an incompatibility in one or both of the older versions of these libraries with python 3.7

[issue38571] Segfault with StopIteration

2019-10-23 Thread Kevin Chen
New submission from Kevin Chen : Unfortunately, I don't currently have a simple test case, but after migrating an app from python 3.6 to python 3.7, python frequently (but not always) segfaults when running tests for my app in code related to StopIteration (perhaps somehow related

[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-12-11 Thread Kevin Chen
Change by Kevin Chen <kc...@mit.edu>: -- nosy: +kchen ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20891> ___ ___ Python

[issue31062] socket.makefile does not handle line buffering

2017-07-27 Thread Kevin Chen
New submission from Kevin Chen: File objects generated with socket.makefile and that attempt to use line buffering appear to not actually use line buffering, at least for writing. In this example, the string does not appear to be written until the flush call. First, set up a socket: $ nc -l

[issue28671] SSL server requesting client certificates should send CA list

2016-11-11 Thread Kevin Chen
New submission from Kevin Chen: When a Python HTTPS server requests client certificates, it should send a CA list so the client knows which certificates are acceptable. It looks like right now Python calls SSL_CTX_load_verify_locations, so once the client certificate is sent, Python can

[issue15880] os.path.split() and long UNC names

2012-11-01 Thread Kevin Chen
Changes by Kevin Chen mr.kevin.chen...@gmail.com: -- nosy: +kevin.chen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15880 ___ ___ Python-bugs

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-21 Thread Kevin Chen
Kevin Chen added the comment: Okay just tried it. This is under Windows 7 x64. I created a .py file with read-only permission. When I import the .py module, the created .pyc doesn't have read-only permission. So it works as intended under Windows OS. As long as under posix system

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-20 Thread Kevin Chen
Kevin Chen added the comment: Hi Nick, Thank you so much for rolling out this change. I think your implementation of the fix is more elegant. I have learned a few things from you. I would love to keep helping to test/fix bugs for Python on Windows. Please contact me if there is anything you

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-08 Thread Kevin Chen
Kevin Chen added the comment: Hi Eric, I am happy to install Python 3.3 on Windows and help you test this. Can you please give me some ideas on what I need to do? Do I sync to the latest Python 3.3 branch and compile? Then run some unit-test code? Which test files should I run? What should

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-20 Thread Kevin Chen
Kevin Chen added the comment: Hi I made the following patch for this issue. It addresses the #2051 security bug. So the .pyc and .pyo files are created using the same permission as .py The MS_WINDOWS version will chmod the permission of .pyc and .pyo files to write accessible before deleting

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Kevin Chen added the comment: I propose a fix: static FILE * open_exclusive(char *filename, mode_t mode) { #if defined(O_EXCL)defined(O_CREAT)defined(O_WRONLY)defined(O_TRUNC) /* Use O_EXCL to avoid a race condition when another process tries to write the same file. When

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Kevin Chen added the comment: This is essentially the way things were done in version 2.5.4 of Python. The unlink() always succeeded, because the created .pyc file permission is always set to 0666 in the fd=open() function. This means the .pyc will never be created as read-only, and as long

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-19 Thread Kevin Chen
Changes by Kevin Chen mr.kevin.chen...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6074 ___ ___ Python-bugs-list

[issue7978] SocketServer doesn't handle syscall interruption

2010-10-26 Thread Kevin Chen
Changes by Kevin Chen kc...@mit.edu: -- nosy: +kchen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7978 ___ ___ Python-bugs-list mailing list