[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-23 Thread Christian Buhtz
Christian Buhtz added the comment: In the attachment you will find a PDF with variants A to D on each side. I tried to think into the design decisions made by the team who created the current installer. I am not sure of course but I tried to take this (assumed) decisions into account

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: New changeset 38f331d4656394ae0f425568e26790ace778e076 by Christian Heimes in branch 'main': bpo-45898: Remove duplicate symbols from _ctypes/cfield.c (GH-29791) https://github.com/python/cpython/commit/38f331d4656394ae0f425568e26790

[issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols

2022-02-24 Thread Christian Heimes
Christian Heimes added the comment: I have applied the patch to main branch (3.11). The workaround for Windows turned out to be more elaborate than initially anticipated. I'm not going to backport the fix to 3.10 and 3.9. -- resolution: -> fixed stage: patch review -&g

[issue46833] Windows installer is unclear and has redundant settings

2022-02-26 Thread Christian Buhtz
Christian Buhtz added the comment: Dear Steve, thanks for your feedback. I did not understand all details of your design decisions but I am OK with that. Variant A is fine for me, too. The important to points of A for me are 1) that the checkboxes on page 1 are moved up directly under the

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-02-26 Thread Christian Heimes
Christian Heimes added the comment: How did you build Python 3.10? Neither CentOS 8 nor Ubuntu 20.04 come with Python 3.10. Does your build of Python use system's OpenSSL build? -- assignee: christian.heimes -> ___ Python tracker

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-02-26 Thread Christian Heimes
Christian Heimes added the comment: This is a pyenv issue, not a Python issue. Custom builds of OpenSSL typically do not and cannot use global settings like crypto policies. They are missing distro downstream patches and use different config files

[issue46849] Memory problems detected using Valgrind

2022-02-27 Thread Christian Heimes
Change by Christian Heimes : -- Removed message: https://bugs.python.org/msg414097 ___ Python tracker <https://bugs.python.org/issue46849> ___ ___ Python-bug

[issue46849] Memory problems detected using Valgrind

2022-02-27 Thread Christian Heimes
Christian Heimes added the comment: Valgrind does not understand Python's custom obmalloc allocator. You have to run valgrind with our suppression rules Misc/valgrind-python.supp to ignore false errors. -- nosy: +christian.heimes ___ P

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-02-27 Thread Christian Heimes
Christian Heimes added the comment: New changeset 088dd76dba68c2538776d9920607f81e54544cbd by Dong-hee Na in branch 'main': bpo-46541: Remove unnecessary Py_VISIT (GH-31608) https://github.com/python/cpython/commit/088dd76dba68c2538776d9920607f81e54544cbd -- nosy: +christ

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-03-01 Thread Christian Heimes
Christian Heimes added the comment: Could you please provide the outputs of the following commands: python3 -c "import _ssl; print(_ssl.__file__)" ldd $(python3.10 -c "import _ssl; print(_ssl.__file__)") strace -e openat python3.10 -c "from urllib.request import

[issue46863] Python 3.10 OpenSSL Configuration Issues

2022-03-02 Thread Christian Heimes
Christian Heimes added the comment: pyenv uses default value for ./configure --with-ssl-default-suites. You have to use --with-ssl-default-suites=openssl so your build uses the system's crypto policy correctly. -- ___ Python tracker &

[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes
New submission from Christian Heimes : Extension modules with bare "#define Py_LIMITED_API" without version fail to build with error: moduleobject.h:82:3: error: unknown type name ‘PyModuleDef_Slot’ The issue was introduced in PR GH-31528 and bpo-45459. The type PyModuleDef_Sl

[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes
Christian Heimes added the comment: The problem was first reported to PyCA cryptography project in bug https://github.com/pyca/cryptography/issues/6929 -- ___ Python tracker <https://bugs.python.org/issue46

[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +29786 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31667 ___ Python tracker <https://bugs.python.org/issu

[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes
Christian Heimes added the comment: With fix: $ /tmp/python311/bin/pip3 install --no-binary :all: cryptography Collecting cryptography Using cached cryptography-36.0.1.tar.gz (572 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel

[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes
Christian Heimes added the comment: Please add a blurb entry. -- assignee: christian.heimes -> vstinner priority: -> normal resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python

[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread Christian Heimes
Christian Heimes added the comment: I don't agree with GH-31673. Did you try defining NO_MISALIGNED_ACCESSES instead? -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/is

[issue39298] add BLAKE3 to hashlib

2022-03-04 Thread Christian Heimes
Christian Heimes added the comment: GH-31686 is a massive patch set. I'm feeling uncomfortable adding such much new code for a new hashing algorithm. Did you ask the Steering Council for approval? The platform detection and compiler flag logic must be added to configure.ac inste

[issue39298] add BLAKE3 to hashlib

2022-03-05 Thread Christian Heimes
Christian Heimes added the comment: I didn't consult the steering council in 2016, because I lost the keys to the time machine. The very first SC election was in 2019. :) -- ___ Python tracker <https://bugs.python.org/is

[issue45582] Rewrite getpath.c in Python

2022-03-05 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29819 pull_request: https://github.com/python/cpython/pull/31699 ___ Python tracker <https://bugs.python.org/issue45

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes
New submission from Christian Heimes : WebAssembly platforms like wasm32-emscripten and wasm32-wasi don't have a typical user and group database. WASI platform does not provide necessary API functions at all. Emscripten provides dummy stubs. On Emscripten the pwd module compiles, but is

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +29820 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31700 ___ Python tracker <https://bugs.python.org/issu

[issue45582] Rewrite getpath.c in Python

2022-03-06 Thread Christian Heimes
Christian Heimes added the comment: New changeset 55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7 by Christian Heimes in branch 'main': bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699) https://github.com/python/cpython/commit/55a5e17d19fecb6a7af85a1a9

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes
Christian Heimes added the comment: New changeset ca9689f8dac01d27e041e1dbbdae146746d48ab3 by Christian Heimes in branch 'main': bpo-46933: Make pwd module optional (GH-31700) https://github.com/python/cpython/commit/ca9689f8dac01d27e041e1dbbdae14

[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue1197] logging: formatter does not accept %(funcName)s properly

2007-09-24 Thread Christian Meesters
Changes by Christian Meesters: -- components: Library (Lib) severity: minor status: open title: logging: formatter does not accept %(funcName)s properly type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1197] logging: formatter does not accept %(funcName)s properly

2007-09-24 Thread Christian Meesters
New submission from Christian Meesters: Adding %(funcName)s to a formatter will only insert the calling logging function (e.g. "info" for logging.info) into messages not the function where the message comes from: logging.Formatter('%(levelname)-8s %(funcName)s %(mess

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Christian Heimes
New submission from Christian Heimes : The patches changes: - change PyString's repr() to return "b'...'" - change PyBytes's repr() to return "buffer(b'...')" - change p

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-09 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > GHave you two agreed yet as to which patch(es) I should look at? Please commit Alexandres patch. His patch for bytesobject.c is based on my patch. It's more complete and a bit be

[issue1258] Removal of basestring type

2007-10-10 Thread Christian Heimes
Christian Heimes added the comment: test_ctypes: works for me test_email: need some help from an email expoert test_httplib: __file__ has a wrong type str8. I'm looking into it. test_inspect: same issue as httplib test_os: same issue test_re: I had the failing test before my changes File

[issue1258] Removal of basestring type

2007-10-10 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Did you svn up, make clean and rebuild? The ctypes package didn't change since my last rebuild an hour ago. I'm on Linux (Ubuntu i386) > >> test_email: need some help from an email expoert >

[issue1264] __file__ and co_filename as unicode

2007-10-11 Thread Christian Heimes
New submission from Christian Heimes: This is a *preliminary* patch for __file__ and co_filename which decodes char* / PyString using the FS default encoding. I'm still working on it. -- components: Interpreter Core files: py3k_file_fsenc.patch messages: 56345 nosy: tiran sev

[issue1265] pdb bug with "with" statement

2007-10-11 Thread Christian Heimes
New submission from Christian Heimes: found a pretty annoying bug caused by with blocks. A with block terminates the debugging session and the program keeps running. It's not possible to go to the next line with 'n'. 's' steps into the open() call. # pdbtest.py import

[issue1268] array unittest problems with UCS4 build

2007-10-11 Thread Christian Heimes
New submission from Christian Heimes: The array module is using a different typecode for unicode array depending on UCS2 or UCS4: #define Py_UNICODE_SIZE 4 #if Py_UNICODE_SIZE >= 4 #define Py_UNICODE_WIDE #endif #ifdef Py_UNICODE_WIDE #define PyArr_UNI 'w' #define PyArr_UNI

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-12 Thread Christian Heimes
New submission from Christian Heimes: I'm sending the patch in for review. -- components: Interpreter Core files: py3k_file_fsenc2.patch messages: 56374 nosy: tiran severity: normal status: open title: Decode __file__ and co_filename to unicode using fs default versions: Pytho

[issue1268] array unittest problems with UCS4 build

2007-10-12 Thread Christian Heimes
Christian Heimes added the comment: svn annotate shows that you implemented the 'w' typecode in revision 57181. What do you think about my patch and my proposal? -- nosy: +teoliphant __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > - You added a removal of hotshot from setup.py to the patch; but that's > been checked in in the mean time. Oh, the change shouldn't make it into the patch. I guess I forgot a svn revert on setup.py > - Why add a

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > But that function is a terrible example; it was done that way because > an earlier version of the function *did* allow using the errors > argument and I wanted to make sure to catch all calls that were still > passing an

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > - Why copy the default encoding before mangling it? With a little extra > care you will only have to copy it once. Now I remember why I added the strncpy() call plus encoding[31] = '\0'. I wanted to make sure that

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > Crys, is this OK with you? Alexandre's mangle loop doesn't do the same job as mine. Chars like _ and - aren't removed from the encoding name and the if clauses don'

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: Alexandre Vassalotti wrote: > That isn't true. My mangler does exactly the same thing as your > original one. > > However, I forgot to add Py_CHARMASK to the calls of tolower() and > isalnum() which would cause problems on platforms

[issue1268] array unittest problems with UCS4 build

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: > Can this be closed now that Travis reverted his patch? Yes, it can be closed. By the way svn.python.org and the anon svn server are down the third time this week. Something is wrong with the server. Christian __ Trac

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: Alexandre Vassalotti wrote: > Alexandre Vassalotti added the comment: > > I thought of another way to implement PyUnicode_DecodeFSDefault. If > Py_FileSystemDefaultEncoding is set, decode with the codecs module, > otherwise use UTF-8 + repl

[issue1268] array unittest problems with UCS4 build

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: Oh stop, the array module doesn't build for me (Ubuntu Linux, i386, UCS-4 build, rev58458): Modules/arraymodule.c: In function 'array_buffer_getbuf': Modules/arraymodule.c:1815: error: 'Py_buffer' has no member named 'formats

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: Changes since updated_file_fsenc-5.patch: * Fix for hard coded FS default encoding on Apple and Windows * Added two notes to unicode_default_encoding and Py_FileSystemDefaultEncoding __ Tracker <[EMAIL PROTECTED]>

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: >> UnicodeDecodeError: 'utf8' codec can't decode bytes in position >> 1428-1430: invalid data > > I can't reproduce this. Can you open a separate issue? It breaks for me with the same error message on Ubuntu Linux,

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: > This looks promising. I'm working on the freeze issue. Once I get that > working I'll check this in. Thanks Alexandre and Christian for all > your hard work!!! You're welcome. Does the patch qualify me for Misc/ACKS? :) I'm go

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Christian Heimes
Christian Heimes added the comment: I found two minor bugs in the fix. In Modules/posixmodule.c the tmpnam() and tempnam() methods return a PyString instance. Please change line 5373 and 5431 to use PyUnicode_DecodeFSDefault(). Index: Modules/posixmodule.c

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-14 Thread Christian Heimes
New submission from Christian Heimes: imp.find_module() returns an io.TextIOWrapper instance first value. The encoding of the TextIOWrapper isn't set from a -*- coding: Latin-1 -*- line. >>> import imp >>> imp.find_module("heapq") (, '/home/heimes/dev/pyt

[issue1258] Removal of basestring type

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: Here is an updated patch which applies cleanly and fixes some additional unit tests and removes one that doesn't make sense any more (re.compile doesn't accept bytes). The unit tests profile, cProfile and doctest fail w/ and w/o this patch. Th

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: > Can you suggest a patch? > > Adding Brett Cannon to the list, possibly his import-in-python would > supersede this? No, I can't suggest a patch. I don't know how we could get the encoding from the tokenizer or AST. Brett is obvious

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: > Try harder. :-) Look at the code that accomplishes this feat in the > regular parser... I've already found the methods that find the encoding in Parser/tokenizer.c: check_coding_spec() and friends. But it seems like a waste of

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: > Call PyTokenizer_Get until the line number is > 2? That's too easy :] I'm going to implement the fix tonight. Christian __ Tracker <[EMAIL PROTECTED]> <http://

[issue1267] Py3K cannot run as ``python -S``

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: I've some code around which sets sys.stdin, out and err in C code. The code is far from perfect and I haven't checked it for reference leaks yet. I like to get your comment on the style and error catching. -- no

[issue1258] Removal of basestring type

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: > Any details on those? They don't fail for me. Here you are. $ ./python Lib/test/test_cProfile.py 121 function calls (101 primitive calls) in 1.000 CPU seconds Ordered by: standard name ncalls tottime percall cumtime

[issue1258] Removal of basestring type

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > BTW we need a 2to3 fixer for this. Should be trivial -- just replace > *all* occurrences of basestring with str. I believe you that it's trivial for *you* but I've never dealt with the fixers or the grammar. Fortunat

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: >> It is not perfect, since the extra function calls in the codecs module >> causes test_profile and test_doctest to fail. > > How this was resolved? It's not resolved yet. __ Tracker &l

[issue1267] Py3K cannot run as ``python -S``

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: I've carefully checked and tested the initstdio() method. I'm sure that I've catched every edged case. The unit tests pass w/o complains. I've also added a PyErr_Display() call to Py_FatalError(). It's still hard to understand an er

[issue1267] Py3K cannot run as ``python -S``

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Don't call open() with keyword arg for newline="\r"; open() takes > positional args too. This is done specifically to simplify life for C > code calling it. :-) Perhaps one of the PyFunction_Call(..) variants &

[issue1267] Py3K cannot run as ``python -S``

2007-10-15 Thread Christian Heimes
Christian Heimes added the comment: The patch is a combined patch for the imp.find_module() problem and initstdio. Both patches depend on the new PyFile_FromFileEx() function. I hope you don't mind. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1267] Py3K cannot run as ``python -S``

2007-10-16 Thread Christian Heimes
Christian Heimes added the comment: Changes since last patch: * removed unused import of open in initstdio() * fixed infinite loop in PyTokenizer_FindEncoding() by checking tok-done == E_OK __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1267] Py3K cannot run as ``python -S``

2007-10-16 Thread Christian Heimes
Christian Heimes added the comment: Christian Heimes wrote: > * removed unused import of open in initstdio() > * fixed infinite loop in PyTokenizer_FindEncoding() by checking > tok-done == E_OK I found another bug in Python/import.c:call_find_method. The function mustn't set

[issue1267] Py3K cannot run as ``python -S``

2007-10-16 Thread Christian Heimes
Christian Heimes added the comment: Update since last patch * removed unnecessary const from const char* PyTokenizer_FindEncoding(FILE *fp) * Fixed bug in find_module whith binary files Please review the patch. __ Tracker <[EMAIL PROTECTED]>

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: The bug was fixed in r58553 together with http://bugs.python.org/issue1267. Please close this bug. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes the output for profile and cProfile. Another patch from Alexandre and me added additional calls to the UTF-8 codec. -- components: Library (Lib) messages: 56569 nosy: gvanrossum, tiran severity: normal status: open title: Fixes for

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Brett Cannon added the comment: > > It looks like the file object returned by imp.find_module() has its read > position WAY too far forward (at least on OS X). That's strange. It should never read more than 2 lines o

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: > runpy is failing because pkgutil is failing because it is giving > compile() part of a source file instead of the entire thing:: > > Traceback (most recent call last): > File "/Users/drifty/Dev/python/3.x/pristine/Lib/runp

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: It's unrelated to the problem but Parser/tokenizer.c:1619 has a minor bug. > while(((tok->lineno <= 2) && (tok->done == E_OK))) { > PyTokenizer_Get(tok, &p_start, &p_end); > } (tok-&

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I don't have a Mac at my disposal any more. :( Can you attach the output of the failing tests to the bug report? Maybe I can be of assistance. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Brett Cannon added the comment: > > OK, for some reason, when PyTokenizer_FindEncoding() is called and the > resulting file is big enough, it starts off with a seek position > (according to TextIOWrapper.tell()) of 4096.

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I've made a short unit tests which tests a large file with and w/o -*- coding: -*-. It passes on Linux. Added file: http://bugs.python.org/file8575/py3k_test_issue1267.patch __ Tracker <[EMAIL PROTECTED

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > This suggests that perhaps we should standardize on file pointers or > file descriptors in Python to prevent something like this from happening > again. rewind() it used couple of times in the Python code. Have you checked if

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Sure there is a patch ... well it's ... *uhm* ... it's hidden under your bed. O:-) Added file: http://bugs.python.org/file8569/py3k_profile_fix.patches __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Thanks. I just wish this whole ordeal had not been necessary (filed a > bug report with Apple in hopes that this can be prevented for someone > else). I can see why some people prefer to hack on PyPy, IronPython, > or Jytho

[issue1267] Py3K cannot run as ``python -S``

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > You're right that a lot of this could be avoided if we used file > descriptors consistently. It seems find_module() itself doesn't read > the file; it just needs to know that it's possible to open the file. &

[issue1267] Py3K cannot run as ``python -S``

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: > Yes, I think you got it. Guido, Brett, how much of the code should I change? import.c is mainly using file pointers. Should I replace all operations on FILE with operations on a file descriptor? Christian __ Tracker <

[issue1267] Py3K cannot run as ``python -S``

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > I think find_module() should return a file descriptor (fd), not a > FILE*, but most of the rest of the code should call fdopen() on that > fd. Only call_find_module() should use the fd to turn it into a Python > file obje

[issue1267] Py3K cannot run as ``python -S``

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: > The dangers of switching between fileno(fp) and fp are actually well > documented in the C and/or POSIX standards. The problem is caused in > PyFile_FromFileEx() -- it creates a Python file object from the file > descriptor. The fix actuall

[issue1302] Fixes for profile/cprofile

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: The new patch does a far more better job. I had the idea after a discussion with Alexandre on #python and a small debugging session. The tests for profile, cProfile and doctest are failing on my Linux box because Py_FileSystemDefaultEncoding is "UTF-8

[issue1267] Py3K cannot run as ``python -S``

2007-10-20 Thread Christian Heimes
Christian Heimes added the comment: > I think find_module() should return a file descriptor (fd), not a > FILE*, but most of the rest of the code should call fdopen() on that > fd. Only call_find_module() should use the fd to turn it into a Python > file object. Then the amount of c

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > Do you have access to Windows? I believe it doesn't have dup(). :-( I've an old laptop with Win2k at my disposal but it has no VS yet. Can you point me to a set of instruc

[issue1309] windows build fix

2007-10-21 Thread Christian Heimes
New submission from Christian Heimes: bytes_methods.c isn't in PCbuild/pythoncore.vcproj -- components: Windows files: py3k_pcbuild_bytes.patch messages: 56632 nosy: tiran severity: normal status: open title: windows build fix type: compile error versions: Python 3.0 Added file:

[issue1267] Py3K cannot run as ``python -S``

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > You might want to compare what I checked in to your patch; I did a few > style cleanups. I also moved the lseek() call into import.c, where it > seems more appropriate. Ah I see that you prefer to keep assignment and chec

[issue1302] Fixes for profile/cprofile

2007-10-21 Thread Christian Heimes
Christian Heimes added the comment: Alexandre Vassalotti wrote: > I don't think it's possible to add shortcuts in PyUnicode_Decode for > UTF-16 and UTF-32 because the byte-order can be different depending of > the platform. So, these two need to pass through the codecs module.

[issue1310] tempfile breaks on Windows

2007-10-21 Thread Christian Heimes
New submission from Christian Heimes: tempfile breaks on Windows because exception objectss no longer support e[0]. The fix is simple and short: Index: Lib/tempfile.py === --- Lib/tempfile.py (Revision 58587) +++ Lib

[issue1303] adapt str8 constructor to bytes constructor

2007-10-22 Thread Christian Heimes
Changes by Christian Heimes: -- nosy: +tiran __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1303> __ ___ Python-bugs-list mailing list Unsubs

[issue1314] Patch for strftime problem on German Windows

2007-10-23 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes the failing unit tests for time and strptime on German and probably other Windows installations. - ret = PyUnicode_FromStringAndSize(outbuf, buflen); + ret = PyUnicode_Decode(outbuf, buflen

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Christian Heimes
New submission from Christian Heimes: I couldn't stand the compiler warnings any more. :) The patch removes os.tmpnam() and os.tempnam() from the posix module. It also updates the docs and tests. TMP_MAX is kept for the tempfile module. I haven't figured out how to remove the de

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-23 Thread Christian Heimes
Christian Heimes added the comment: First, you are right. It's not a compiler but a linker warning. I don't see the point in keeping the methods. They are dangerous to use, warned upon for a long time and they have a sane replacement that does a far

[issue1318] Remove os.tmpnam() and os.tempnam() [patch]

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: os.tmpfile() is the only method that has no duplicate in tempfile. I chose to keep it for this very reason. But you made good point, too. What do you think about renaming tmpfile to _tmpfile and make it available from the tempfile module as tempfile.tmpfile

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Why should I use (sizeof(lower)-1)? Do you mean PyMem_Malloc(strlen(encoding) + 1)? Changes since last patch: * added #include "bytes_methods.h" in unicodeobject.c * fix all is* to use the macros from bytes_methods.h * use malloc/free the low

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Christian can you revise your patch to also remove os.tmpfile per > Martin's request? Make sure unit tests and docs are fixed too. I can do that for you. But I still believe that os.tmpfile() works different than tempf

[issue1318] Remove os.tmpnam() and os.tempnam()

2007-10-25 Thread Christian Heimes
Changes by Christian Heimes: Added file: http://bugs.python.org/file8612/py3k_remove_os_tmp.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1318> __ ___

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > Committed revision 58659. > > I'm sorry I confused you; I was fine with the version that has char > lower[N] but I wanted you to not repeat N-1 later in the code.

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Alexandre Vassalotti wrote: > It the address of lower[18] to be exact. (l < &lower[(sizeof lower) - > 2]) is simply tricky notation to check the bound of the array. > Personally, I used like to subtract pointer, ((lower - l + 1) < (sizeof &

[issue1330] Fix truncate on Windows, this time for real

2007-10-25 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes for real what "Patch # 1323 by Amaury Forgeot d'Arc" claims to have fixed. I reverted his patch to io.py and implemented the fix in the Windows specific part of truncate in _fileio.c. It fixes two tests for ra

[issue1330] Fix truncate on Windows, this time for real

2007-10-25 Thread Christian Heimes
Changes by Christian Heimes: -- nosy: +gvanrossum, nnorwitz __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1330> __ ___ Python-bugs-list mailing list

[issue1331] More fixes for Windows

2007-10-25 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes some of the problems on Windows. It doesn't introduce addition problems on Linux. -- components: Library (Lib) files: py3k_misc_win.patch messages: 56770 nosy: gvanrossum, nnorwitz, tiran severity: normal status: open title:

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: Ony my Ubuntu box lsb_release is just a small Python script that parses /etc/lsb-release. I suggest that your read the LSB standards about the file and use the information to parse it instead of invoking a program. -- nosy: +tiran

[issue1322] platform.dist() has unpredictable result under Linux

2007-10-25 Thread Christian Heimes
Christian Heimes added the comment: [EMAIL PROTECTED]:~$ /usr/bin/lsb_release -a LSB Version: core-2.0-noarch:core-3.0-noarch:core-3.1-noarch:core-2.0-ia32:core-3.0-ia32:core-3.1-ia32:cxx-2.0-noarch:cxx-3.0-noarch:cxx-3.1-noarch:cxx-2.0-ia32:cxx-3.0-ia32:cxx-3.1-ia32:graphics-2.0

<    1   2   3   4   5   6   7   8   9   10   >