[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-19 Thread Flavio Grossi
Flavio Grossi added the comment: > About the new optional balanced parameter added downstream to Fedora, the > patch is very small compared to timedlock.patch. It only changes the Python > code, not the C code The balancing fix has 3 main problems imo: - It causes long delays t

[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-15 Thread Flavio Grossi
Flavio Grossi added the comment: First of all, thank you for your support. I fully understand what you are saying, however, being stuck to python 2.7 because of libraries still not ported to 3, this is a serious problem to us, and, while i agree this would introduce a new "feature"

[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-15 Thread Flavio Grossi
Flavio Grossi added the comment: >> however, being stuck to python 2.7 because of libraries > Are there private libraries or public libraries? It is a mix of public and internal libraries with the main public blockers being twisted and apache thrift (and other libs which have py3 alt

[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-13 Thread Flavio Grossi
New submission from Flavio Grossi: threading.Condition.wait(timeout=x) is implemented in python 2 as a semi-busy loop which causes cpu wakeups and unexpected cpu use. I think this is somewhat problematic since it causes problems in all modules which use that method, such as Queue.get() when

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-27 Thread Flavio Grossi
Flavio Grossi added the comment: Hi, and thank you for your answer. However this is not strictly related to the newline, but also to some small idiosyncrasies and different behavior among py2 and py3 (and even in py2 using Header() or Charset()): # py2.7, non-unicode str H('test', 'utf-8

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-26 Thread Flavio Grossi
Flavio Grossi added the comment: any news? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22666 ___ ___ Python-bugs-list mailing list

[issue22666] email.Header no encoding of unicode strings containing newlines

2014-10-18 Thread Flavio Grossi
New submission from Flavio Grossi: When trying to encode an email header with a newline in it, correct encoding is done only for strings and not for unicode strings. In fact, for unicode strings, encoding is only done if a non ascii character is contained in it. The attached patch should fix