[issue14048] calendar bug related to September 2-14, 1752
New submission from Scott Bannert banne...@gmail.com: Note: this is my first time to submit a bug or use this system I might have found an issue with the calendar related to the point of time in history when the date was necessary to correct by 11 days. Anyhow, the correction is made in a GNU+linux machine, so it seems like something worth fixing in python. How I discovered it: I was reading through some posts on reddit when I came up on this one: http://www.reddit.com/r/linux/comments/9jl2t/1_open_a_linux_terminal_2_enter_cal_9_1752_3_shit/ which seemed to state that in the September of 1752, they decided to skip from Wednesday the 2nd to Thursday the 14th. Out of curiosity, I decided to see if Python had it recorded this way by typing in the following commands in python: import calendar calendar.TextCalendar().pryear(1752) It was not corrected for the two versions of python I tried using (2.7 and 3.2). -- messages: 153635 nosy: bannerts priority: normal severity: normal status: open title: calendar bug related to September 2-14, 1752 type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14048 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9253] argparse: optional subparsers
Changes by Daniel Neuhäuser dasdas...@googlemail.com: -- nosy: +DasIch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9253 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
Paul Moore p.f.mo...@gmail.com added the comment: - Will “@%~dp0\..\python.exe” get the proper path for people who do not install Python to C:\? %~dp0\..\python.exe locates python relative to the batch file (one directory up) so will work as long as the bat file is in Scripts. The @ just suppresses echo of the command. - Aren’t there issues with .bat scripts (or maybe it’s with .com scripts, I never remember)? Yes. They don't nest, so to invoke pysetup in a batch file, you need to write call pysetup.bat. If you just use pysetup, the command never returns causing silent failures. Personally, I hate bat files for this reason alone, but others seem happy to put up with them. - Shouldn’t we install a pysetup.py script instead? That would be better, in my view. - Shouldn’t we generate an .exe file instead (see #12394)? exe files probably give the best user experience, but are opaque which is mildly annoying. Also, test very carefully on Win7. I have a vague recollection that exes with setup and/or install in the names invoke UAC, which is a complete pain. easy_install suffers from this, I believe. In other words, I need more info from Windows experts about what works best for Python developers :) Personally, python -m packaging.run works fine for me. I'd prefer not to have a pysetup command at all, and change the documentation to refer to the python -m form throughout. Second best would be an exe, third would be pysetup.py (but again, the docs need changing), and finally a bat file. Another option would be a runnable pysetup module, so that python -m pysetup (or maybe an install.py so python -m install) would work. Paul. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14048] calendar bug related to September 2-14, 1752
Mark Dickinson dicki...@gmail.com added the comment: This is documented behaviour: see http://docs.python.org/library/calendar.html Most of these functions and classes rely on the datetime module which uses an idealized calendar, the current Gregorian calendar indefinitely extended in both directions. This matches the definition of the “proleptic Gregorian” calendar in Dershowitz and Reingold’s book “Calendrical Calculations”, where it’s the base calendar for all computations. Also note that things get messy if you try to correct this: the 1752 correction that you refer to applies mainly to the British calendar, and it would be a little rude to impose that correction on Python users worldwide :-) For other countries there are various adoption dates for the Gregorian calendar, and various corresponding corrections (e.g., Greece dropping 13 days in 1923). No idea how GNU/Linux handles this; what happens when you try 'cal 1923' on a machine with Greek locale settings? So at best this is a feature request, but as a feature request it would need either significant discussion (the python-ideas list may be a good place for this), or at least an explicit suggestion of exactly how things should be changed. Closing as invalid for now. -- nosy: +mark.dickinson resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14048 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13999] Queue references in multiprocessing doc points to Queue module and not to self
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13999 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14034] the example in argparse doc is too complex
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14042] json.dumps() documentation is slightly incorrect.
Ezio Melotti ezio.melo...@gmail.com added the comment: See #13770 and #13769. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Also, we normally set .py, and .pyw into the PATHEXT environment variable, so that a script pysetup.py can be invoked from the command-line as just pysetup without the suffix. This gives the same experience as using a pysetup.bat. I would say that pysetup seems a little more polished (and shorter) than the -m form, especially for users new to packaging. After that, I agree with Paul's ordering of .exe, with the setup script having to be named pysetup-script.py if we use the standard mechanism, or else if we use a custom .exe, it can of course be called whatever we want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13978] OSError exception in multiprocessing module when using os.remove() on NFS
Charles-François Natali neolo...@free.fr added the comment: I'm closing, since the manager should be shutdown (and TMPDIR on NFS isn't a good idea). -- resolution: - invalid stage: - committed/rejected status: open - closed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13978 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13579] string.Formatter doesn't understand the !a conversion specifier
Francisco Martín Brugué franci...@email.de added the comment: Updated. The NEWS line is now at the top of the section. As near as I can tell, the two change block beginning with +In less formal terms, [...] are strictly re-wrapping and no text changes. Correct? Yes. Just a pydev question here: I now this re-wrapping adds noise to the patch, but can/should be done? Please correct me if I'm wrong: one should try to limit the line width to 80. If one word starts before and ends behind is not bad but new words should start in a new line. Now in the devguide states “To perform a quick sanity check on your path, you can run make patchcheck” I did that (I'm using the mq approach here) but I get no useful information (AFAIN): --- Modules/Setup.dist is newer than Modules/Setup; check to make sure you have all the updates you need in your Modules/Setup file. Usually, copying Modules/Setup.dist to Modules/Setup will work. --- ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 0 files Fixing whitespace ... 0 files Fixing C file whitespace ... 0 files Fixing docs whitespace ... 0 files Docs modified ... NO Misc/ACKS updated ... NO Misc/NEWS updated ... NO Thanks in advance ! -- Added file: http://bugs.python.org/file24555/issue13579_4720cc9e.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11051] system calls per import
Charles-François Natali neolo...@free.fr added the comment: As noted by Antoine somewhere else (don't remember if it was on the bug tracker or mailing list), most of the startup time is due to site import: cf@neobox:~/python/cpython$ time ./python -c '' [44249 refs] real0m0.445s user0m0.376s sys 0m0.032s cf@neobox:~/python/cpython$ time ./python -S -c '' [35211 refs] real0m0.181s user0m0.144s sys 0m0.016s And that's mostly user time, the stat() calls don't weight much here. Here's the output of a profiling: Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 2/10.0060.0030.3030.303 {built-in method exec} 10.0040.0040.3030.303 test_startup.py:1(module) 10.0000.0000.2670.267 site.py:509(main) 10.0000.0000.2370.237 site.py:254(addusersitepackages) 10.0000.0000.2360.236 site.py:231(getusersitepackages) 10.0060.0060.2260.226 site.py:217(getuserbase) 10.0110.0110.2140.214 sysconfig.py:1(module) 10.0040.0040.1220.122 configparser.py:120(module) 300.0060.0000.1200.004 {built-in method __build_class__} 90.0000.0000.1160.013 re.py:204(compile) 90.0020.0000.1160.013 functools.py:185(wrapper) 90.0000.0000.1130.013 re.py:256(_compile) 90.0010.0000.1130.013 sre_compile.py:488(compile) 10.0010.0010.0960.096 configparser.py:555(RawConfigParser) On my (somewhat old) laptop, sysconfig import consumes 1/3 of the total startup time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14049] execfile() fails on files that use global variables inside functions
New submission from anatoly techtonik techto...@gmail.com: main.py below fails to execute local.py, which work ok (outputs '2') when processed directly in console. Docs are not explaining anything. They spread fear and uncertainty around locals, but nothing is said why globals may fail. http://docs.python.org/library/functions.html#execfile ---[cut main.py]--- values = {} glavues = {} execfile('local.py', glavues, values) ---[/cut]--- ---[cut local.py]--- x = 1 def weird(): y = x + 1 return y print weird() ---[/cut]--- Traceback (most recent call last): File main.py, line 5, in module execfile('local.py', glavues, values) File local.py, line 7, in module print weird() File local.py, line 5, in weird y = x + 1 NameError: global name 'x' is not defined -- assignee: docs@python components: Documentation, Library (Lib) messages: 153643 nosy: docs@python, techtonik priority: normal severity: normal status: open title: execfile() fails on files that use global variables inside functions versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 24244a744d01 by Charles-François Natali in branch '2.6': Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer http://hg.python.org/cpython/rev/24244a744d01 New changeset 0c02f30b2538 by Charles-François Natali in branch '2.7': Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer http://hg.python.org/cpython/rev/0c02f30b2538 New changeset 4dd5a94fd3e3 by Charles-François Natali in branch '3.1': Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer http://hg.python.org/cpython/rev/4dd5a94fd3e3 New changeset cd67740ce653 by Charles-François Natali in branch '3.2': Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer http://hg.python.org/cpython/rev/cd67740ce653 New changeset 5756b295b6fb by Charles-François Natali in branch 'default': Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer http://hg.python.org/cpython/rev/5756b295b6fb -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode
Nick Coghlan ncogh...@gmail.com added the comment: The other thing that came out of the rambling Unicode thread on python-ideas is that we should clearly articulate the options for processing files in a task-based fashion and describe the trade-offs for the different alternatives. I started writing up my notes on that as a tracker comment, but the became a little... long: http://readthedocs.org/docs/ncoghlan_devs-python-notes/en/latest/py3k_text_file_processing.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13579] string.Formatter doesn't understand the !a conversion specifier
Nick Coghlan ncogh...@gmail.com added the comment: On Sat, Feb 18, 2012 at 10:10 PM, Francisco Martín Brugué rep...@bugs.python.org wrote: ./python ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 0 files Fixing whitespace ... 0 files Fixing C file whitespace ... 0 files Fixing docs whitespace ... 0 files Docs modified ... NO Misc/ACKS updated ... NO Misc/NEWS updated ... NO I suspect mq will confuse make patchcheck (since it looks for differences between the working copy and the hg branch tip, and there are no such differences for an applied mq patch). Cheers, Nick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
Jason Yeo jasonye...@gmail.com added the comment: Just define a list of example args as a module global, append them to the run_args in _check_script, and check them against sys.argv[1:] with assertEqual() in the test script. Okay I have done that but the assertion passes in all the tests except in test_issue8202 and test_issue8202_dash_m_file_ignored. It seems that the script didn't receive any arguments from the cmd line from the way it is executed in these functions. I have attached a patch to let you see what I am doing. Let me know if I am wrong. Thanks. -- Added file: http://bugs.python.org/file24556/14026patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14012] Misc tarfile fixes
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14050] Tutorial, list.sort() and items comparability
New submission from Sandro Tosi sandro.t...@gmail.com: I'm providing patches for what reported at http://mail.python.org/pipermail/docs/2012-February/007481.html . I'm not sure on wording or even if we want them in the tutorial section, but I think it would be nice to have it documented nonetheless. -- assignee: docs@python components: Documentation files: list_sort-py27.diff keywords: patch messages: 153648 nosy: docs@python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Tutorial, list.sort() and items comparability versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24557/list_sort-py27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14050] Tutorial, list.sort() and items comparability
Changes by Sandro Tosi sandro.t...@gmail.com: Added file: http://bugs.python.org/file24558/list_sort-py32.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
New submission from Alex Gaynor alex.gay...@gmail.com: This is inconsistant with regular functions, which unfortunately prevents them from being used interchangeably. -- messages: 153649 nosy: alex priority: normal severity: normal status: open title: Cannot set attributes on staticmethod ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14013] tarfile should expose supported formats
Lars Gustäbel l...@gustaebel.de added the comment: I think this is a reasonable proposal. I think it is good style to let tarfile figure out which supported compression methods are available instead of shutil or the user. So far I have no objections. Following 3.3's crypt module, I think the name `methods' is superior to `formats' (maybe `compression_methods' is even better). Also, crypt's concept of a sorted list from stronger to weaker could also make sense here: [xz, bz2, gz]. Why not? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14013 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Antoine Pitrou pit...@free.fr added the comment: Here is a patch with tests. -- Added file: http://bugs.python.org/file24559/impsuffix2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Martin v. Löwis mar...@v.loewis.de added the comment: In this case, I propose to drop the feature without deprecation. It is very easy to adjust the build process of packages that still use the feature, and even end users can rename the files. If you want to improve ease-of-use, you could still do the stat calls, and record whether a file would have been imported. If then the import fails, put a message into the import error saying the /some/where/somemodule.so was ignored because the file name is no longer supported. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode
Terry J. Reedy tjre...@udel.edu added the comment: Yes, the 'how to' alternatives, with + and -, should be included in the doc addition. I thought it the best thing to come out of the python-ideas thread. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
Changes by Antoine Pitrou pit...@free.fr: -- components: +Interpreter Core nosy: +benjamin.peterson stage: - needs patch type: - enhancement versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
Éric Araujo mer...@netwok.org added the comment: I don’t understand why you import the module inside the same module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
Antoine Pitrou pit...@free.fr added the comment: Another possibility would be to include an explicit invalidate_caches() function in importlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14052] importlib mixes up '.' and os.getcwd()
New submission from Antoine Pitrou pit...@free.fr: An empty sys.path string means the current directory in relative terms: $ touch foo.py $ python3 -c import foo; print(foo.__file__) foo.py But importlib uses os.getcwd() instead in PathFinder._path_importer_cache(). This impacts semantics of path searching, as well as the values of __file__ and __cached__ attributes. -- assignee: brett.cannon components: Library (Lib) messages: 153656 nosy: brett.cannon, pitrou priority: normal severity: normal status: open title: importlib mixes up '.' and os.getcwd() versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14052 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6884] Impossible to include file in sdist that starts with 'build' on Win32
Nadeem Vawda nadeem.va...@gmail.com added the comment: Test output: test test_distutils failed -- Traceback (most recent call last): File C:\Users\Nadeem\Code\python2\python27\lib\distutils\tests\test_filelist.py, line 230, in test_process_template self.assertEqual(file_list.files, ['d/b.py', 'd/d/e.py']) AssertionError: Lists differ: [] != ['d/b.py', 'd/d/e.py'] Second list contains 2 additional elements. First extra element 0: d/b.py - [] + ['d/b.py', 'd/d/e.py'] Output of sdist: C:\Users\Nadeem\Code\keyring..\python2\python27\PCbuild\python_d setup.py sdist C:\Users\Nadeem\Code\python2\python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'extras_require' warnings.warn(msg) options (after parsing config files): options (after parsing command line): option dict for 'sdist' command: {} running sdist Distribution.get_command_obj(): creating 'sdist' command object running check Distribution.get_command_obj(): creating 'check' command object Distribution.get_command_obj(): creating 'build_py' command object Distribution.get_command_obj(): creating 'build' command object reading manifest template 'MANIFEST.in' [... output omitted - applying other regexes ...] include *.txt include_pattern: applying regex r'^[^/]*\.txt\Z(?ms)' adding CHANGES.txt adding CONTRIBUTORS.txt adding .hg\last-message.txt exclude_pattern: applying regex r'^build\\.*' exclude_pattern: applying regex r'^keyring\-0\.8\\.*' exclude_pattern: applying regex r'(^|/|\\)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)(/|\\).*' removing .hg\last-message.txt writing manifest file 'MANIFEST' [... output omitted - creating directories; copying and adding files ...] removing 'keyring-0.8' (and everything under it) As you can see, the include *.txt directive still catches .hg\last-message.txt. The problem seems to be that while you've fixed the prefix-handling codepath in translate_pattern(), glob_to_re() is still hardcoded to use /. I've been able to get the desired behavior by changing glob_to_re() as follows (note the need to double-escape os.sep): # character except the special characters. # XXX currently the special characters are just slash -- i.e. this is # Unix-only. -pattern_re = re.sub(r'((?!\\)()*)\.', r'\1[^/]', pattern_re) +pattern_re = re.sub(r'((?!\\)()*)\.', +r'\1[^' + re.escape(re.escape(os.sep)) + ']', +pattern_re) return pattern_re Of course, the comment above should also be updated. Also, this change results in a different set of test breakages: == FAIL: test_glob_to_re (distutils.tests.test_filelist.FileListTestCase) -- Traceback (most recent call last): File C:\Users\Nadeem\Code\python2\python27\lib\distutils\tests\test_filelist.py, line 42, in test_glob_to_re self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)') AssertionError: 'foo[^]*\\Z(?ms)' != 'foo[^/]*\\Z(?ms)' == FAIL: test_process_template (distutils.tests.test_filelist.FileListTestCase) -- Traceback (most recent call last): File C:\Users\Nadeem\Code\python2\python27\lib\distutils\tests\test_filelist.py, line 182, in test_process_template self.assertEqual(file_list.files, ['a.py']) AssertionError: Lists differ: ['a.py', 'd/c.py'] != ['a.py'] First list contains 1 additional elements. First extra element 1: d/c.py - ['a.py', 'd/c.py'] + ['a.py'] These are both clearly due to the tests using hardcoded Unix paths instead of os.sep and os.path.join(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
Antoine Pitrou pit...@free.fr added the comment: This is a patch demonstrating invalidate_caches(). As for test_runpy, it seems runpy uses imp.get_loader(), so I don't see how it can remain synchronized with importlib's state. -- Added file: http://bugs.python.org/file24560/listdir_cache3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6784] byte/unicode pickle incompatibilities between python2 and python3
Merlijn van Deen valhall...@gmail.com added the comment: Any news on this? Just as a note, pickletools.py also does not reflect the current behaviour; pickle types STRING, BINSTRING and SHORT_BINSTRING are all defined with stack_after=[pystring]: [1, line 992] I(name='STRING', code='S', arg=stringnl, stack_before=[], stack_after=[pystring], proto=0, doc=(...) ) although the doc=... does describe it will be decoded, the object type of pystring is still defined as bytes: [1, line 747] pystring = StackObject( name='string', obtype=bytes, doc=A Python (8-bit) string object.) [1] http://hg.python.org/cpython/file/98df29d51e12/Lib/pickletools.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
Brett Cannon br...@python.org added the comment: I wouldn't worry too much about test_runpy as it has always been a touchy test for me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
Nick Coghlan ncogh...@gmail.com added the comment: The second instance is inside the source code string that's written out as the script to be run in the subprocess. Not a bad idea actually: - it avoids writing the example args twice (which is what I was thinking of doing) - it avoids turning the test_script into a string formatting template (which is something I've been trying to avoid for that test) - it provides an additional sanity check on how sys.path is being initialised in the subprocess For the two failures, I suggest modifying _check_script() to return the rc, out, err from the underlying assert_python_ok() call, then updating the two offending tests to call _check_script() appropriately instead of calling assert_python_ok() directly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Brett Cannon br...@python.org added the comment: I like Martin's suggestion of simply throwing an error. But then again I also really like his idea of simply not warning since it's easier. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14052] importlib mixes up '.' and os.getcwd()
Brett Cannon br...@python.org added the comment: It's surprisingly difficult to get right because tests will fail if you keep the path relative in other situations (such as test_cmd_line_script). It was an absolute pain to get it to where it is now. If you can make it keep the relative path and pass the test then that's great, but relative file paths suck for compatibility and I don't think they are that useful to begin with. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14052 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12627] Implement PEP 394: The python Command on Unix-Like Systems
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 499796937b7a by Ned Deily in branch '2.7': Issue #12627: Implement PEP 394 for OS X framework builds. http://hg.python.org/cpython/rev/499796937b7a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12627] Implement PEP 394: The python Command on Unix-Like Systems
Ned Deily n...@acm.org added the comment: Changeset 499796937b7a implements PEP 394 for OS X framework builds on Python 2.7. OS X framework builds already created versioned symlinks for all executables and scripts installed in the framework bin directory, of the general form ${cmd} - ${cmd}2.7. This is all accomplished in some additional targets in Mac/Makefile which are automatically added by configure for framework builds and supersede the standard processing in the main Makefile bininstall and altbininstall targets. The changes here add the additional hierarchy of ${cmd} - ${cmd}2 - ${cmd}2.7. Per previous practice, all of the links are created in the framework bin directory for both the install and altinstall targets. This is consistent with the long-standing recommendation to manage multiple framework versions by adding and ordering framework bin directories on $PATH. Also, per past practice, symlinks to all framework bin entries are created in $prefix/bin (by default, /usr/local/bin) for the install target and only versioned links are created for altinstall, although the use of these links is not recommended for framework builds and their installation is optional with the standard OS X installers. No changes are needed for 3.2 or 3.3 at this time. Although the Mac/Makefile targets don't quite create all of the versioned links in $prefix/bin, the installer build script does the right thing by creating symlinks to everything in the fw bin directory. In many respects, the current situation for framework builds is less than ideal, with duplicated code, vestigial links, and, more importantly, a clumsy and non-transparent method for managing multiple versions. I intend to revisit this area prior to Python 3.3 feature code cutoff as a separate issue. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5af5e6b2c053 by Jesus Cea in branch 'default': Test for issue #13500 http://hg.python.org/cpython/rev/5af5e6b2c053 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0d442e166c8f by Jesus Cea in branch '2.7': Test for issue #13500 http://hg.python.org/cpython/rev/0d442e166c8f New changeset 3a40af30449e by Jesus Cea in branch '3.2': Test for issue #13500 http://hg.python.org/cpython/rev/3a40af30449e New changeset ad204ed6ac51 by Jesus Cea in branch 'default': MERGE: Test for issue #13500 http://hg.python.org/cpython/rev/ad204ed6ac51 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13500] Hitting EOF gets cmd.py into a infinite EOF on return loop
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2909e60e7e13 by Jesus Cea in branch '2.7': Fix Test for issue #13500 http://hg.python.org/cpython/rev/2909e60e7e13 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14030] Be more careful about selecting the compiler in distutils
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14030 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13579] string.Formatter doesn't understand the !a conversion specifier
Francisco Martín Brugué franci...@email.de added the comment: I suspect mq will confuse make patchcheck (since it looks for differences between the working copy and the hg branch tip, and there are no such differences for an applied mq patch). Does it makes sense to open a feature request for that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14051] Cannot set attributes on staticmethod
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f46deae68e34 by Benjamin Peterson in branch 'default': allow arbitrary attributes on classmethod and staticmethod (closes #14051) http://hg.python.org/cpython/rev/f46deae68e34 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12393] Packaging should provide support for extensible categories
Éric Araujo mer...@netwok.org added the comment: I’ve had a look at your implementation. It is an interesting use of properties, but doesn’t quite fit into how packaging works. Most of the options parsing and validation (from config files and command-line alike) is done in each command’s finalize_options method, some parsing and validation is done in the config module (for the metadata, files and soon extension sections), and the section named “global” is validated by the Distribution (or maybe Dispatcher now) class. So I’ll certainly reuse your tests, but will have to redo the implementation. I’m also wondering if install_data’s options are the right place for this. For example, does it make sense to allow “pysetup run install_data --categories spam=blah”? (Any command option can be given on the command line.) Maybe the global section of setup.cfg would be better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12393 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com