Changing path to python in pip.exe, ipython.exe, etc

2024-04-25 Thread Olivier B. via Python-list
I am building a python work environment where - i build python from sources - install pip with the wheel bundled with python - then install things with pip, like Jupyter That environment is then deployed on various machines, at various installation folders. One issue I encounter, is the path

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
Partly answering myself: For some reason, right after mystdout has been created, i now have to do mystdout.seek(0) and this solves the issue. No idea why though.. Le jeu. 11 avr. 2024 à 14:42, Olivier B. a écrit : > > I am trying to use StringIO to capture stdout, in code that look

First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
I am trying to use StringIO to capture stdout, in code that looks like this: import sys from io import StringIO old_stdout = sys.stdout sys.stdout = mystdout = StringIO() print( "patate") mystdout.seek(0) sys.stdout = old_stdout print(mystdout.read()) Well, it is not exactly like this, since

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Olivier B. via Python-list
libpython.so, which could be pointing to any version. I'll try that next Le ven. 29 mars 2024 à 10:10, Barry a écrit : > > > > > On 28 Mar 2024, at 16:13, Olivier B. via Python-list > > wrote: > > > > But on Linux, it seems that linking to libpython3.so instead of >

Making 'compiled' modules work with multiple python versions on Linux

2024-03-28 Thread Olivier B. via Python-list
I have a python module that includes some C++ code that links with the Python C API I have now modified the c++ code so that it only uses the Limited API, and linked with python3.lib instead of python311.lib. I can now use that python module with different python versions on Windows But on

[Python-announce] [Release] Pyo 1.0.5 (Python DSP library)

2023-03-26 Thread Olivier Bélanger
behavior consistency of PyoTableObject.setSize method. - Fixed bug when making the size of a table bigger at runtime. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ http://ajaxsoundstudio.com/software/pyo/;>Pyo 1.0.5 - short Python DSP library. (26-Mar

[Python-announce] Re: [Release] Pyo 1.0.5 (Python DSP library)

2023-03-26 Thread Olivier Bélanger
Sorry, wrong links for the web site and documentation! Official website: https://github.com/belangeo/pyo pyo's documentation: https://belangeo.github.io/pyo/ Latest sources and bug tracker: https://github.com/belangeo/pyo Olivier On Sun, Mar 26, 2023 at 12:25 PM Olivier Bélanger wrote

Module use of python3_d.dll conflicts with this version of Python

2023-01-26 Thread Olivier B.
Hi,I am in the process of trying to make my code (an c++ executable and swig modules using the Python C API) lose the dependency to python 3.7, to be compatible with all Python 3.2+ I tried linking to python.lib instead of python37.lib. As i am still using a few things that are not in the limited

téléchargement python

