Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_distutils should honor PYTHONDONTWRITEBYTECODE #54040

Closed
donmez mannequin opened this issue Sep 11, 2010 · 11 comments
Closed

test_distutils should honor PYTHONDONTWRITEBYTECODE #54040

donmez mannequin opened this issue Sep 11, 2010 · 11 comments
Assignees
Labels
OS-mac stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@donmez
Copy link
Mannequin

donmez mannequin commented Sep 11, 2010

BPO 9831
Nosy @tarekziade, @ned-deily, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/merwok'
closed_at = <Date 2011-05-29.16:18:58.977>
created_at = <Date 2010-09-11.09:46:18.975>
labels = ['OS-mac', 'tests', 'type-bug', 'library']
title = 'test_distutils should honor PYTHONDONTWRITEBYTECODE'
updated_at = <Date 2011-11-12.15:14:48.855>
user = 'https://bugs.python.org/donmez'

bugs.python.org fields:

activity = <Date 2011-11-12.15:14:48.855>
actor = 'eric.araujo'
assignee = 'eric.araujo'
closed = True
closed_date = <Date 2011-05-29.16:18:58.977>
closer = 'eric.araujo'
components = ['Distutils', 'macOS', 'Tests', 'Distutils2']
creation = <Date 2010-09-11.09:46:18.975>
creator = 'donmez'
dependencies = []
files = []
hgrepos = []
issue_num = 9831
keywords = []
message_count = 11.0
messages = ['116084', '116100', '116148', '116157', '116159', '116246', '137188', '137190', '137192', '137193', '147498']
nosy_count = 5.0
nosy_names = ['donmez', 'tarek', 'ned.deily', 'eric.araujo', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue9831'
versions = ['3rd party', 'Python 3.1', 'Python 2.7', 'Python 3.2', 'Python 3.3']

@donmez
Copy link
Mannequin Author

donmez mannequin commented Sep 11, 2010

Using py3k branch revision 84707, on Mac OSX 10.6, case-sensitive HFS+ filesystem.

======================================================================
FAIL: test_package_data (distutils.tests.test_build_py.BuildPyTestCase)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/Users/cartman/Sources/py3k/Lib/distutils/tests/test_build_py.py", line 56, in test_package_data
    self.assertTrue("__init__.pyc" in files)
AssertionError: False is not True

@donmez donmez mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Sep 11, 2010
@donmez
Copy link
Mannequin Author

donmez mannequin commented Sep 11, 2010

Btw I configure with;

./configure --with-wctype-functions --with-fpectl --with-wide-unicode --with-computed-gotos --enable-ipv6 --with-universal-archs=64-bit MACOSX_DEPLOYMENT_TARGET=10.6

@florentx florentx mannequin added stdlib Python modules in the Lib dir OS-mac labels Sep 11, 2010
@florentx florentx mannequin assigned tarekziade Sep 11, 2010
@merwok
Copy link
Member

merwok commented Sep 12, 2010

Thank you for the report. Can you apply this change and paste the new, more useful output?

  • self.assertTrue("__init__.pyc" in files)
    + self.assertIn("__init__.pyc", files)

@ned-deily
Copy link
Member

I am not able to reproduce that failure running on 10.6 (case-sensitive HFS+) using your ./configure options and running the tests in the build directory (make test). How are you running the tests? Could there be a file or directory permissions issue?

@donmez
Copy link
Mannequin Author

donmez mannequin commented Sep 12, 2010

Problem is I set PYTHONDONTWRITEBYTECODE to 1, tests should disable this environmental variable before testing for *.pyc files. Closing as invalid.

@donmez donmez mannequin closed this as completed Sep 12, 2010
@donmez donmez mannequin added the invalid label Sep 12, 2010
@merwok
Copy link
Member

merwok commented Sep 12, 2010

I noticed this bug in the tests of distutils2 and added it to my todo list some time ago. Tests looking at pycs should take PYTHONDONTWRITEBYTECODE into account and be skipped instead of failing. I’ll fix it.

@merwok merwok removed the invalid label Sep 12, 2010
@merwok merwok reopened this Sep 12, 2010
@merwok merwok assigned merwok and unassigned tarekziade Sep 12, 2010
@merwok merwok changed the title test_distutils fails on MacOSX 10.6 test_distutils should honor PYTHONDONTWRITEBYTECODE Nov 22, 2010
@python-dev
Copy link
Mannequin

python-dev mannequin commented May 29, 2011

New changeset da7617248935 by Éric Araujo in branch '2.7':
Fix test_distutils when sys.dont_write_bytecode is true (bpo-9831).
http://hg.python.org/cpython/rev/da7617248935

@python-dev
Copy link
Mannequin

python-dev mannequin commented May 29, 2011

New changeset 3d56e559ffc6 by Éric Araujo in branch '3.1':
Fix test_build_py when sys.dont_write_bytecode is true (bpo-9831).
http://hg.python.org/cpython/rev/3d56e559ffc6

New changeset 1370dc2690a2 by Éric Araujo in branch '3.2':
Merge doc touch-ups and fixes for bpo-9831 and bpo-9223 from 3.1
http://hg.python.org/cpython/rev/1370dc2690a2

New changeset c5d6a384132d by Éric Araujo in branch 'default':
Merge touch-ups and fixes for bpo-9831 (+port fix to packaging) and bpo-9223 from 3.2
http://hg.python.org/cpython/rev/c5d6a384132d

@merwok
Copy link
Member

merwok commented May 29, 2011

Now fixed, thanks for the report.

@merwok merwok closed this as completed May 29, 2011
@donmez
Copy link
Mannequin Author

donmez mannequin commented May 29, 2011

Awesome, thank you!

@merwok
Copy link
Member

merwok commented Nov 12, 2011

I now think the change I did was wrong. See bpo-12119.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants