qizhiyi / sqlalchemy-migrate

Automatically exported from code.google.com/p/sqlalchemy-migrate
MIT License
0 stars 0 forks source link

.pyc or .pyo files are ignored when .py files are not present #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I package my application the .py files are removed, only the .pyc
files are given to the end-user.

This makes sqlalchemy-migrate fail because it only looks for .py files.

Original issue reported on code.google.com by cdevie...@gmail.com on 7 Jan 2010 at 3:55

GoogleCodeExporter commented 8 years ago
I made fix for this (at least I believe it fixes it) and updated the tests in a 
clone.

http://code.google.com/r/nickbarendt-sqlalchemy-migrate/source/detail?
r=fb0246d4d83efea4dec7e73c81cb1f4229ebb7f5

Original comment by nickbare...@gmail.com on 12 Jan 2010 at 4:24

GoogleCodeExporter commented 8 years ago

Original comment by jan.ditt...@gmail.com on 17 Jan 2010 at 1:44

GoogleCodeExporter commented 8 years ago
Tests needed.

Original comment by iElect...@gmail.com on 5 Feb 2010 at 10:44

GoogleCodeExporter commented 8 years ago

Original comment by iElect...@gmail.com on 8 Feb 2010 at 3:57

GoogleCodeExporter commented 8 years ago
Could this maybe print a warning? For example if as a developer I delete a 
migration
that I don't want but forget to delete the .pyc file it would be nice to have a
warning that we're reading a migration I might not have expected.

Regardless +2 for this bug: I got an obscure traceback and it took a while to 
figure
out was going on

Original comment by ryanwil...@gmail.com on 28 Mar 2010 at 9:21

GoogleCodeExporter commented 8 years ago
I'm here because I don't want the migrations scripts to pick up .pyc files - to 
my
mind it's a bug. If I remove .py source files from a project, I expect the 
migration
not to run the leftover object files. Currently, if there are leftover migration
object files, I get errors all over the place.

Original comment by marl...@gmail.com on 20 May 2010 at 7:14

GoogleCodeExporter commented 8 years ago
You cannot consider this as a bug. If you do, then python itself is buggy since 
it
imports .pyc files.
In other words, using .pyc files if they are present is the standard behavior.

I guess an option in the repo telling not to consider pyc files would be a 
solution.

I will test the fix this week.

Original comment by cdevie...@gmail.com on 20 May 2010 at 8:52

GoogleCodeExporter commented 8 years ago
Is there anything that was done for this? I have the same problem as the bug 
reporter and it seems like this is still failing on version 0.7.2 .

Original comment by remy....@r2logica.com on 28 Mar 2012 at 8:42