2021-09-23 Thread olivier Perchet
Envoye `a partir de [1]Courrier pour Windows [2][IMG] Garanti sans virus. [3]www.avast.com References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 2. https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
Olivier Delhomme added the comment: >> Hi Marc-Andre, >> >> Please note that setting PYTHONUTF8 with "export PYTHONUTF8=1": >> >> * Is external to the program and user dependent >> * It does not seems to work on my use case: >> >>

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
Olivier Delhomme added the comment: Hi Marc-Andre, Please note that setting PYTHONUTF8 with "export PYTHONUTF8=1": * Is external to the program and user dependent * It does not seems to work on my use case: $ unset LANG $ export PYTHONUTF8=1 $ python3 Python 3.6.4 (defau

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
New submission from Olivier Delhomme : $ python3 --version Python 3.6.4 Setting LANG to en_US.UTF8 works like a charm $ export LANG=en_US.UTF8 $ python3 Python 3.6.4 (default, Jan 11 2018, 16:45:55) [GCC 4.8.5] on linux Type "help", "copyright", "credits" or

[Release] Pyo 1.0.4 (Python dsp library)

2021-06-09 Thread Olivier Bélanger
segfault in embedded pyo_end_interpreter function. - Fixed Select counter type range (now accepts a long long value). - Removed useless string copy in the Jack backend (fixed issue #221). - Fixed linux libasound and libjack symlinks (issue #179 and #200). Olivier Belanger belan...@gmail.com http

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2021-02-09 Thread Olivier Le Floch
Change by Olivier Le Floch : -- nosy: +olivierlefloch ___ Python tracker <https://bugs.python.org/issue43112> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37351] Drop libpython38.a from Windows release

2020-11-04 Thread Olivier Croquette
Olivier Croquette added the comment: I don't know what version of gendef is meant, but the one from MSYS2 / MinGW64 doesn't output the result on stdout, but rather writes the file "python38.def" itself. So the commands are the following: cd libs gendef ..\python38.dll dlltool

[Release] Pyo 1.0.3 (Python dsp library)

2020-08-29 Thread Olivier Bélanger
properly. Bug Fixes: - Fixed missing lib dependency links on MacOS. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ http://ajaxsoundstudio.com/software/pyo/;>Pyo 1.0.3 - short Python DSP library. (28-Aug-20) ___ Pyt

[Release] Pyo 1.0.2 (Python dsp library)

2020-08-17 Thread Olivier Bélanger
. - m_pyo.h, header-only python interpreter for pyo, now works with python 3. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ http://ajaxsoundstudio.com/software/pyo/;>Pyo 1.0.2 - short Python DSP library. (17-Aug

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: Somehow the message identifiers in the code sample got messed up in previous comment, here's the actual code, for what it's worth ;-) https://gist.github.com/odony/0323eab303dad2077c1277076ecc3733 -- ___ Python

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: Further, under Python 3.8 the issue is not fully solved, as other identification headers are still being folded in a non-RFC-conformant manner (see OP for RFC references). This was indicated on the original PR by the author: https://github.com/python/cpython

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: With regard to msg349895, is there any chance this fix could be considered for backport? I imagine you could view it as a new feature, but it seems to be the only official fix we have for the fact that Python 3 generates invalid SMTP messages. And that's

[Release] Pyo 1.0.1 (Python dsp library)

2019-11-28 Thread Olivier Bélanger
can handle multiple input sources. - Expr now can generate multiple output signals. - constants (pi, twopi, e, sr) can be used without braces. New example categories: - How to use OSC with pyo - Utilities - Events framework - Evaluating prefix expression Olivier Belanger belan...@gmail.com http

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Olivier Grisel
Olivier Grisel added the comment: As Victor said, the `time.sleep(1.0)` might lead to Heisen failures. I am not sure how to write proper strong synchronization in this case but we could instead go for something intermediate such as the following pattern: ... p.terminate

[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-02-13 Thread Olivier Grisel
Olivier Grisel added the comment: Adding such a hook would make it possible to reimplement cloudpickle.CloudPickler by deriving from the fast _pickle.Pickler class (instead of the slow pickle._Pickler as done currently). This would mean rewriting most of the CloudPickler method to only rely

Re: Encounter issues to install Python

2019-01-06 Thread Olivier Oussou via Python-list
samedi 13 octobre 2018 à 19:24:28 UTC+2, Anthony Flury a écrit : Olivier, Welcome to the list - before we can help you, we need some more information : - What Operating system are you using - Windows/Mac/Linux/Raspberry Pi/Android for something else ? - What command

Encounter issues to install Python

2018-10-08 Thread Olivier Oussou via Python-list
Hi!I downloaded and installed python 3.6.4 (32-bit) on my computer but I have problems and can not access the python interface. I need your technical assistance to solve this matter.  Best regard! Olivier OUSSOUMedical entomologist, Benin -- https://mail.python.org/mailman/listinfo/python-list

[Release] Pyo 0.9.1 (Python dsp library)

2018-09-05 Thread Olivier Bélanger
splitter using Linkwitz-Riley crossover filters. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ P>http://ajaxsoundstudio.com/software/pyo/;>Pyo 0.9.1 Python DSP library. (04-Sep-18) -- https://mail.python.org/mailman/listinfo/python-announce-list S

[issue6721] Locks in the standard library should be sanitized on fork

2018-04-05 Thread Olivier Chédru
Olivier Chédru <oche...@gmail.com> added the comment: FWIW, I encountered the same kind of issue when using the mkstemp() function: under the hood, it calls gettempdir() and this one is protected by a lock too. Current thread 0x7ff10231f700 (most recent call first): File &qu

[Release] Pyo 0.9.0 (Python dsp library)

2018-02-21 Thread Olivier Bélanger
, a midi-triggered breakpoints envelope. - Added a Server.makenote(pitch, velocity, duration, channel=0) method, which build both noteon and noteof messages. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ P>http://ajaxsoundstudio.com/software/pyo/;>Pyo 0.9.0

[Release] Pyo 0.8.9 (Python dsp library)

2018-02-05 Thread Olivier Bélanger
or height of 0. Enhancements: - Changed the stereo panning law for cosine/sine within Pan object. - Speed-up computation for various objects. - Allow the "mode" argument of Resample object to be changed dynamically. - Added new object: HRTF, Head-Related Transfert Function 3D spatialization.

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-06 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Thanks for the very helpful feedback and guidance during the review. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2018-01-06 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Shall we close this issue now that the PR has been merged to master? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-12 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Flushing the buffer at each frame commit will cause a medium-sized write every 64kB on average (instead of one big write at the end). So that might actually cause a performance regression for some users if the individual file-

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-12 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: > While we are here, wouldn't be worth to flush the buffer in the C > implementation to the disk always after committing a frame? This will save a > memory when dump a lot of small objects. I think it's a good idea

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-12 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Thanks Antoine, I updated my code to what you suggested. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-11 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Alright, I found the source of my refcounting bug. I updated the PR to include the C version of the dump for PyBytes. I ran Serhiy's microbenchmarks on the C version and I could not detect any overhead on small bytes objects w

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: I have tried to implement the direct write bypass for the C version of the pickler but I get a segfault in a Py_INCREF on obj during the call to memo_put(self, obj) after the call to _Pickler_write_large_bytes. Here is th

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: BTW, I am looking at the C implementation at the moment. I think I can do it. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Alright, the last version has now ~4% overhead for small bytes. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Actually, I think this can still be improved while keeping it readable. Let me try again :) -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: I have pushed a new version of the code that now has a 10% overhead for small bytes (instead of 40% previously). It could be possible to optimize further but I think that would render the code much less readable so I

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-10 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: In my last comment, I also reported the user times (not spend in OS level disk access stuff): the code of the PR is on the order of 300-400ms while master is around 800ms o

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: More benchmarks with the unix time command: ``` (py37) ogrisel@ici:~/code/cpython$ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. (py37) ogrisel@ici:~/code/cpython$ time python

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: Note that the time difference is not significant. I rerun the last command I got: ``` (py37) ogrisel@ici:~/code/cpython$ python ~/tmp/large_pickle_dump.py --use-pypickle Allocating source data... => peak memory usage:

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel <olivier.gri...@ensta.org> added the comment: I wrote a script to monitor the memory when dumping 2GB of data with python master (C pickler and Python pickler): ``` (py37) ogrisel@ici:~/code/cpython$ python ~/tmp/large_pickle_dump.py Allocating source data... => pe

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
New submission from Olivier Grisel <olivier.gri...@ensta.org>: I noticed that both pickle.Pickler (C version) and pickle._Pickler (Python version) make unnecessary memory copies when dumping large str, bytes and bytearray objects. This is caused by unnecessary concatenation of the

