[issue43902] ssl module: add getter for SSL_CTX* and SSL*

2022-03-20 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: This general idea sounds nice to have, I hope it can be included. `ctx._call_with_ctypes("SSL_CTX_set_ciphersuites"...` also sounds totally workable to me, if that has the best security profile. Defense in depth is important, but it is no

[issue37952] Add support for export_keying_material to SSL library

2022-03-20 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: I understand the frustrations here, but this is really not a place to vent, since that only harms everyone's interests. When a core maintainer voices concerns or questions, they need to be addressed. This goes for any project. I'll see if I can

[issue37952] Add support for export_keying_material to SSL library

2022-03-19 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: We're working on the HTTP Transport Auth draft (https://www.ietf.org/archive/id/draft-schinazi-httpbis-transport-auth-05.html) in the IETF that also needs this method. I would really love to see this land, any advice? If it is just a matter

[issue45567] Support TLS Encrypted ClientHello (ECH)

2021-11-02 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: I agree with all you say, but I think it is important to not rule out handling HTTPS/SVCB DNS here. It can happen at a later stage though. What you propose works great for the first step. If handling the DNS is punted to some external library

[issue45567] Support TLS Encrypted ClientHello (ECH)

2021-10-22 Thread Hans-Christoph Steiner
New submission from Hans-Christoph Steiner : The next version of the IETF-standardized TLS protocol is known as Encrypted ClientHello (ECH) [1] formerly known as Encrypted SNI (ESNI). This ticket collects information for ECH support, and tracks which APIs have to be added to Python in order

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-24 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: > - For full reproducible builds you may have to write files to zipfiles in a > well-defined order. That already works fine now, we've been doing that with Python for years. But that leaves it up to the implemented to do. I suppose zipfile

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-18 Thread Hans-Christoph Steiner
Hans-Christoph Steiner added the comment: I just found another specific example in _open_to_write(). 0 is a valid value for zinfo.external_attr. But this code always forces 0 to something else: if not zinfo.external_attr: zinfo.external_attr = 0o600 << 16 # permi

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-18 Thread Hans-Christoph Steiner
New submission from Hans-Christoph Steiner : It is now standard for Java JARs and Android APKs (both ZIP files) to zero out lots of the fields in the ZIP header. For example: * each file entry has the date set to zero * the create_system is always set to zero on all platforms zipfile

[issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo

2021-02-22 Thread Hans Deragon
Change by Hans Deragon : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue27875> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33327] Add a method to move messages to IMAPlib

2020-07-03 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: If I'm not mistaken, this is applied to the openSUSE TW version of Python. For some reason, this seems to not play well with .uid('move',...) on a cyrus imap server (v2.4.19). Is that to be expected? ``` 2020-07-03 18:04:05 INFO: [imap_reorg] move b

[issue37999] No longer use implicit convertion to int with loss

2020-07-01 Thread Hans Petter Jansson
Change by Hans Petter Jansson : -- nosy: +hpj nosy_count: 2.0 -> 3.0 pull_requests: +20417 pull_request: https://github.com/python/cpython/pull/17536 ___ Python tracker <https://bugs.python.org/issu

[issue39306] Lib/configparser.py - RawConfigParser.set does not pass non-truthy values through to Interpolation.before_set

