-
Notifications
You must be signed in to change notification settings - Fork 427
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
finalizing paths.json spec #1535
Conversation
prefix_placeholder, file_mode = has_prefix(fi, files_with_prefix) | ||
path = os.path.join(prefix, fi) | ||
file_info = { | ||
"short_path": get_short_path(m, fi), | ||
"sha256": sha256_checksum(path), | ||
"size_in_bytes": os.path.getsize(path), | ||
"file_type": getattr(file_type(path), "name"), | ||
"node_type": node_type(path).name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove
.name
from the line above. - The class below is from
conda._vendor.auxlib.entity
. Let's put it inconda_interface.py
.
class EntityEncoder(JSONEncoder):
# json.dumps(obj, cls=SetEncoder)
def default(self, obj):
if hasattr(obj, 'dump'):
return obj.dump()
elif hasattr(obj, '__json__'):
return obj.__json__()
elif hasattr(obj, 'to_json'):
return obj.to_json()
elif hasattr(obj, 'as_json'):
return obj.as_json()
return JSONEncoder.default(self, obj)
- Add a
__json__
method toNodeType
that returnsself.name
. See other enums inconda/base/constants.py
for examples.
@@ -123,3 +125,40 @@ def which_prefix(path): | |||
# we cannot chop off any more directories, so we didn't find it | |||
return None | |||
prefix = dirname(prefix) | |||
|
|||
|
|||
class NodeType(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above there's a line
if parse_version(conda.__version__) >= parse_version("4.2"):
We should also have a section for 4.3
where we actually do the real imports from conda/exports.py
. Then add this new stuff under the else
after 4.3
. That way it's easy to rip out in the future.
727aa2a
to
f47c2f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think these errors are the same kind that we were seeing in conda and has to do with updates to a new version of requests |
Please merge master to resolve the conflict. Let me know if you have any questions. |
a7feb64
to
9a8dda8
Compare
@soapy1 let's get master merged in, see if we need fixes, and then get it merged |
Wait, how did soapy1#14 get merged, but I don't see the commit? |
Oh, it looks like the changes aren't in here either. I had to rebase on master to resolve some merge conflicts, could that have caused it? |
97978fc
to
e6718bb
Compare
19154ef
to
dd9a94a
Compare
dd9a94a
to
ab51199
Compare
8d9460c
to
b7d7ba3
Compare
Appveyor failure: https://ci.appveyor.com/project/ContinuumAnalyticsFOSS/conda-build/build/1.0.1069/job/0v2qc287b1gnl2d5#L1063 Looks like python 2.7 does not define os.link in windows. |
conda canary test is failing because conda 4.3 isn't actually exporting |
399a385
to
25c0b37
Compare
25c0b37
to
47b9136
Compare
I guess it's not yet so, but here it seems appropriate to export |
@kalefranz I tried to get around that problem by having another test on windows that doesn't need |
assert 2 == CrossPlatformStLink.st_nlink(test_file_linked) | ||
|
||
|
||
def test_crossplatform_st_link_on_win(tmpdir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want a platform skip on things other than windows. Just invert the logic from your test one up.
Current windows test failures are other things that I'm looking into. This seems fine and ready to go to me. |
24c0013
to
e9885a1
Compare
Thanks @soapy1 - merging. |
Hi there, thank you for your contribution! This pull request has been automatically locked because it has not had recent activity after being closed. Please open a new issue or pull request if needed. Thanks! |
Creating a new pr to address the code review from #1501 (review)
This is dependent on conda/conda#3887 being merged