[Release] Pyo 0.8.8 (Python dsp library)

2017-11-09 Thread Olivier Bélanger
to allow the user to set the title name of their windows. Also added a method to show/hide the channel labels in the GUI. - Added a callback attribute to PVAnal. The function receives magnitudes and true frequencies for every analysis frame. Olivier Belanger belan...@gmail.com http

[Release] Pyo 0.8.7 (Python dsp library)

2017-08-30 Thread Olivier Bélanger
. Returns the interpolated value for a floating-point position in the matrix. - OscDataSend now can send more than one message per buffer size. - Update MacOS and Windows build routine to compile for python 2.7, 3.5 and 3.6. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com

[Release] Pyo 0.8.6 (Python dsp library)

2017-04-24 Thread Olivier Bélanger
x) method to SfMarkerShuffler object. - Added a "Copy" menu item in PyoObject.ctrl() and DataTable.graph() windows. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ P>http://ajaxsoundstudio.com/software/pyo/;>Pyo 0.8.6 Python DSP library. (21-Apr-17) -

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-04-17 Thread Olivier Vielpeau
Olivier Vielpeau added the comment: Thnaks for the reviews and the merge! :) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[Release] Pyo 0.8.5 (Python dsp library)

2017-04-05 Thread Olivier Bélanger
existing functions are used (jack_port_set_name/jack_port_rename). - Added two examples in 07-effects, 01-flanger.py and 02-schroeder-reverb.py. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ P>http://ajaxsoundstudio.com/software/pyo/;>Pyo 0.8.5 Python DSP librar