2020-01-11 Thread Hans Strijker
New submission from Hans Strijker : Method ```configparser.RawConfigParser.set()``` has optional parameter *value* with default value ```None``` resulting in the behavior that actually trying to set a config parameter to ```None``` will not be propagated to ```Interpolation.before_set

[issue37720] Crash of python3.7 with virt-manager

2019-07-30 Thread Hans Peter
Hans Peter added the comment: How to fix that? See above post. -- ___ Python tracker <https://bugs.python.org/issue37720> ___ ___ Python-bugs-list mailin

[issue37720] Crash of python3.7 with virt-manager

2019-07-30 Thread Hans Peter
Hans Peter added the comment: PYTHONDEVMODE=1 virt-manager --no-fork Fatal Python error: Segmentation fault Current thread 0x7f835bafd740 (most recent call first): File "", line 219 in _call_with_frames_removed File "", line 1043 in create_module

[issue37720] Crash of python3.7 with virt-manager

2019-07-30 Thread Hans Peter
New submission from Hans Peter : Hi! A few days ago, I upgraded to UbuntuMate 19.04. I can't run 'virt-manager' because of this: # virt-manager Output: Segmentation fault kernel: [ 2003.888116] virt-manager[16014]: segfault at 32d0 ip 32d0 sp 7ffeb09ac658 error 14

[issue36828] Cannot install et-xmlfile

2019-05-07 Thread Hans Ginzel
Hans Ginzel added the comment: Thank you for suggestion. I agree. Where can I find the repo for et-xmlfile or the appropriate tracker respectively, please? I have found https://github.com/dimensions11/et_xmlfile. Is it the _master_ repo

[issue36828] Cannot install et-xmlfile

2019-05-07 Thread Hans Ginzel
Change by Hans Ginzel : -- title: Cannot install et_xmlfile -> Cannot install et-xmlfile ___ Python tracker <https://bugs.python.org/issue36828> ___ ___ Py

[issue36828] Cannot install et_xmlfile

2019-05-07 Thread Hans Ginzel
New submission from Hans Ginzel : See attached log file, please. How to reproduce: rem Download https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip mkdir C:\Tools\Python unzip python-3.7.3-embed-amd64.zip -d C:\Tools\Python\3.7.3 path C:\Tools\Python\3.7.3;C:\Tools\Python

[issue35329] Documentation - capitalization issue

2018-11-27 Thread Hans Strijker
New submission from Hans Strijker : In the documentation I noticed "from Package import specific_submodule". I recon package should be all lowercase in accordance with pep8. (https://www.python.org/dev/peps/pep-0008/#package-and-module-names) It may be far from the most importan

Re: PyCA cryptography 2.3 released

2018-07-18 Thread Hans-Peter Jansen
Hi Paul, you have a version mismatch in subject and text. Cheers, Pete On Mittwoch, 18. Juli 2018 05:19:27 Paul Kehrer wrote: > PyCA cryptography 2.2.2 has been released to PyPI. cryptography includes > both high level recipes and low level interfaces to common cryptographic > algorithms such

python not working

2018-01-29 Thread Abbas Hans
it shows thepythonw.exe system error: The program can't start because api-ms-win-crt-runtime-|1-1-0.dll is missing from your computer. try reinstalling the program to fix this problem. I reinstall it many times try to repair it is not working --

Wichtig für Maximus

2017-05-15 Thread Hans-Georg Joepgen
https://www.heise.de/newsticker/meldung/WannaCry-Microsoft-liefert-Sicherheits-Patches-fuer-veraltete-Windows-Versionen-3713417.html -- https://mail.python.org/mailman/listinfo/python-list

Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Dienstag, 14. März 2017 00:33:34 Hans-Peter Jansen wrote: > > I plan to add authenticated service and username support via associated data > as well (that protects against tampering with these values). Done. > Cheers, > Pete -- https://mail.python.org/mailman/listinfo/python-list

Re: keyrings.cryptfile released on github

2017-03-13 Thread Hans-Peter Jansen
On Freitag, 10. März 2017 13:31:41 Paul Rubin wrote: > Hans-Peter Jansen <h...@urpla.net> writes: > > [1] http://web.cs.ucdavis.edu/~rogaway/ocb/license.htm > > Oh that's interesting, he's expanded the free licenses. Still though, > while OCB is very clever and it wa

Re: keyrings.cryptfile released on github

2017-03-10 Thread Hans-Peter Jansen
On Donnerstag, 9. März 2017 23:09:09 ng0 wrote: > Hans-Peter Jansen transcribed 3.8K bytes: > > Hi, > > > > since the PyCrypto ML is dead, I'm looking for advise/feedback from some > > cryptography aware people. > > > > I've released a keyring companion pa

keyrings.cryptfile released on github

2017-03-09 Thread Hans-Peter Jansen
Hi, since the PyCrypto ML is dead, I'm looking for advise/feedback from some cryptography aware people. I've released a keyring companion package today: https://github.com/frispete/keyrings.cryptfile Its primary purpose is a decent encrypted file backend for python keyrings. As such,

Re: ANN: psutil 5.1.0 with hardware sensors released

2017-02-02 Thread Hans-Peter Jansen
On Mittwoch, 1. Februar 2017 21:54:06 Giampaolo Rodola' wrote: > Hello all, > I'm glad to announce the release of psutil 5.1.1: ^ Guess, you meant to say 5.1.0 here, or probably your time machine broke ;) Cheers, Pete --

Re: Referencing section name by interpolation in ConfigParser

2017-01-27 Thread Hans-Peter Jansen
On Mittwoch, 25. Januar 2017 10:01:56 Peter Otten wrote: > Hans-Peter Jansen wrote: > > I would like to use a interpolated section name, e.g.: > > > > [Section] > > secref: %{section}s/whatever > > > > should result in: > >>>> config['Sectio

Referencing section name by interpolation in ConfigParser

2017-01-24 Thread Hans-Peter Jansen
Hi, I would like to use a interpolated section name, e.g.: [Section] secref: %{section}s/whatever should result in: >>> config['Section']['secref'] 'Section/whatever' Any idea anybody, how to archive this with minimum fuzz? Thanks, Pete --

Re: Using sudo with pip3?

2017-01-08 Thread Hans-Peter Jansen
On Samstag, 7. Januar 2017 19:07:55 Clint Moyer wrote: > I would lightly advise against, assuming both Pip and your package > manager are trying to accomplish nearly the same thing. Stick with > updating through the repo. > > If you find that the version your OS provides is out-of-date compared >

Re: Choosing a Python IDE. what is your Pythonish recommendation? I

2017-01-06 Thread Hans-Peter Jansen
On Montag, 2. Januar 2017 03:38:53 Antonio Caminero Garcia wrote: > Hello, I am having a hard time deciding what IDE or IDE-like code editor > should I use. This can be overwhelming. > > So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, > IntelliJ with Python plugin. Well,

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-04 Thread Hans-Peter Jansen
On Montag, 2. Januar 2017 03:38:53 Antonio Caminero Garcia wrote: > Hello, I am having a hard time deciding what IDE or IDE-like code editor > should I use. This can be overwhelming. > > So far, I have used Vim, Sublime, Atom, Eclipse with PyDev, Pycharm, > IntelliJ with Python plugin. Well,

Re: ctypes, memory mapped files and context manager

2016-12-29 Thread Hans-Peter Jansen
Dear Eryk, thanks for chiming in. On Donnerstag, 29. Dezember 2016 21:27:56 eryk sun wrote: > On Thu, Dec 29, 2016 at 12:18 PM, Hans-Peter Jansen <h...@urpla.net> wrote: > >> >>> import weakref, ctypes > >> >>> T = ctypes.c_ubyte * 3 &g

Re: ctypes, memory mapped files and context manager

2016-12-29 Thread Hans-Peter Jansen
On Donnerstag, 29. Dezember 2016 09:33:59 Peter Otten wrote: > Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 16:53:53 Hans-Peter Jansen wrote: > > The minimal example is > > >>> import weakref, ctypes > >>> T = ctypes.c_ubyte * 3 > >

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 16:53:53 Hans-Peter Jansen wrote: > On Mittwoch, 28. Dezember 2016 15:17:22 Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > > > Hans-Peter Jansen wrote: > > > > Dear Peter, > > > >

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 21:58:38 Peter Otten wrote: > Hans-Peter Jansen wrote: > > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > >> Hans-Peter Jansen wrote: > > It leaves the question on why is Python2 acting as one would expect > > related to

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 15:17:22 Hans-Peter Jansen wrote: > On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > > Hans-Peter Jansen wrote: > > > Dear Peter, > > > > > > thanks for taking valuable time to look into my issue. > > > >

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
On Mittwoch, 28. Dezember 2016 13:48:48 Peter Otten wrote: > Hans-Peter Jansen wrote: > > Dear Peter, > > > > thanks for taking valuable time to look into my issue. > > You're welcome! > > > It might be related to my distinct silliness, but the problem

Re: ctypes, memory mapped files and context manager

2016-12-28 Thread Hans-Peter Jansen
Dear Peter, thanks for taking valuable time to look into my issue. It might be related to my distinct silliness, but the problem persists with your code as well. Further comments inlined. On Dienstag, 27. Dezember 2016 21:39:51 Peter Otten wrote: > Hans-Peter Jansen wrote: > > &g

ctypes, memory mapped files and context manager

2016-12-27 Thread Hans-Peter Jansen
Hi, I'm using $subjects combination successfully in a project for creating/iterating over huge binary files (> 5GB) with impressive performance, while resource usage keeps pretty low, all with plain Python3 code. Nice! Environment: (Python 3.4.5, Linux 4.8.14, openSUSE/x86_64, NFS4 and XFS

[issue9253] argparse: optional subparsers

2016-12-18 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: -- nosy: +frispete ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9253> ___ __

[issue28970] ctypes.from_buffer counterpart to actively remove the mapping

2016-12-14 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In an attempt of using ctypes.from_buffer() to map a structure to a memory mapped file, it is important to destroy the mapping after use, because the mmap won't be resizable or freeable correctly until then. The best approach, I was able to came up

distutils_ui 0.1.1 released

2016-12-05 Thread Hans-Peter Jansen
For those of you, who like PyQt{4,5} as much as I do, as well as for those who don't like it that much, because of the poor integration with setuptools et.al., here's another piece of software to bridge the gap: A distutils build extension for PyQt{4,5} applications that makes handling

distutils_ui 0.1.1 released

2016-12-04 Thread Hans-Peter Jansen
For those of you, who like PyQt{4,5} as much as I do, as well as for those who don't like it that much, because of the poor integration with setuptools et.al., here's another piece of software to bridge the gap: A distutils build extension for PyQt{4,5} applications that makes handling

[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-08-03 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: > (In msg271688, I pondered if I need to backport a behavior change from > issue26804 which will allow lower cased proxies, but then, I decided against > it as it will introduce unnecessary changes to this security fix releases). Hmm, Senthil

[issue27513] email.utils.getaddresses raises exception from erroneous message get_all input

2016-07-14 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: message.get cannot decode the header correctly, and returns a Header instance instead, which makes email.utils.getaddresses stumble upon... A much better behavior for getaddresses in this case would be returning the perfectly valid address, and ignoring

[issue27513] email.utils.getaddresses raises exception from erroneous message get_all input

2016-07-14 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: An unfortunate combination of get_all and getaddresses results in a Traceback: Traceback (most recent call last): File "misc/decode_from_header.py", line 17, in print('From: %s' % email.utils.getaddresses(val)) File "/usr/lib64/

[issue27256] email header indentation destroyed

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43417/email_flatten.py

[issue27257] get_addresses results in traceback with an addrspec with an empty local part.

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43416/email_flatten.py

[issue27258] Exception in BytesGenerator.flatten

2016-06-16 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Sorry guys for not providing this earlier. It turned out, that the sub optimal behaviour is related to a unfortunate policy choice: email.policy.SMTP. -- Added file: http://bugs.python.org/file43415/email_flatten.py

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-06-14 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: In a couple of systems, I have to stick with 3.4. Is there a chance to have this patch in 3.4 as well, if a new release 3.4 is made? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue27257] get_addresses results in traceback with a valid? header

2016-06-08 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Dear Stephen, thanks for your care. I'm glad, that you're able to reproduce it. This header is added from the email provider (the biggest here in Germany), so yes, it deserves an entry in the defects list, but must not traceback, of course

[issue27258] Exception in BytesGenerator.flatten

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: Attached mail, parsed with email.message_from_binary_file results in: Traceback (most recent call last): File "./mail_filter.py", line 616, in ret = main.run() File "./mail_filter.py", line 605, in run self.process(fp) Fi

[issue27257] get_addresses results in traceback with a valid? header

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In the course of replacing an old Python 2.7 email filter tool with a rewritten Python3 version, I stumbled across a ugly case, where such an header: To: unlisted-recipients: ;, ""@pop.kundenserver.de (no To-header on input

[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: Added file: http://bugs.python.org/file43286/mf.9__mi0bf.out ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27256] header indentation destroyed

2016-06-07 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: In the course of replacing an old Python 2.7 email filter tool with a rewritten Python3 version, I stumbled across a ugly case, where such an header: X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTDJQUjAyTUI1MTQ7MjM6bEtRRlNaUHQvVTk5WCttdktlOUVrUGQvVFBH

[issue10808] ssl unwrap fails with Error 0

2016-05-09 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Poor old bug. Just being bitten from it today, while trying to package pyftpdlib on the openSUSE build service, which creates a clean reproducible build environment for all packages, and testing fails. Part of the game: openssl 1.0.1k, Python 2.7.8 https

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-25 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v7: - reorder test code in order to improve edibility -- Added file: http://bugs.python.org/file42586/python-urllib-prefer-lowercase-proxies-v7.diff ___ Python tracker <rep...@bugs.python.org>

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: > In Python 2, it looks like the proxy_bypass_etc() functions are defined > in urllib and imported into urllib2, so it makes sense to include the > tests in test_urllib rather than test_urllib2. The tests are in test_urllib. test_urllib2 is test

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-24 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: * blatant error fixed * one test case added -- Added file: http://bugs.python.org/file42582/python-urllib-prefer-lowercase-proxies-v6.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue26831] ConfigParser parsing failures with default_section and ExtendedInterpolation options

2016-04-22 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: ConfigParser fails in interesting ways, when using default_section and ExtendedInterpolation options. Running the attached script results in: ConfigParser() with expected result: global: [('loglevel', 'WARNING'), ('logfile', '-')] section1: [('key_a

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-22 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: v5: don't require the proxies argument in proxy_bypass_environment() -- Added file: http://bugs.python.org/file42565/python-urllib-prefer-lowercase-proxies-v5.diff ___ Python tracker <rep...@bugs.python.

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here's the finalized version of this patch, including unit tests. -- Added file: http://bugs.python.org/file42552/python-urllib-prefer-lowercase-proxies-v4.diff ___ Python tracker <rep...@bugs.python.org>

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-21 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Here we go: v3 fixes following issues: * prefer lowercase proxy environment settings, if multiple (disagreeing) settings are specified with differing case schemes (e.g. HTTP_PROXY vs. http_proxy) * an empty proxy variable value resets the related setting

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, please find a new patch attached, that incorporates your suggestions. * added a comment to get_proxies doc in urllib.rst * documented and fixed the mixed case scheme * added a note to proxy_bypass_environment, that behaves

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-20 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Hi Martin, hi Senthil, thanks for the valuable comments. Will incorporate your suggestions later today. Yes, Martin, it's a bug, and should be fixed for 2.7 and 3.5 as well, but I was unsure, if I get some feedback at all... Hence, this is a very nice

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
Changes by Hans-Peter Jansen <h...@urpla.net>: -- versions: +Python 3.6 -Python 3.5 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26804] Prioritize lowercase proxy variables in urllib.request

2016-04-19 Thread Hans-Peter Jansen
New submission from Hans-Peter Jansen: During programming a function, that replaces a wget call, I noticed, that something is wrong with urllibs proxy handling. I usually use the scheme "http_proxy= wget -N -nd URL" when I need to bypass the proxy. Hence I was prett

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
Hans Lawrenz added the comment: New patch attached. Includes comments and a note in the documentation. The documentation note is inside a versionchanged:: 3.5 block. Should this be more specific about the version it changed in? It could be confusing for someone using a version of 3.5

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
Hans Lawrenz added the comment: Thanks, that makes sense. I've attached a patch with a version check. -- Added file: http://bugs.python.org/file42507/run_in_executor_max_workers_vcheck.patch ___ Python tracker <rep...@bugs.python.org>

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
New submission from Hans Lawrenz: In issue 21527 <http://bugs.python.org/issue21527> the concurrent.futures.ThreadPoolExecutor was changed to have a default value for max_workers. When asyncio.base_events.BaseEventLoop.run_in_executor creates a default ThreadPoolExecutor it specifies a

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2016-02-04 Thread Hans Lellelid
Hans Lellelid added the comment: FWIW, I am experiencing the issue described here with Python 3.5.1. -- nosy: +Hans Lellelid ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Emanuel, sorry, I missed the request for sys.version earlier. The tempfile.py I attached earlier is from the python 3.5 pulled from a ppa. I wouldn't be surprised if it has some patches applied by debian/ubuntu. To be clear though the problem also presents

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Serhiy and Emanuel, I'll paste below the surrounding code and attach the exact tempfile.py. It is the version distributed with the 3.5.0 release. If you take a look at the github repo I linked in the first comment you can also try it out for yourself if you've

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: The file system causing the problem is of type vboxsf which is the Virtualbox shared folder file system type. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Unfortunately changing the tempfile call isn't an easy option for me. The situation in which I'm encountering the error is running tox on our project which is mounted in the /vagrant directory in the VM (this is standard for vagrant). Tox makes its own temp

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-23 Thread Hans Lawrenz
New submission from Hans Lawrenz: Inside a virtualbox vm, calling tempfile.TemporaryFile(dir=foo) where foo is a directory which resides on a volume mounted from the host OS, a FileNotFoundError exception is thrown. In the following code sample, the second block will print "Path 2:

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-23 Thread Hans Lawrenz
Hans Lawrenz added the comment: Host OS: Mac OS 10.11.1 Guest OS: Ubuntu Trusty 64 Virtualbox: 4.3.30 Vagrant: 1.7.4 Example with trace thrown: vagrant@vagrant-ubuntu-trusty-64:/vagrant$ cat tt.py import tempfile with tempfile.TemporaryFile(dir="/vagrant") as tf: tf.writ

[issue20836] Pickle Nonetype

2014-03-02 Thread Hans Polak
New submission from Hans Polak: This simple code works, but I have two 'import pickle' lines. The none working code has one 'import pickle' outside the class definition. This raises a Nonetype error in the pickle module, in the __del__ method. I'd like to know why and I think it's a bug

Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi, I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code works as expected, if not - what should be the usual case - the code fails with some non-sensible traceback. I tried to boil it down to a

Re: Python 2.7.5: Strange and differing behavior depending on sys.setdefaultencoding being set

2013-12-03 Thread Hans-Peter Jansen
Hi Chris, On Mittwoch, 4. Dezember 2013 10:20:31 Chris Angelico wrote: On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen h...@urpla.net wrote: I'm experiencing strange behavior with attached code, that differs depending on sys.setdefaultencoding being set or not. If it is set, the code

Release 3.2.0 of CodeInvestigator.

2013-08-26 Thread hans moleman
CodeInvestigator 3.2.0 was released on August 21. Bug fixes: - Chrome browser: search by value - less memory usage Changes: - nested iterations remain at selected iteration as much as possible - block colors now follow a set pattern - searches are now grouped in subgroups - user

How can I redirect or launch a html file in wsgi coding?

2013-08-15 Thread Hans
Hi, I have code like this: root@lin-ser-1:~# cat /usr/local/www/wsgi-scripts/myapp.py def application(environ, start_response): import sys ... status = '200 OK' req_method=environ['REQUEST_METHOD'] if req_method == 'POST' : json_received =

how can I check if group member exist ?

2013-06-21 Thread Hans
Hi, I'm doing a regular expression matching, let's say a=re.search(re_str,match_str), if matching, I don't know how many str/item will be extracted from re_str, maybe a.group(1), a.group(2) exist but a.group(3) does not. Can I somehow check it? something like: if exist(a.group(1)): print

Re: using split for a string : error

2013-01-25 Thread Hans Mulder
On 25/01/13 15:04:02, Neil Cerutti wrote: On 2013-01-25, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 24 January 2013 11:35, Chris Angelico ros...@gmail.com wrote: It's usually fine to have int() complain about any non-numerics in the string, but I must confess, I do sometimes yearn

Re: urllib2 FTP Weirdness

2013-01-23 Thread Hans Mulder
On 24/01/13 00:58:04, Chris Angelico wrote: On Thu, Jan 24, 2013 at 7:07 AM, Nick Cash nick.c...@npcinternational.com wrote: Python 2.7.3 on linux This has me fairly stumped. It looks like urllib2.urlopen(ftp://some.ftp.site/path;).read() will either immediately return '' or hang

Re: help

2013-01-11 Thread Hans Mulder
On 10/01/13 19:35:40, kwakukwat...@gmail.com wrote: pls this is a code to show the pay of two people.bt I want each of to be able to get a different money when they enter their user name,and to use it for about six people. database = [ ['Mac'], ['Sam'], ] pay1 = 1000 pay2 =

Re: please i need explanation

2013-01-11 Thread Hans Mulder
On 11/01/13 16:35:10, kwakukwat...@gmail.com wrote: def factorial(n): if n2: return 1 f = 1 while n= 2: f *= n f -= 1 U think this line should have been: n -= 1 return f Hope this helps, -- HansM --

Re: Numpy outlier removal

2013-01-06 Thread Hans Mulder
On 6/01/13 20:44:08, Joseph L. Casale wrote: I have a dataset that consists of a dict with text descriptions and values that are integers. If required, I collect the values into a list and create a numpy array running it through a simple routine: data[abs(data - mean(data)) m * std(data)]

Re: Missing something obvious with python-requests

2013-01-04 Thread Hans Mulder
On 4/01/13 03:56:47, Chris Angelico wrote: On Fri, Jan 4, 2013 at 5:53 AM, Ray Cote rgac...@appropriatesolutions.com wrote: proxies = { 'https': '192.168.24.25:8443', 'http': '192.168.24.25:8443', } a = requests.get('http://google.com/', proxies=proxies) When I look at the proxy

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-31 Thread Hans Mulder
On 31/12/12 12:57:59, Adam Tauno Williams wrote: On Thu, 2012-12-27 at 12:01 -0800, mogul wrote: 'Aloha! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. Now it's python, and currently mainly on my kubuntu

Re: Question about nested loop

2012-12-31 Thread Hans Mulder
On 31/12/12 11:02:56, Isaac Won wrote: Hi all, I am a very novice for Python. Currently, I am trying to read continuous columns repeatedly in the form of array. my code is like below: import numpy as np b = [] c = 4 f = open(text.file, r) while c 10: c = c + 1

Re: Tarfile and usernames

2012-12-30 Thread Hans Mulder
On 30/12/12 19:57:31, Nicholas Cole wrote: Dear List, I'm hoping to use the tarfile module in the standard library to move some files between computers. I can't see documented anywhere what this library does with userids and groupids. I can't guarantee that the computers involved will

Re: Python lists

2012-12-30 Thread Hans Mulder
On 28/12/12 18:46:45, Alex wrote: Manatee wrote: On Friday, December 28, 2012 9:14:57 AM UTC-5, Manatee wrote: I read in this: ['C100, C117', 'X7R 0.033uF 10% 25V 0603', '0603-C_L, 0603-C_N', '10', '2', '', '30', '15463-333', 'MURATA', 'GRM188R71E333KA01D', 'Digi-Key', '490-1521-1-ND',

Re: Beginner: Trying to get REAL NUMBERS from %d command

2012-12-30 Thread Hans Mulder
Hello, Python does not support REAL numbers. It has float number, which are approximations of real numbers. They behave almost, but not quite, like you might expect. It also has Decimal numbers. They also approximate real numbers, but slightly differently. They might behave more like you'd

Re: Python lists

2012-12-30 Thread Hans Mulder
On 30/12/12 23:25:39, Evan Driscoll wrote: On 12/30/2012 4:19 PM, Hans Mulder wrote: If it's okay to modify the original list, you can simply do: l[0] = split(l[0], , ) If modifying the original is not okay, the simple solution would be to copy it first: l2 = l l2[0] = split(l2[0

Re: need a url that its http response header that cotain 401 status code

2012-12-26 Thread Hans Mulder
On 26/12/12 10:08:41, iMath wrote: I am going to do a Basic Authentication , so I need a url that its http response header that cotain 401 status code. Isn't that backwards? I mean, what's the point of implementing Basic Authentication, unless you already know a site that uses it? if you

Re: how to detect the character encoding in a web page ?

2012-12-23 Thread Hans Mulder
On 24/12/12 01:34:47, iMath wrote: how to detect the character encoding in a web page ? That depends on the site: different sites indicate their encoding differently. such as this page: http://python.org/ If you download that page and look at the HTML code, you'll find a line: meta

Re: Forking into the background (Linux)

2012-12-23 Thread Hans Mulder
On 24/12/12 01:50:24, Olive wrote: My goal is to write a script that 1) write something to stdout; then fork into the background, closing the stdout (and stderr, stdin) pipe. I have found this answer (forking - setsid - forking) http://stackoverflow.com/a/3356154 However the standard

Re: redirect standard output problem

2012-12-21 Thread Hans Mulder
On 21/12/12 06:23:18, iMath wrote: redirect standard output problem why the result only print A but leave out 888 ? import sys class RedirectStdoutTo: def __init__(self, out_new): self.out_new = out_new def __enter__(self): sys.stdout = self.out_new def

  1   2   3   4   5   6   7   >