[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Nan Hua
Nan Hua added the comment: Note that this issue has already been mostly addressed by https://github.com/python/cpython/pull/19132. I think we can close this issue now. Thanks Eric, Gregory and Vinay! -- stage: needs patch -> resolved status: open ->

[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-24 Thread Nan Hua
New submission from Nan Hua : As I see, Python's logging module's implementation has a nice property that, when no additional args are passed in, the msg (first argument) will be directly printed. For example, logging.error('abc %s') can be handled peacefully with printing "ERROR:roo

[issue30367] Cannot build CPython3.6 with module “testcapimodule” statically

2017-05-14 Thread Nan Zhang
New submission from Nan Zhang: up vote 0 down vote favorite I am trying to build CPython3.6 from GitHub statically with the Documentation below: https://wiki.python.org/moin/BuildStatically Changed *shared* to *static* And only uncommented the module "testcapimodule" in Modules/

[issue26747] types.InstanceType only for old style class only in 2.7

2016-04-13 Thread Nan Wu
New submission from Nan Wu: >>> import types >>> a = 1 >>> isinstance(a, types.InstanceType) False >>> class A: ... pass ... >>> a = A() >>> isinstance(a, types.InstanceType) True >>> class A(object): ... pass ... >

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-03 Thread Nan Wu
Nan Wu added the comment: Put in a fix. Let me know if it looks ok. -- nosy: +Nan Wu Added file: http://bugs.python.org/file41232/fix_test_walk_stack_failed_as_script_patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue25755] Test test_property failed if run twice

2015-12-03 Thread Nan Wu
Nan Wu added the comment: Thanks for catching this failure. In the patch, property doc is restore after write operation. -- nosy: +Nan Wu Added file: http://bugs.python.org/file41233/fix_test_property_doc_writable_patch ___ Python tracker <

[issue25651] Confusing output for TestCase.subTest(0)

2015-11-21 Thread Nan Wu
Nan Wu added the comment: Made it check against None explicitly. My concern is if [] is passed in, if will show [[]]. But this case should be rare. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file41115/subtest_msg_check_against_None.patch

[issue25609] Add a ContextManager ABC and type

2015-11-12 Thread Nan Wu
Nan Wu added the comment: Hi Brett, I'd like work on this feature. Your description here is clear. Besides that, could you give a use case of this context manager? -- nosy: +Nan Wu ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue25567] shlex.quote doesn't work on bytestrings

2015-11-09 Thread Nan Wu
Nan Wu added the comment: Added a patch for support this in `quote` method. What is a good example or a group of examples to demonstrate the usage in the document? -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40992/shlex_quote_bytes_support.patch

[issue25439] Add type checks to urllib.request.Request

2015-10-31 Thread Nan Wu
Nan Wu added the comment: Martin: Sorry for missing that line. Under https, byte iterable seems has not been supported: >>> r = Request('https://www.python.org', {b'post': 'data'}, >>> {'Content-Length':10}) >>> urlopen(r) ... hanging here... Meanwhile, I assumed

[issue25439] Add type checks to urllib.request.Request

2015-10-27 Thread Nan Wu
Nan Wu added the comment: The do_request_() method which is defined in AbstractHTTPHandler seems not cover the check at least for the first case Ezio brought up. `unknown_open` has been called and gives out a relatively confusing message

[issue25439] Add type checks to urllib.request.Request

2015-10-27 Thread Nan Wu
Nan Wu added the comment: Will fix the other two issues. Thanks. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25439> ___ ___

[issue25439] Add type checks to urllib.request.Request

2015-10-25 Thread Nan Wu
Changes by Nan Wu <nanbytesf...@gmail.com>: Added file: http://bugs.python.org/file40850/urllib_request_param_type_check_3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-21 Thread Nan Wu
Nan Wu added the comment: Updated the patch. The typo was fixed too. Thanks for the catching. -- Added file: http://bugs.python.org/file40831/htmllib_deprecation_warning_2.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue25439] Add type checks to urllib.request.Request

2015-10-20 Thread Nan Wu
Nan Wu added the comment: Uploaded a patch. Also update the test. Seems there are at least two old test cases using empty dict as data param. has dict been supported before? -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40819

[issue25439] Add type checks to urllib.request.Request

2015-10-20 Thread Nan Wu
Nan Wu added the comment: I see. Empty dict is considered as iterable of bytes makes good sense. I just left the old tests there. And explicitly give warnings when data field is of type str or type dict with non-bytes key. -- Added file: http://bugs.python.org/file40830

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-16 Thread Nan Wu
Nan Wu added the comment: Added a small patched for this change. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40796/htmllib_deprecation_warning.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue25322] contextlib.suppress not tested for nested usage

2015-10-07 Thread Nan Wu
Nan Wu added the comment: Added a patch with Martina's idea. Isn't ignored better set as false instead ? Since interpreter did not ignore it. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40713/fix_reentrant_cm_test.patch

[issue25311] Add f-string support to tokenize.py

2015-10-07 Thread Nan Wu
Nan Wu added the comment: Added 'f'/'F' to the StringPrefix regex and also update the quote dictionary. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40712/tokenize.patch ___ Python tracker <rep...@bugs.python.org>

[issue24479] Support LMMS project files in mimetypes.guess_type

2015-07-22 Thread Nan Wu
Nan Wu added the comment: Added a small patch. Pls let me know if anything missed. -- nosy: +bytesflow Added file: http://bugs.python.org/file39989/issue24479_support_mmp_and_mmpz_suffix_in_guess_type ___ Python tracker rep...@bugs.python.org http

[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang
New submission from Jiang-Nan Yang: Command: python3.4 /Library/Frameworks/Python.framework/Versions/3.4/share/doc/python3.4/examples/Tools/freeze/freeze.py okcointrade.py Error: Reporting needed directory %s not found Basically the problem is on lines 235~239: config should be config-3.4m

[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang
Changes by Jiang-Nan Yang yjiang...@gmail.com: -- nosy: -ronaldoussoren, yjiangnan versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21502

Re: subprocess.Popen calling httpd reload never finishes

2010-08-18 Thread Nan
On Aug 17, 8:14 pm, Albert Hopkins mar...@letterboxes.org wrote: On Tue, 2010-08-17 at 12:55 -0700, Nan wrote: Hi folks -- I have a Python script running under Apache/mod_wsgi that needs to reload Apache configs as part of its operation.  The script continues to execute after

Re: subprocess.Popen calling httpd reload never finishes

2010-08-18 Thread Nan
On Aug 18, 12:37 pm, Albert Hopkins mar...@letterboxes.org wrote: On Wed, 2010-08-18 at 06:58 -0700, Nan wrote: Ah, I'd been told that there would be no conflict, and that this was just reloading the configuration, not restarting Apache. I do need the web app to instruct Apache to reload

subprocess.Popen calling httpd reload never finishes

2010-08-17 Thread Nan
Hi folks -- I have a Python script running under Apache/mod_wsgi that needs to reload Apache configs as part of its operation. The script continues to execute after the subprocess.Popen call. The communicate() method returns the correct text (Reloading httpd: [ OK ]), and I get a returncode

virtualenv / virtualenvwrapper resetting $PATH?

2010-06-16 Thread Nan
I just installed virtualenv and virtualenvwrapper on an OS X machine (10.6). My ~/.bash_login adds a few paths to the $PATH environment variable, but upon activating a virtualenv with workon, those paths go missing from $PATH (and are not restored when I deactivate the virtualenv either). Any

newbie question

2008-11-26 Thread Nan
Hello, I just started to use Python. I wrote the following code and expected 'main' would be called. def main(): print hello main But I was wrong. I have to use 'main()' to invoke main. The python interpreter does not give any warnings for the above code. Is there any way/tool to easily

Re: Regexp problem with `('

2007-03-22 Thread Zeng Nan
On Thu, Mar 22, 2007 at 01:26:22AM -0700, Johny wrote: I have the following text titleGoods Item 146 (174459989) - OurWebSite/title from which I need to extract `Goods Item 146 ' Can anyone help with regexp? Thank you for help L. (Goods\s+Item\s+146\s+) -- Zeng Nan

Re: Translate this to python?

2006-01-03 Thread Zeng Nan
= j -- Zeng Nan Simple is Beautiful. MY BLOG: http://zengnan.blogspot.com pgpGFuV3FkTgH.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list