[Release] Pyo 0.8.4 (Python dsp library)

2017-03-27 Thread Olivier Bélanger
to rename jack input/output ports. - Added "id" and "object" attributes to wxgui's object events. Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com/ P>http://ajaxsoundstudio.com/software/pyo/;>Pyo 0.8.4 Python DSP library. (24-Mar-17) -- https://mail

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-03-24 Thread Olivier Vielpeau
Olivier Vielpeau added the comment: I've attached the PR on Github and signed the CLA, is there anything else needed from me to get this reviewed? Thanks! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-03-06 Thread Olivier Vielpeau
Changes by Olivier Vielpeau <olivier.vielp...@datadoghq.com>: -- pull_requests: +433 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-03-06 Thread Olivier Vielpeau
New submission from Olivier Vielpeau: The code snippet in #25569 reproduces the memory leak with Python 3.6.0 and 2.7.13. The current memory leak is a regression that was introduced in #26470. Going to attach a PR on github that fixes the issue shortly. -- assignee: christian.heimes

[Release] Pyo 0.8.2 (Python dsp library)

2017-02-14 Thread Olivier Bélanger
GlobalDur and getGlobalDel methods to the Server object. These methods allow the user to manage the start time and duration of audio objects globally. - Fader and Adsr now start a new envelope from the current amplitude value if the previous ramp has not finished yet. Olivie

[Release] Pyo 0.8.2 (Python dsp library)

