[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue43312> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig
Piotr Dobrogost added the comment: I strongly agree with arguments given by the original poster. Stackoverflow's questions cited show the functionality of disabling logger is something people are looking for. Disabling logger by setting high enough level seems to be a workaround at best (sys.maxsize - really?). More in the spirit of an on/off toggle is a filter blocking all records but this clearly feels like another workaround for something which should have been (and in fact already is, albeit unofficially) a simple boolean flag. Not hiding "disabled" property behind underscore might have been a good thing after all. Making it official and supported by dictConfig() would remove clearly expressed pain point of users of the logging module. -- ___ Python tracker <https://bugs.python.org/issue36318> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue36318> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5654] Add C hook in PyDict_SetItem for debuggers
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue5654> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24132] Direct sub-classing of pathlib.Path
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue24132> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Piotr Dobrogost added the comment: Benjamin Peterson in comment https://bugs.python.org/issue2517#msg64771 wrote: "That is because Python encodes it's error messages as ASCII by default…" Could somebody please point where in the source code of Python 2 this happens? -- ___ Python tracker <https://bugs.python.org/issue2517> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue2517> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue22852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes
Change by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker <https://bugs.python.org/issue34276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux
New submission from Piotr Dobrogost <p...@bugs.python.dobrogost.net>: When building Python 2.7.14 on Fedora 28 I get the following error: [piotr@demon]/tmp/Python-2.7.14% make (…) ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /bin/sh: line 5: 25857 Segmentation fault (core dumped) ./python -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make[2]: *** [Makefile:514: pybuilddir.txt] Error 1 make[2]: Leaving directory '/tmp/Python-2.7.14' make[1]: *** [Makefile:444: build_all_generate_profile] Error 2 make[1]: Leaving directory '/tmp/Python-2.7.14' make: *** [Makefile:429: profile-opt] Error 2 Running problematic command alone I get this: [piotr@demon]/tmp/Python-2.7.14% ./python -E -S -m sysconfig --generate-posix-vars Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] zsh: segmentation fault (core dumped) ./python -E -S -m sysconfig --generate-posix-vars I found somehow related https://bugs.python.org/issue21166 with excellent explanation by Ned Deily (https://bugs.python.org/msg225217) but that issue is supposedly fixed. I have Python 3.6.5 installed at /usr/bin/python3 and Python 2.7.14 installed at /usr/bin/python{2} – both from RPM packages. I have Python 2.7.13 installed at /usr/local/bin/python{2} – built from source. Running `which python` returns "/usr/local/bin/python". Trying to isolate configuration and build by prefixing commands with PATH=/usr/bin:/usr/sbin LIBRARY_PATH= LD_LIBRARY_PATH= (…) does not help. -- components: Build messages: 315846 nosy: ned.deily, piotr.dobrogost priority: normal severity: normal status: open title: generate-posix-vars failed when building Python 2.7.14 on Linux versions: Python 2.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33374> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1553375] Add traceback.print_full_exception()
Change by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1553375> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26388> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29379] Custom handlers not used when passing "context" argument to urllib2.urlopen()
New submission from Piotr Dobrogost: When urllib2.urlopen() is passed "context" argument the new opener is being built (https://hg.python.org/cpython/file/a06454b1afa1/Lib/urllib2.py#l147) and used instead custom opener which might had been already installed with urllib2.install_opener(). This might lead to problems with proxies if custom ProxyHandler was used in custom opener – see http://stackoverflow.com/q/36089694/95735 as an example. -- components: Library (Lib) messages: 286325 nosy: piotr.dobrogost priority: normal severity: normal status: open title: Custom handlers not used when passing "context" argument to urllib2.urlopen() type: behavior versions: Python 2.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29379> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16285] Update urllib quoting to RFC 3986
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16285> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23434] RFC6266 support (Content-Disposition for HTTP)
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9325] Add an option to pdb/trace/profile to run library module as a script
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9325> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21536] extension built with a shared python cannot be loaded with a static python
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21536> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15873] datetime: add ability to parse RFC 3339 dates and times
Changes by Piotr Dobrogost <p...@bugs.python.dobrogost.net>: -- nosy: +piotr.dobrogost ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15873> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18857] urlencode of a None value uses the string 'None'
Piotr Dobrogost added the comment: This problem came out in the bug Cannot make URL query string with a parameter without a value (https://github.com/kennethreitz/requests/issues/2651) raised in urllib3 project (which itself is being used by Requests library mentioned in this bug). -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9427] logging.error('...', exc_info=True) should display upper frames, too
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22269] Resolve distutils option conflicts with priorities
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22269 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23246 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23841] py34 OrderedDict is using weakref for root reference
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21861] io class name are hardcoded in reprs
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21861 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23754] Add a new os.read_into() function to avoid memory copies
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23754 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23752] Cleanup io.FileIO
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22003] BytesIO copy-on-write
Piotr Dobrogost added the comment: This new patch abandons the buffer interface and specializes for Bytes per the comments on this issue. Why does it abandon buffer interface? Because of the following? Thanks for digging here. As much as I'd love to follow this interpretation, it simply doesn't match existing buffer implementations, including within the standard library. Shouldn't existing buffer implementations be fixed then and this feature made to use buffer interface instead of specialize for Bytes? If so is there at least any information on this in the comments so that one wouldn't wonder why there is specialization instead of relaying on buffer interface? -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22003 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23576] HTTPS reads can block when content length not available and timeout set.
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23576 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23536] Add explicit information on config file format not supporting filters
New submission from Piotr Dobrogost: It would be helpful to make it clear in section Configuration file format that it's not possible to configure filters through configuration file as opposed to dictionary passed to dictConfig() method. I found this clearly stated in Pyramid docs at http://docs.pylonsproject.org/docs/pyramid/en/latest/narr/logging.html – For more advanced filtering, the logging module provides a logging.Filter object; however it cannot be used directly from the configuration file. -- assignee: docs@python components: Documentation messages: 236741 nosy: docs@python, piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Add explicit information on config file format not supporting filters type: enhancement versions: Python 2.7, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14965] super() and property inheritance behavior
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22889] set a timeout for DNS lookups
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22889 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22028 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6792] Distutils-based installer does not detect 64bit versions of Python
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6792 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1294959] Problems with /usr/lib64 builds.
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294959 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2943] Distutils should generate a better error message when the SDK is not installed
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data
Piotr Dobrogost added the comment: @Rotkraut The truth is http in stdlib is dead. Your best option is to use 3rd party libs like requests or urllib3. Authors of these libs plan to get rid of httplib entirely; see Moving away from httplib (https://github.com/shazow/urllib3/issues/58) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Convert Python 3 ResourceWarnings into exception
Terry Reedy tjreedy at udel.edu writes: python -W error ... Raise an exception instead of printing a warning message. You can also turn this on with the warnings module. Assuming that this works for ResourceWarning, which is should, please correct the SO record. Thanks for taking time to answer. Please notice that OP already tried warnings.simplefilter(action='error', category=ResourceWarning) with no luck. Also, in the answer, Daniel states the following: The ResourceWarning is indeed being generated during garbage collection, and Python prints a message because it doesn't have a way to raise an exception at that point. If it were true that would have been rather unfortunate as I guess most ResourceWarnings are being generated during garbage collection. In that case to let users get hold on such warnings there would need to be created new mechanism for gathering warnings (not based on exceptions as a mean of transport). -- https://mail.python.org/mailman/listinfo/python-list
Convert Python 3 ResourceWarnings into exception
Hi! Recently A. Jesse Jiryu Davis asked at Stackoverflow (http://stackoverflow.com/q/24717027/95735) if there is a way to force a Python 3 unittest to fail, rather than simply print a warning to stderr, if it causes any ResourceWarning? Daniel Harding, in the accepted answer, states it's not possible. Is it really the case? For sake of context, here I believe is the place, where PyErr_WriteUnraisable is being called in this case – http://hg.python.org/cpython/annotate/c0e311e010fc/Modules/socketmodule.c#l3857 -- https://mail.python.org/mailman/listinfo/python-list
[issue18885] handle EINTR in the stdlib
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18885 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22007] sys.stdout.write on Python 2.7 is not EINTR safe
Piotr Dobrogost added the comment: @hypo Is there any reason you keep this PEP secret :) by not mentioning it on bug 18885? -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22007 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21859] Add Python implementation of FileIO
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21859 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17984] io and _pyio modules require the _io module
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9861] subprocess module changed exposed attributes
Piotr Dobrogost added the comment: The statement in comment http://bugs.python.org/issue9861#msg133051 seems to be wrong as changes between versions 2.5 and 2.6 are not security only fixes. Changing visibility of module's public attributes should at least be documented thus closing this bug without pointing to such a documentation is not ok. People do have problem with this as can be seen in the following questions: Cannot find STARTF_USESHOWWINDOW in python (http://stackoverflow.com/q/5485668/95735) Module subprocess has no attribute 'STARTF_USESHOWWINDOW' (http://stackoverflow.com/q/4703983/95735) Remark to the answer to the Cross-platform subprocess with hidden window question (http://stackoverflow.com/a/3443174/95735) -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9861 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1298835] Add a vendor-packages directory for system-supplied modules
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21026] Document sitecustomize.py problems with pythonw
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21026 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10835] sys.executable default and altinstall
Piotr Dobrogost added the comment: Garbage in, garbage out. In this case – exec -a '' – yes, but in general not so – see Mismatch between sys.executable and sys.version in Python question at SO (http://stackoverflow.com/q/22236727/95735). As to not guessing Victor STINNER in comment http://bugs.python.org/issue7774#msg100849 wrote this: There are different methods to get the real program name, but no one is portable. As flox wrote, we can do a best effort to provide a valid sys.executable. Extract of stackoverflow link: * Mac OS X: _NSGetExecutablePath() (man 3 dyld) * Linux: readlink /proc/self/exe * Solaris: getexecname() * FreeBSD: sysctl CTL_KERN KERN_PROC KERN_PROC_PATHNAME -1 * BSD with procfs: readlink /proc/curproc/file * Windows: GetModuleFileName() with hModule = NULL -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17128] OS X system openssl deprecated - installer should build local libssl
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17128 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Cross-platform way to get default directory for binary files like console scripts?
On Thursday, February 20, 2014 4:34:25 PM UTC+1, Piotr Dobrogost wrote: I'm wondering if there's some API to get this info as what you showed is really roundabout way to achieve the goal... Turns out there is API for this - see thread on distutils-sig mailing list at https://mail.python.org/pipermail/distutils-sig/2014-February/023867.html Regards, Piotr Dobrogost -- https://mail.python.org/mailman/listinfo/python-list
Cross-platform way to get default directory for binary files like console scripts?
Hi! Is there cross-platform way to get default directory for binary files (console scripts for instance) the same way one can use sys.executable to get path to the Python's interpreter in cross-platform way? Context: There's Python script which runs various tools like pip using subprocess and we would like to make sure we run tools that accompany Python's interpreter used to run this script. Please note that the script may be run from within virtualenv which had not been activated - ./venv/bin/python our_script.py Regards, Piotr Dobrogost -- https://mail.python.org/mailman/listinfo/python-list
Re: Cross-platform way to get default directory for binary files like console scripts?
On Thursday, February 20, 2014 4:22:53 PM UTC+1, Oscar Benjamin wrote: I'm not sure if I understand the question. Are you trying to find where a script would go if it had been installed as a result of 'python setup.py install' or 'pip install ...'? Yes. If so there are different places it could go depending not only on the system but also how the packages were installed (e.g. --user). Right. You can find the default location in this roundabout way: (...) In [5]: c.install_scripts Out[5]: '/usr/local/bin' I think this is pretty much what I'm after, thanks. I'm wondering if there's some API to get this info as what you showed is really roundabout way to achieve the goal... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Cross-platform way to get default directory for binary files like console scripts?
On Thursday, February 20, 2014 4:42:54 PM UTC+1, Ned Batchelder wrote: As roundabout and advanced as that code is, it doesn't give the right answer for me. It returns None. Indeed. I tried on Linux and got None both inside and outside virtualenv :( Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
[issue7231] Windows installer does not add \Scripts folder to the path
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7231 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Friday, December 6, 2013 3:07:51 PM UTC+1, Neil Cerutti wrote: On 2013-12-04, Piotr Dobrogost p...@google-groups-2013.dobrogost.net wrote: On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti wrote: not something to do commonly. Your proposed syntax leaves the distinction between valid and invalid identifiers a problem the programmer has to deal with. It doesn't unify access to attributes the way the getattr and setattr do. Taking into account that obj.'x' would be equivalent to obj.x any attribute can be accessed with the new syntax. I don't see how this is not unified access compared to using getattr instead dot... I thought of that argument later the next day. Your proposal does unify access if the old obj.x syntax is removed. As long as obj.x is a very concise way to get attribute named 'x' from object obj it's somehow odd that identifier x is treated not like identifier but like string literal 'x'. If it were treated like an identifier then we would get attribute with name being value of x instead attribute named 'x'. Making it possible to use string literals in the form obj.'x' as proposed this would make getattr basically needless as long as we use only variable not expression to denote attribute's name. This is just casual remark. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 6:45:05 AM UTC+1, Tim Roberts wrote: It is not very concise. It is slightly more concise. x = obj.value1 x = dct['value1'] You have saved 3 keystrokes. Actually only 1 as you should have compared these: x = obj.'value-1' x = dct['value-1'] Unless we compare with what we have now, which gives 9 (without space) or 10 (with space): x = obj.'value-1' x = getattr(obj, 'value-1') That is not a significant enough savings to create new syntax. Well, 9 characters is probably significant enough saving to create new syntax but saving these characters is only a side effect and is not the most important aspect of this proposal which leads us to the next point. Remember the Python philosophy that there ought to be one way to do it. Funny you use this argument against my idea as this idea comes from following this rule whereas getattr goes against it. Using dot is the main syntax to access attributes. Following this, the syntax I'm proposing is much more in line with this primary syntax than getattr is. If there ought to be only one way to access attributes then it should be dot notation. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 2:06:44 AM UTC+1, Tim Chase wrote: I think random832 is saying that the designed purpose of setattr() was to dynamically set attributes by name, so they could later be accessed the traditional way; not designed from the ground-up to support non-identifier names. But because of the getattr/setattr machinery (dict key/value pairs), it doesn't prevent you from having non-identifiers as names as long as you use only the getattr/setattr method of accessing them. Right. If there's already a way to have attributes with these non-standard names (which is a good thing) then for uniformity with dot access to attributes with standard names there should be a variant of dot access allowing to access these non-standard named attributes, too. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 2:23:24 PM UTC+1, Roy Smith wrote: In article 17gt99hg615jfm7bdid26185884d2pf...@4ax.com, Tim Roberts wrote: Piotr Dobrogost wrote: Attribute access syntax being very concise is very often preferred to dict's interface. It is not very concise. It is slightly more concise. x = obj.value1 x = dct['value1'] You have saved 3 keystrokes. That is not a significant enough savings to create new syntax. Remember the Python philosophy that there ought to be one way to do it. I'll trade typing [ ' ' ] for . any day. Easier to type, easier to read. It's not just the character count, it's that you need to move your fingers off the home row (or, at the very least, a big stretch with your pinkie) to reach the brackets. I suppose that depends on your particular keyboard layout and typing style/skill. Very true. Just a remark it's actually trading getattr(o,'x') for o.'x' (saving of 11 keystrokes - don't forget shifts :)) as attribute is quite a different beast then key in a dictionary so comparing this to dict's interface is comparing apples to oranges. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti wrote: not something to do commonly. Your proposed syntax leaves the distinction between valid and invalid identifiers a problem the programmer has to deal with. It doesn't unify access to attributes the way the getattr and setattr do. Taking into account that obj.'x' would be equivalent to obj.x any attribute can be accessed with the new syntax. I don't see how this is not unified access compared to using getattr instead dot... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Tuesday, December 3, 2013 6:48:38 PM UTC+1, Dave Angel wrote: On Tue, 3 Dec 2013 09:14:49 -0800 (PST), Piotr Dobrogost wrote: What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? There is. Just use a dictionary. Object's attributes and dictionary's keys are quite different things. What about descriptors? Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti wrote: On 2013-12-04, Piotr Dobrogost wrote: Right. If there's already a way to have attributes with these non-standard names (which is a good thing) At best its a neutral thing. You can use dict for the same purpose with very little effort and no(?) loss of efficiency. As much as many people in this topic would like to put equal sign between attributes and dictionary's keys they are not the same thing. AFAIK descriptor protocol works only with attributes, right? Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Wednesday, December 4, 2013 11:11:56 PM UTC+1, Terry Reedy wrote: The discussion of enlarging the scope of 'identifier' is not relevant as you are not proposing that. In particular, you are not asking that obj.value-1 get the 'value-1' attribute of obj. Right. The discussion of keystrokes is also a side-track. To great degree, yes. Having said that I find extra 11 keystrokes needed to access some attributes to be a freaking big and unjustifiable number. What you are proposing, I believe, is a new grammatical category: attribute-name := identifier or string-literal. This would break the symmetry of the grammatical form identifier '.' identifier and change it to the asymmetrical identifier '.' attribute-name, and that is the Nice description. To put it another way, how does 'obj' get the non-standard attribute 'value-1', when obj is a module or class? The workaround given above for module attributes will not work for classes. I'm not sure I see your point. Do you mean that being inside class declaration there's no name that referrs to the current namespace (the way __globals__ refer to module's namespace) thus we can't use proposed syntax to access non-standard attributes from this namespace? Remember the Python philosophy that there ought to be one way to do it. Funny you use this argument against my idea as this idea comes from following this rule whereas getattr goes against it. Not really. As others have pointed out, getattr is the preferred way to get the value of an attribute when you have an object with attributes and a run-time-only reference to the name in a string variable. Yes, and I think it's very unfortunate in itself. Attribute access is fundamental operation and it's not accident that operator for this action is very concise in many languages being one char only. Having to switch to global function to access attribute in case its name is known only at run time is very awkward both when writing and reading code. It would also be the case that obj.'value' is obj.value, so the proposal *would* add duplication. This is not a big deal and that's what you get when someone had already decided that in expression a.b, b is treated literally. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Thursday, December 5, 2013 12:09:52 AM UTC+1, Ethan Furman wrote: Perhaps you should look at different ways of spelling your identifiers? Why can't you use an underscore instead of a hyphen? So that underscore could be left for use inside fields' names? However I think we could use some unique Unicode character for this instead hyphen as long as Python allows any alphanumeric Unicode character inside identifiers which I think it does... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list
Why is there no natural syntax for accessing attributes with names not being valid identifiers?
Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something along the line of my_object.'valid-attribute-name-but-not-valid-identifier'? Regards, Piotr Dobrogost -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Tuesday, December 3, 2013 7:03:41 PM UTC+1, rand...@fastmail.us wrote: On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote: Hi! I find global getattr() function awkward when reading code. What is the reason there's no natural syntax allowing to access attributes with names not being valid Python identifiers in a similar way to other attributes? Something along the line of my_object.'valid-attribute-name-but-not-valid-identifier'? The getattr function is meant for when your attribute name is in a variable. Being able to use strings that aren't valid identifiers is a side effect. Why do you say it's a side effect? Could you elaborate? I see nothing odd in passing literal (string literal in this case) as a value of function's argument. Why are you designing classes with attributes that aren't valid identifiers? Attribute access syntax being very concise is very often preferred to dict's interface. That's why various containers expose their elements as attributes. In my case I'm using in-house web form library which provides FieldSet class holding objects of type Field or other FieldSets. This nesting leads to names of the form 'outer_fieldset-inner_fieldset-third_field' which are not valid identifiers due to minus sign. -- https://mail.python.org/mailman/listinfo/python-list
Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?
On Tuesday, December 3, 2013 6:31:58 PM UTC+1, Ethan Furman wrote: When would you have attribute names that are not valid identifiers? See my answer to rand's post. -- https://mail.python.org/mailman/listinfo/python-list
[issue19744] test_venv fails if SSL/TLS is not available
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19744 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19279] UTF-7 to UTF-8 decoding crash
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19279 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12939] Add new io.FileIO using the native Windows API
Piotr Dobrogost added the comment: I guess extracting Richard's patch to a package and placing it on PyPI would be a good move. I recalled reading this bug after I saw Does Python IO allow opened file to be deleted/renamed on Windows? question on Stackoverflow (http://stackoverflow.com/q/19280836/95735) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10049] Add a no-op (null) context manager to contextlib
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10049 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1673203] add identity function
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11011] More functools functions
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11011 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8713] multiprocessing needs option to eschew fork() under Linux
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Why is str(None) == 'None' and not an empty string?
Hi! Having repr(None) == 'None' is sure the right thing but why does str(None) == 'None'? Wouldn't it be more correct if it was an empty string? Regards Piotr Dobrogost -- http://mail.python.org/mailman/listinfo/python-list
[issue4749] Issue with RotatingFileHandler logging handler on Windows
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12939] Add new io.FileIO using the native Windows API
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13238] Add shell command helpers to subprocess module
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1300] subprocess.list2cmdline doesn't do pipe symbols
Piotr Dobrogost added the comment: Maybe the solution is to make what I was trying to do easier without fooling with the shell instead of playing the fool's game of trying to improve the ability to deal with the shell so we can pass things through it unnecessarily. You are too harsh for yourself :) We should be able to make use of shell easily the same way it's possible in other languages like Perl or Ruby. It sure would be nice on Windows to have an equivalent of list2cmdline() that works for the shell. I agree. See issue 13238 for a list of libraries which make is easier to use shell from Python. -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
Piotr Dobrogost added the comment: This is unexpected and makes people wonder what's going on. See http://stackoverflow.com/q/7004687/95735 and http://stackoverflow.com/q/7264571/95735. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18649] list2cmdline function in subprocess module handles \ sequence wrong
Piotr Dobrogost added the comment: I think you're missing the point. The implementation is wrong as it does not do what documentation says which is A double quotation mark preceded by a backslash is interpreted as a literal double quotation mark. How the output of list2cmdline interacts with the cmd.exe is another issue (It just happens here that if implementation of list2cmdline were in line with its documentation then there wouldn't be any subsequent problem with cmd.exe). Also issue 1300 is about escaping a pipe character (|) on the basis of how it's treated by cmd.exe and does not even refer to the docstring of list2cmdline function. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18649] list2cmdline function in subprocess module handles \ sequence wrong
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18649] list2cmdline function in subprocess module handles \ sequence wrong
Piotr Dobrogost added the comment: The docstring starts with this statement Translate a sequence of arguments into a command line string, using the same rules as the MS C runtime: which clearly makes the impression that function list2cmdline uses the same rules as the MS C runtime. However after reading comments in this issue I believe I misunderstood the true meaning as the docstring is highly misleading. According to your comments, the word using was meant to pertain to the command line string (which is the output of the list2cmdline function) and _not_ to the translation phase itself. This makes sense taking into account the flow of events which is; a list of arguments - list2cmdline - CreateProcess. -- components: +Library (Lib) -Benchmarks resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18649] list2cmdline function in subprocess module handles \ sequence wrong
Piotr Dobrogost added the comment: Sure, something like The purpose of this function is to construct a string which will be later interpreted by MS C runtime as denoting a sequence of arguments. Because of this the string is built in such a way as to preserve the original characters when interpreted by MS C runtime. For example a double quotation mark is preceded by the backslash so that MS C runtime would translate this back to the original double quotation mark according to its rules which are given below as a reference: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18649] list2cmdline function in subprocess module handles \ sequence wrong
New submission from Piotr Dobrogost: According to the docstring of list2cmdline function in subprocess module the sequence of a backslash followed by a double quote mark should denote double quote mark in the output string. However it's not the case Python 2.7.4 (default, Apr 6 2013, 19:55:15) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import subprocess print subprocess.list2cmdline(r'\1|2\') \ \ 1 | 2 \ \ The same behavior is in Python 3.3.1. See On Windows, how can I protect arguments to shell scripts using Python 2.7 subprocess?(http://stackoverflow.com/q/4970194/95735) question on Stack Overflow. -- components: Library (Lib) messages: 194307 nosy: Arve.Knudsen, exarkun, piotr.dobrogost, r.david.murray priority: normal severity: normal status: open title: list2cmdline function in subprocess module handles \ sequence wrong versions: Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18476] No way to pass custom arguments for loggers and formatters.
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18476] No way to pass custom arguments for loggers and formatters.
New submission from Piotr Dobrogost: It seems there's no way to pass custom arguments for loggers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/__init__.py#l) and formatters (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l117) the same way they are being passed to handlers (http://hg.python.org/cpython/file/d9893d13c628/Lib/logging/config.py#l139). The problem came out when we tried to create base formatter which would read prefix from configuration of formatter to be prepended to all subsequent lines of every multi line message. -- components: Library (Lib) messages: 193172 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: No way to pass custom arguments for loggers and formatters. type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17010] Windows launcher ignores active virtual environment
Piotr Dobrogost added the comment: @Vinay Is there any discussion which lead to this change? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17871] Wrong signature of TextTestRunner's init function
New submission from Piotr Dobrogost: TextTestRunner's init as of 3.3.1 has (http://hg.python.org/cpython/file/d9893d13c628/Lib/unittest/runner.py#l128) the following parameters: stream, descriptions, verbosity, failfast, buffer, resultclass, warnings whereas docs (http://docs.python.org/3.3/library/unittest.html?highlight=unittest#loading-and-running-tests) show only the following parameters: stream, descriptions, verbosity, runnerclass, warnings 'Failfast' and 'buffer' parameters are missing in the docs and there's 'runnerclass' parameter instead of 'resultclass' parameter. -- assignee: docs@python components: Documentation messages: 188104 nosy: docs@python, ezio.melotti, michael.foord, piotr.dobrogost priority: normal severity: normal status: open title: Wrong signature of TextTestRunner's init function versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15281] pyvenv --symlinks option is a no-op?
Piotr Dobrogost added the comment: It's simpler but is it better this way? I doubt. I think we should take advantage of symlinks whenever we can and only fallback to copying if they are not available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17743] Use extended syntax of `set` command in activate.bat/deactivate.bat batch files.
New submission from Piotr Dobrogost: This makes it possible to handle paths/usernames with special characters - see https://github.com/pypa/virtualenv/pull/352 -- components: Library (Lib) messages: 187037 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Use extended syntax of `set` command in activate.bat/deactivate.bat batch files. type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17743 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17744] Unset VIRTUAL_ENV environment variable in deactivate.bat
New submission from Piotr Dobrogost: activate.bat sets VIRTUAL_ENV environment variable. This variable is treated as a sign that virtualenv is active. For this reason deactivate.bat should unset this variable. See https://github.com/pypa/virtualenv/pull/364 -- components: Library (Lib) messages: 187038 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Unset VIRTUAL_ENV environment variable in deactivate.bat type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17744 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17480] pyvenv should be installed someplace more obvious on Windows
Piotr Dobrogost added the comment: I've just stumbled upon this issue after asking Where is pyvenv script in Python 3 on Windows installed? question at http://stackoverflow.com/q/1598/95735 Perhaps Windows installs should include (alongside Python.exe) a pyvenv.exe that invokes venv for the Python environment in which it's executed. I think it's the right thing to do. -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17480 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17010] Windows launcher ignores active virtual environment
Piotr Dobrogost added the comment: Issue titled Python Launcher and virtualenv? at https://bitbucket.org/vinay.sajip/pylauncher/issue/15/ is related. -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15281] pyvenv --symlinks option is a no-op?
Piotr Dobrogost added the comment: Following discussions on python-dev, the default is always to symlink, except on Windows (no support for true symlinks on XP and older) and In this case couldn't symlinks be automatically used on Windows Vista or newer? -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: SimpleHTTPRequestHandler used with HTTP/1.1 hangs after the second resource on a page.
On Saturday, April 13, 2013 12:21:33 AM UTC+2, Terry Jan Reedy wrote: I find the doc slightly confusing. The SO code uses BaseHTTPServer. The doc says Usually, this module isn’t used directly, On the other hand, SimpleHTTPServer only defines a request handler and not a server itself. Thanks for taking time to reply. Well, I've seen presentations where BaseHTTPServer is a recommended way of running simple, ad-hoc web server. In addition the documentation of http.server module in Python 3.3 (which contains implementation of the same HTTPServer class as found in BaseHTTPServer module in Python 2.x) does not contain the statement you cited which I take to mean it can safely be used directly. As Python 3.3.1 exhibits the same behavior let's focus on the following Python 3 version of the code from the original question: from http.server import SimpleHTTPRequestHandler from http.server import HTTPServer class MyRequestHandler(SimpleHTTPRequestHandler): #protocol_version = HTTP/1.0 # works protocol_version = HTTP/1.1 # hangs server = HTTPServer((localhost, 7080), MyRequestHandler) server.serve_forever() What does 'hang' mean? Does the page get displayed? If so, server.serve_forever is supposes to 'hang'. I increased the number of resources to 7 to be able to detect possible patterns. The page and some of the resources are being displayed almost instantly. However browser waits for the requests to get remaining resources to finish and so those resources naturally are not being displayed. When browser waits the code is stuck at the line I showed in my original post. What's interesting is that after some time the request to get the second resource (in case there are only 2 on the page) finishes. However the time spent waiting for the second resource is ridiculously long compared to time spend waiting for the first resource. For example in one of my tests Firebug showed waiting time for the first resource to be 4ms whereas the waiting time for the second resource to be 1m 55s. The SO post says class MyRequestHandler(SimpleHTTPRequestHandler): #protocol_version = HTTP/1.0 # works protocol_version = HTTP/1.1 # hangs so this should be some sort of clue. The code says 569 # The version of the HTTP protocol we support. 570 # Set this to HTTP/1.1 to enable automatic keepalive 571 protocol_version = HTTP/1.0 Sure, in version 1.1 of http the connection is not closed by default unless 'Connection: Close' header was sent in request. Firefox sends all requests with 'Connection: keep-alive' header. I don't really know how to debug this... -- http://mail.python.org/mailman/listinfo/python-list
Re: Python pdb bug, followed by bug in bugs.python.org
On Thursday, April 11, 2013 5:12:53 PM UTC+2, donald...@gmail.com wrote: I just submitted a bug report on the pdb issue. It would be nice of you to share the link to this issue. -- http://mail.python.org/mailman/listinfo/python-list
SimpleHTTPRequestHandler used with HTTP/1.1 hangs after the second resource on a page.
Hi! I'd like to bring your attention to the question titled Use HTTP/1.1 with SimpleHTTPRequestHandler at http://stackoverflow.com/q/15839718/95735 which reads; When I use HTTP/1.1 with SimpleHTTPRequestHandler, loading a page that pulls in other resources will hang after the second resource. and there's a tiny test showing the problem. It's hard to believe that SimpleHTTPServer doesn't handle such a simple task, does it? If I checked correctly code is stuck in handle_one_request() method at line 370 of server.py (http://hg.python.org/cpython/file/d9893d13c628/Lib/http/server.py#l370) but I can't see what's wrong. Any ideas? Best regards, Piotr Dobrogost -- http://mail.python.org/mailman/listinfo/python-list
[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows
Piotr Dobrogost added the comment: I don't understand whether you are proposing to include the patch into Python as-is; I think Richard is well aware of the constraints you specify and current patch was meant as a proof of concept; to show that all tests pass with such a change. Of course that's only my belief and we shall see what Richard has to say. That said, having maximum sharing when opnening files sounds fine to me. Good to hear. However I started to wonder if we are ready for all consequences of this. For example taking into account what Richard noted in http://bugs.python.org/issue14243, specifically: Unfortunately using O_TEMPORARY is the only way allowed by msvcrt to get FILE_SHARE_DELETE, even though it also has the orthogonal effect of unlinking the file when all handles are closed. forces programs which would like to open a file being opened at the same time by Python code (by means of built-in open() or os.open() with default arguments) to either use O_TEMPORARY when using msvcrt or to go low level and use CreateFile() Win32 API function with FILE_SHARE_DELETE flag. Are we ok with it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows
Piotr Dobrogost added the comment: Having the same semantics on both Unix and Windows with regard to validity of file handle after a file was deleted would be a very nice to have. How could we progress this? I'm adding Martin and Antoine to cc list. -- nosy: +loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows
Piotr Dobrogost added the comment: @sbt Thanks for info. Also you mentioned looking at c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/crt/src/open.c What version of Visual Studio/SDK this file is available in? Also I'd like to point out that this problem came up at Stack Overflow in question How to create a temporary file that can be read by a subprocess? (http://stackoverflow.com/q/15169101/95735) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +dabrahams, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com