2016-12-18 Thread Olivier Bélanger
. - TrigFunc and Pattern now accept a tuple as "arg" argument (fixed issue #90). - E-Pyo: Fixed a bug in the documentation window. - Fixed midi input events handling. - Set interpolation to off by default for midi continuous controllers. Olivier Belanger belan...@gmai

[Release] Pyo 0.8.1 (Python DSP library)

2016-12-12 Thread Olivier Bélanger
, downloads and other links, see the official web site: http://ajaxsoundstudio.com/software/pyo/ The documentation: http://ajaxsoundstudio.com/pyodoc/ For the latest sources and bug tracker: https://github.com/belangeo/pyo Olivier Belanger belan...@gmail.com http://olivier.ajaxsoundstudio.com

Cohabitation of debug and release python in the same folder

2016-11-25 Thread Olivier Barthelemy
If i try to build a normal python and a 'with-pydebug' python in the same folder, I can run both versions of python by running the real executable names instead of the generic name symlinks. However, if i want to use sysconfig.get_config_var() to check "Py_DEBUG" (to then know from .py files

[issue26527] CGI library - Using unicode in header fields

2016-03-10 Thread Olivier Le Moign
Olivier Le Moign added the comment: I guess this is fixed by https://pypi.python.org/pypi/rfc6266. Could have looked better, sorry. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26527] CGI library - Using unicode in header fields

2016-03-10 Thread Olivier Le Moign
New submission from Olivier Le Moign: According to RFC5987 (http://tools.ietf.org/html/rfc5987), it's possible to use other encoding than ASCII in header fields. Specifically in the CGI library, posting files with non-ASCII characters will lead the header to be (for example) filename*=utf-8

Olivier Adret

2015-11-06 Thread olivier
Je vais essayer de programmer en python. On verra bien ! -- https://mail.python.org/mailman/listinfo/python-list

[issue23067] Export readline forced_update_display

2015-02-17 Thread Olivier Matz
Olivier Matz added the comment: By the way, I have my own implementation of the patch that did before checking the issue tracker. Instead of adding an argument to readline.redisplay(), it adds a new function readline.forced_update_display(). I attach the patch for reference, I don't know what

[issue23067] Export readline forced_update_display

2015-02-17 Thread Olivier Matz
Olivier Matz added the comment: Hi, I'm also interrested in this feature. Indeed, exporting rl_forced_update_display() is the only way I've found to make readline.set_completion_display_matches_hook() working properly. Without forcing the redisplay, the prompt is not displayed. This seems

[issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated

2014-10-06 Thread Olivier Grisel
Olivier Grisel added the comment: No problem. Thanks Antoine for the review! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21905 ___ ___ Python

[issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated

2014-07-03 Thread Olivier Grisel
Olivier Grisel added the comment: New version of the patch to add an inline comment. -- Added file: http://bugs.python.org/file35841/pickle_whichmodule_20140703.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21905

[issue21905] RuntimeError in pickle.whichmodule when sys.modules if mutated

2014-07-02 Thread Olivier Grisel
New submission from Olivier Grisel: `pickle.whichmodule` performs an iteration over `sys.modules` and tries to perform `getattr` calls on those modules. Unfortunately some modules such as those from the `six.moves` dynamic module can trigger imports when calling `getattr` on them, hence

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Olivier Grisel
Olivier Grisel added the comment: I applied issue19946_pep_451_multiprocessing_v2.diff and I confirm that it fixes the problem that I reported initially. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Olivier Grisel
Olivier Grisel added the comment: Why has this issue been closed? Won't the spawn and forkserver mode work in Python 3.4 for Python program started by a Python script (which is probably the majority of programs written in Python under unix)? Is there any reason not to use the `imp.load_source

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Olivier Grisel
Olivier Grisel added the comment: The semantics are not going to change in python 3.4 and will just stay as they were in Python 3.3. Well the semantics do change: in Python 3.3 the spawn and forkserver modes did not exist at all. The spawn mode existed but only implicitly and only under

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Olivier Grisel
Olivier Grisel added the comment: I can wait (or monkey-patch the stuff I need as a temporary workaround in my code). My worry is that Python 3.4 will introduce a new feature that is very crash-prone. Take this simple program that uses the newly introduced `get_context` function (the same

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-13 Thread Olivier Grisel
Olivier Grisel added the comment: For Python 3.4: Maybe rather than raising ImportError, we could issue warning to notify the users that names from the __main__ namespace could not be loaded and make the init_module_attrs return early. This way a multiprocessing program that only calls

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-11 Thread Olivier Grisel
Olivier Grisel added the comment: I agree that a failure to lookup the module should raise an explicit exception. Second, there is no way that 'nosetests' will ever succeed as an import since, as Oliver pointed out, it doesn't end in '.py' or any other identifiable way for a finder to know

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-11 Thread Olivier Grisel
Olivier Grisel added the comment: what is sys.modules['__main__'] and sys.modules['__main__'].__file__ if you run under nose? $ cat check_stuff.py import sys def test_main(): print(sys.modules['__main__']=%r % sys.modules['__main__']) print(sys.modules['__main__

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-11 Thread Olivier Grisel
Olivier Grisel added the comment: Note however that the problem is not specific to nose. If I rename my initial 'check_forserver.py' script to 'check_forserver', add the '#!/usr/bin/env python' header and make it 'chmod +x' I get the same crash. So the problem is related to the fact

[issue19946] Have multiprocessing raise ImportError when spawning a process that can't find the main module

2013-12-11 Thread Olivier Grisel
Olivier Grisel added the comment: Here is a patch that uses `imp.load_source` when the first importlib name-based lookup fails. Apparently it fixes the issue on my box but I am not sure whether this is the correct way to do it. -- keywords: +patch Added file: http://bugs.python.org

[issue19946] multiprocessing crash with forkserver or spawn when run from a non .py ending script

2013-12-10 Thread Olivier Grisel
New submission from Olivier Grisel: Here is a simple python program that uses the new forkserver feature introduced in 3.4b1: name: checkforkserver.py import multiprocessing import os def do(i): print(i, os.getpid()) def test_forkserver(): mp = multiprocessing.get_context

[issue19946] multiprocessing crash with forkserver or spawn when run from a non .py ending script

2013-12-10 Thread Olivier Grisel
Changes by Olivier Grisel olivier.gri...@ensta.org: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list

[issue19946] multiprocessing crash with forkserver or spawn when run from a non .py ending script

2013-12-10 Thread Olivier Grisel
Olivier Grisel added the comment: So the question is exactly what module is being passed to importlib.find_spec() and why isn't it finding a spec/loader for that module. The module is the `nosetests` python script. module_name == 'nosetests' in this case. However, nosetests

[issue19851] reload problem with submodule

2013-12-09 Thread Olivier Grisel
Olivier Grisel added the comment: I tested the patch on the current HEAD and it fixes a regression introduced between 3.3 and 3.4b1 that prevented to build scipy from source with pip install scipy. -- nosy: +Olivier.Grisel ___ Python tracker rep

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Olivier Grisel
Olivier Grisel added the comment: The process pool executor [1] from the concurrent futures API would be suitable to explicitly start and stop the helper process for the `forkserver` mode. [1] http://docs.python.org/3.4/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Olivier Grisel
Olivier Grisel added the comment: Richard Oudkerk: thanks for the clarification, that makes sense. I don't have the time either in the coming month, maybe later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-11 Thread Olivier Grisel
Olivier Grisel added the comment: Maybe it would be better to have separate contexts for each start method. That way joblib could use the forkserver context without interfering with the rest of the user's program. Yes in general it would be great if libraries could customize

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Olivier Grisel
Olivier Grisel added the comment: Related question: is there any good reason that would prevent to pass a custom `start_method` kwarg to the `Pool` constructor to make it use an alternative `Popen` instance (that is an instance different from the `multiprocessing._Popen` singleton

[issue17560] problem using multiprocessing with really big objects?

2013-08-19 Thread Olivier Grisel
Olivier Grisel added the comment: I have implemented a custom subclass of the multiprocessing Pool to be able plug custom pickling strategy for this specific use case in joblib: https://github.com/joblib/joblib/blob/master/joblib/pool.py#L327 In particular it can: - detect mmap-backed numpy

[issue17560] problem using multiprocessing with really big objects?

2013-08-19 Thread Olivier Grisel
Olivier Grisel added the comment: I forgot to end a sentence in my last comment: - detect mmap-backed numpy should read: - detect mmap-backed numpy arrays and pickle only the filename and other buffer metadata to reconstruct a mmap-backed array in the worker processes instead of copying

[issue17560] problem using multiprocessing with really big objects?

2013-08-19 Thread Olivier Grisel
Olivier Grisel added the comment: In 3.3 you can do from multiprocessing.forking import ForkingPickler ForkingPickler.register(MyType, reduce_MyType) Is this sufficient for you needs? This is private (and its definition has moved in 3.4) but it could be made public. Indeed I

[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-13 Thread Olivier Gagnon
Olivier Gagnon added the comment: Yes I do have code that break because of this behaviour. I'm doing evolutionary algorithm using a framework called DEAP. This framework creates a type called individual at the runtime by subclassing a container and adding it a fitness attribute. Those

[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-12 Thread Olivier Gagnon
Olivier Gagnon added the comment: I can understand that the current behaviour can be correct in regard with the added attributes of the object. However, should I open a new issue for the following inheritance behaviour which the reduce function affects also. class myCounter(Counter): def

[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-10 Thread Olivier Gagnon
Olivier Gagnon added the comment: The dictionary and the set do not give the freedom to add dynamic attributes to them. I agree that the Counter should have the same behaviour. However, this will raise the same bug when we inherit from a Counter object. class mylist(list): pass ... l

[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-03 Thread Olivier Gagnon
New submission from Olivier Gagnon: The following code shows that the Counter is not deepcopied properly. The same code with an user defined class or a dict is copied with the b attribute. import collections import copy count = collections.Counter() count.b = 3 print(count.b) # prints 3

[issue18033] Example for Profile Module shows incorrect method

2013-07-03 Thread Olivier Hervieu
Olivier Hervieu added the comment: Here is a fixed version for python2.7. Using StringIO instead of io module fixes the problem pointed by Ezio. The print_stats method dumps the stats either on sys.stdout if `Stats` class is declared without a stream specification or in the given stream

[issue17776] IDLE Internationalization

2013-04-17 Thread Olivier Berger
Olivier Berger added the comment: Excellent. I've started playing with pygettext and msgfmt and it looks like this works, from the initial tests I've made -- nosy: +olberger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17776

[issue17760] No i18n of IDLE's interface in french

2013-04-16 Thread Olivier Berger
New submission from Olivier Berger: The IDLE UI isn't internationalized, AFAICS. This doesn't help when teachning Python to non-english native speakers. While learning basic english skills is no problem for wanabe Python hackers, it isn't so for young programmers being tought informatics

Secretly passing parameter to function

2012-12-05 Thread Olivier Scalbert
dynamically an attribute the the step1 function, and retrieve it inside the function, but it is perhaps overkill. Do you have some ideas ? Thanks, Olivier -- http://mail.python.org/mailman/listinfo/python-list

[issue14892] 'import readline' hangs when launching with '' on BSD and OS X

2012-10-22 Thread olivier-mattelaer
olivier-mattelaer added the comment: Thanks a lot Ronald. Cheers, Olivier -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14892

[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2012-06-27 Thread Olivier Berten
Olivier Berten olivier.ber...@gmail.com added the comment: Any idea why mac cjk encodings still aren't available in Python 2.7 and 3.2 ? -- components: -Build, Demos and Tools, Library (Lib), Macintosh nosy: +ezio.melotti, olivier-berten versions: +Python 2.7, Python 3.2 -Python 2.6

[issue14892] 'import readline' fails when launching with ''

2012-05-23 Thread olivier-mattelaer
New submission from olivier-mattelaer olivier.mattel...@uclouvain.be: Hi Everyone, I have found a strange behavior of the import command for the routine readline: The commands (put in the file test.py) is simply: import readline print readline.__doc__ If I run this programs normally (i.e

[issue13836] Define key failed

2012-01-22 Thread olivier
New submission from olivier pyt...@noetika.com: Hi, I tried to define new key in python idle and then python 2.5.1 failed to launch. What I did : I defined a new key, applied and changed my mind, removed my key set named 'ole'. I launched cmd C:\Python25\Lib\idlelib..\..\python idle.py

pyexiv2 0.3.1 released

2011-10-24 Thread Olivier Tilloy
. Cheers, Olivier [1] https://launchpad.net/pyexiv2/0.3.x/0.3.1 [2] http://exiv2.org -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2011-10-04 Thread Olivier Refalo
Olivier Refalo oref...@yahoo.com added the comment: hum, your patch actually works on MSYS ! ok.. so I am pretty much having the very some issue. Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] Fatal Python error: Py_Initialize

  1   2   >